Archived

This topic is now archived and is closed to further replies.

billybob

do modal dialog boxes receive all messages?

Recommended Posts

billybob    134
i''m wondering if dialogs receive all messages that normal windows do, as in WM_KEYDOWN and WM_NCLBUTTONDOWN in particular. i checked that my dialog proc is getting called, and it is, just nothing is responding inside it

Share this post


Link to post
Share on other sites
Nervo    344
I think I know what the problem is, but others still may have better insight. Firstly, I believe when a modal window is called, everything is stopped from being run in that program until something like the cancel or OK button is clicked on the window. This seems to affect timer functions. I believe in order to execute code in a timer, for instance, requires usage of a settimer and killtimer API, at least in VB. Perhaps that is what you need to use an API timer.

EDIT: You're probably already using the settimer() and killtimer() functions, which in that case my comment means nil, sorry.

[edited by - nervo on May 28, 2003 2:35:20 AM]

Share this post


Link to post
Share on other sites
billybob    134
actually, its nothing like that. its an extremely small dialog, quite literally. i''m working on a grid style control, where you click on variables and edit them based on their type. when you click on a variable, it starts a tiny dialog with an edit box or button or a few small controls or something. it is modal, but almost everything is supposed to get out of it. that is why i was wondering about WM_KEYDOWN and WM_NCLBUTTONDOWN, i would just EndDialog when anything was recieved that indicated the user stopped editing the value, set the value of the variable to the dialog''s controls, and it would disappear.

Share this post


Link to post
Share on other sites
billybob    134
i''m totally stumped on this, i''ve checked every single thing i can think of, my dialog proc is being called, but the dialog itself doesn''t show up, and no messages that should be sent by user input (WM_LBUTTONDOWN, WM_KEYDOWN, ...) don''t come

Share this post


Link to post
Share on other sites
ZoomBoy    162
might want to try
codeproject.com
They''re much bigger on the Win32 programming than most game programmers


ZoomBoy
Developing a iso-tile 2D RPG with skills, weapons, and adventure. See my old Hex-Tile RPG GAME, character editor, diary, 3D Art resources at Check out my web-site

Share this post


Link to post
Share on other sites
Shannon Barber    1681
Are you telling the dialog to show itself?
You either need the SW_SHOW flag when you create the window, or call ShowWindow after you create it.

If it's not visible, it won't take focus, and won't receive input.

[edited by - Magmai Kai Holmlor on May 28, 2003 12:10:23 AM]

Share this post


Link to post
Share on other sites