- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Normally, Alt+Enter will switch an application to full screen mode. Can this be disabled for a quickwin app? How?
Thanks,
Erik
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to use a call to SetWindowLong to sub-class the QuickWin frame window, intersept the command generated by the ALT+ENTER combination in your new window procedure, do what you want with it and return a value for your window procedure to stop the command being passed on to the default window procedure. Meanwhile pass all other commands on to the original window procedure using CallWindowProc , whose location is obtained when you use SetWindowLong to swap the address of your new window procedure with that of the 'old' default window procedure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anthony,
Thanks for the detailed explanation.
Erik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anthony (or anyone else),
Any idea what the Alt+Enter message handle is so I can capture it?
Thanks,
Erik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ALT+ anything sends a WM_SYSKEYDOWN message. So I suggest you, write your
subclassing code, run the program and press ALT+ENTER, intercept it
and examine the arguments wparam and lparam that come with the message (I would output them in a message box having written the integers wparam and lparam to a character string using an internal write) and then pass the message on to the default window procedure using CallWindowProc so that the window messages are properly dealt with.
When you know what to look for, you can then proceed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Having experimented, it would appear that ALT+ a key generates a WM_SYSCOMMAND windows message, but NOT a WM_SYSKEYDOWN message, in QuickWin contrary to the SDK HELP information. It would also appear to be true that ALT+ENTER generates neither. It would appear that this combination by-passes the QuickWin window's message queue: ALT+ENTER is therefore probably reserved for the windows system's use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anthony,
Thanks for steering me in the right direction.
FYI to anyone else interested in this thread...
The sample project POKER is an excellent resource which demonstrates the SetWindowLong command.
I was ableto capture the Alt+Enter mesg using the following:
if( Msg == WM_SYSKEYDOWN) then
if (wParam == VK_RETURN) then
if (wParam == VK_RETURN) then
end if
end if
Erik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see my mistake: you have to subclass the QuickWIn CHILD window, which is the window that gets sent the ALT+ENTER message, and not the FRAME window! All is now clear.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page