Sign in to follow this  

WM_KEYDOWN in DialogBoxes?

This topic is 4736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to use WM_KEYDOWN in a Modeless Dialog box and finding that I am getting no user input? Is there a different enum type for keyboard messages in a dialog box? Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
Quote:
Original post by MARS_999Win32


Do you think we can see some code - the WndProc that handles the input as well as the window creation part where you assing the WndProc?


Ok I got it working the dialog box is taking input now through WM_KEYDOWN in its own callback function with the rest of the message types. I have a new problem now though... I am trying to get the window size so I can update a DC so I can resize the window, and its not working to well. I get a error and have tried to use the error log and got nothing? Here is teh code I am using to get the info.


RECT glWindowSize;
if(!GetClientRect(gOpenGLhwnd, &glWindowSize))
MessageBox(NULL, "Error on mapping OpenGL window size", "Error", MB_OK);




Thanks for all the help so far!

Share this post


Link to post
Share on other sites
Quote:
Original post by Invader X
What does GetLastError() return? Are you sure that gOpenGLhwnd is valid?


Yeah its vaild or my DialogBox would show up correct? and my openGL rending is working. I can try the GetLastError() again but it wasn't returing nothing lasttime I tried it, but GetClientRect is returing an error.

Share this post


Link to post
Share on other sites
Quote:
Original post by Invader X
What does GetLastError() return? Are you sure that gOpenGLhwnd is valid?


Ok I tried it again and it came up with 1400 which was an invalid handle? Odd I was using the global handle that ends up getting passed to the proc function for my dialog box? Now it works no errors! Thanks

Share this post


Link to post
Share on other sites

This topic is 4736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this