RE: Re: Fw: Windows IIP problem.

"Tony" <[email protected]> Mon, 15 Sep 2003 02:47:53 -0700
Newsgroups gmane.comp.security.invisiblenet.iip.devel
Message-ID <[email protected]>
I originally thought about that except SetCapture only will capture the
mouse movements if the button is pressed on the window that SetCapture
was called on before it moves away from the window which is how drag and
drop operates.  Plus with the way the code has been written there is no
handle before the uiwRun method is called so the work has to be done in
uiwwRun and uiwwNotify (To release the capture).  SetCapture could be
called in the uiwwRun method but that is a little dirty for my taste
given I still have not completely seen what uses this method (other
dialogs, etc...), and the user still has to click on the window before
they start moving the mouse around.  

<msdn-exerpt>
The SetCapture function sets the mouse capture to the specified window
belonging to the current thread. SetCapture captures mouse input either
when the mouse is over the capturing window, or when the mouse button
was pressed while the mouse was over the capturing window and the button
is still down. Only one window at a time can capture the mouse.

If the mouse cursor is over a window created by another thread, the
system will direct mouse input to the specified window only if a mouse
button is down.
</msdn-exerpt>

Personally I don't really like my idea of hooking all of the message
loops because we would have to have another dll for the processes to
load and it will only work on an NT kernel...  So far the best solution
I have found is to just make the dialog as big as the screen or at least
larger than it currently is, but the uiwwSizeGroup function _seems_ to
take care of automatically setting up the control and dialog size.  

I have changed the text in the dialog to tell the user to keep the mouse
over the dialog when generating and checked that in, but I think we
should still make the dialog larger. 

~tony


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Michael Schierl
Sent: Sunday, September 14, 2003 12:05 PM
To: [email protected]
Subject: [iip-dev] Re: Fw: Windows IIP problem.


On Fri, 12 Sep 2003 14:21:36 -0700, Tony wrote:

>  
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Lance,
> Yes point me to the code, if someone can get to it before me the 
> easiest way to solve this problem is to make that text box full screen

> and modal OR subclass the desktop window so that you get the 
> WM_MOUSEMOVE messages that arive on the desktop window.  (The second 
> option is not quite as deterministic because of all the other windows 
> that may be on the desktop will get the mouse move message and you 
> will have to subclass them all...)  I don't know if it will work (it 
> has been a while) but I THINK that if that text box is system modal it

> will get all of the mouse move messages, but that can be annoying to 
> the user because they wont even be able to activate any other window 
> until the system modal window goes away.

You could as well use SetCapture to get all mouse events exclusively.
However, you should set a custom mouse pointer (maybe that NoDrop or a
crosshair cursor?)  so that the user sees he cannot do anything with the
mouse - and don't forget to release the capture (SetCapture(0))
afterwards... (Releasing the capture if you receive a MOUSE_UP event
could be a good idea, too - maybe the user does not want to do the
entropy generation now?).

(usually, Windows uses that SetCapture thingy internally for Drag'n'Drop
operations...)

Mixmaster uses a nice "scribble" window for entropy collection - it says
"Write your name in here with your mouse" - usually enough entropy is
collected before you finished your name. But that might be overkill.

Michael

_______________________________________________
iip-dev mailing list
[email protected]
http://lists.invisiblenet.net/mailman/listinfo/iip-dev

_______________________________________________
iip-dev mailing list
[email protected]
http://lists.invisiblenet.net/mailman/listinfo/iip-dev