Advertisement Jump to content
Sign in to follow this  
skeb at gamedev

Some Windows questions

This topic is 4901 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

Hi, I've got some (I think simple) questions about Windows programming in C/C++. (I've got to use Visual Studio 6.0 because of work). I don't use MFC or something like that, only windows functions(from windows.h etc.) The questions: 1) I've made a dialog with scrollbars(not from the window, but seperate scrollbars). When I click on the scrollbars windows starts sending WM_HSCROLL etc. messages to my window. The problem I have now is that it seems that when I do TranslateMessage(&Message); DispatchMessage(&Message); the programs stays in DispatchMessage until the scrollbar is released. Can this be true? And even more important... is there a way that dispatchmessage only dispatches one message and than returns and dispatches the next message in a next call? 2) Again I've a dialog. But now with buttons. I want to receive WM_KEYDOWN and WM_KEYUP in this window (at least, when the users 'selects/focusses' the window and not a button in this window) I want this main window to receive the key messages. How can I do this, because now it seems that the key messages seem to go to the buttons or something like that. Thanks in advance, SkEb (at gamedev)

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!