PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Simulating a dialogbox with a regular window.

I am trying to simulate a dialog window (with a regular window). My window stays on top no problem but I would like to not loose focus at anytime just like a regular modal dialogbox.

I have the idea of using WM_ACTIVATE but don't know how to cancel the message and the other window's activate message.

Regards,
Kornalius
When you get WM_ACTIVATE with WA_INACTIVE in your pseudo-dialog box have you tried setting focus back to it again? You can't "cancel" the message, but you can give focus back to your window again. If the dialog box is not system-model, then you should check which window is getting focus, and if it is not a child of your parent window then do nothing.

Also, try using Spy to see what styles a real dialog box has, as well as checking what messages are sent when you click on some other window.

Dan East
Hey Dan,

Using the Spy is a really good idea. I'm gonna try that. :D

Regards,
Kornalius