Re: [GD-Windows] Dialog doesn't move
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2006-04-28 20:11:12
|
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+ |