Re: Dialog doesn't move
Jon Watte <[email protected]> Fri, 28 Apr 2006 13:10:59 -0700
| Newsgroups | gmane.games.devel.windows |
|---|---|
| Message-ID | <[email protected]> |
Andrew Grant wrote:
> Just to be clear, I'm pretty sure you need to ignore all non-zero return
> values not just those that return TRUE. E.g.
> while (dlg->Running() && GetMessage(&msg,NULL,0,0))
> if (!IsDialogMessage(dlg->Handle(), &msg))
Yes, that's what I did. That made the dialog seize up when clicking the
title bar to move it, or clicking the close button. NOT ignoring the
messages I listed made it work OK.
> My understanding is that the only use of IsDialogMessage() is to handle
> keyboard navigation between items so you should be safe to omit this call
> altogether if you don't need that functionality.
I do need it.
> Make sure it's the dialog handle you're passing in,not your main
> window.
I'm pretty sure -- see below.
Now, there is a little bit more to the story. I'm calling IsDialogEvent
from inside a GetMessage WindowsHook, and if it (IsDialogEvent) returns
true, I change the message to WM_NULL/0/0. The reason is that I'm
actually hosted as a DLL inside another application. I've already
recovered my HMODULE, the HMODULE of the host, and the HWND of the main
window, so that's all good. I also know the thread is the same, because
I only hook GetCurrentThreadId() in the SetWindowsHookEx() call.
So: with this set-up, I have to explicitly not ignore about six events
(related to NC mouse actions), or the dialog siezes up. Such behavior
isn't documented anywhere. Given that I don't have source for the host
application, it's been more annoying to debug than I would have hoped.
Any more insights to this situation? ("You shouldn't want to do that"
came to me, as well, but wouldn't help the current situation :-)
Cheers,
/ h+
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555