- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In re-writing old F77 programs with many graphic routines to Fortran Standard Graphic applications I am not able to detect an Escape press. It always toggles with Alt-Screen between full window and windowed screen.
My programs heavily depend on Esc to quit from certain routines. Besides, changing screen window is not desirable in my programs. They have to stay always full-screen. I can live with Alt-Screen which is typical user desired but Esc is just a simple key, always available. How to detect and suppress Esc in Standard Graphics applications?
Paul
My programs heavily depend on Esc to quit from certain routines. Besides, changing screen window is not desirable in my programs. They have to stay always full-screen. I can live with Alt-Screen which is typical user desired but Esc is just a simple key, always available. How to detect and suppress Esc in Standard Graphics applications?
Paul
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will have to subclass the frame window and override WM_KEYDOWN/VK_ESCAPE. It's not so scary as it sounds -- take a look at POKER CVF sample, or, simpler, QWToolbar sample on my home page.
Jugoslav
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Jugoslav,
I don't understand your reply or my question was not clear. Both POKER CVF and QWToolbarsample show a main window which can be changed to full-screen with Alt+Enter and back using Esc.
I want to write graphic programs, without Window menus, running from start full-screen without allowing the Escape key to bring it back to a Window.
Paul
I don't understand your reply or my question was not clear. Both POKER CVF and QWToolbarsample show a main window which can be changed to full-screen with Alt+Enter and back using Esc.
I want to write graphic programs, without Window menus, running from start full-screen without allowing the Escape key to bring it back to a Window.
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
They illustrate how to subclass the QuickWin window in order to get hold of events that would otherwise be directed to QuickWin library for handling. Subclassing provides means to extend or override QuickWin functionality.
What you need to do is to replace the window procedure contents with something like:
Jugoslav
What you need to do is to replace the window procedure contents with something like:
CASE(WM_KEYDOWN) !A key is pressed SELECT CASE (wParam) CASE(VK_ESCAPE) !Do something appropriate, e.g. set a global flag. !Do NOT CallWindowProc in this branch because that !will toggle full screen. CASE(VK_RETURN) !Catch return here if you need. Take care to !Test the value of Alt via DFWIN::GetKeyState, because !you don't want to override Alt+Return. CASE DEFAULT !Pass all other keys to QuickWin ThisProc = CallWindowProc(... END SELECT CASE DEFAULT !Pass everything else to QuickWin ThisProc = CallWindowProc(...I'm not sure whether you need to subclass GETHWNDQQ(0) or QWIN$FRAMEWINDOW in context of Standard Graphics -- experiment.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
P.S. I missed your last sentence -- if you want simply to "disable" Escape key, just do nothing in VK_ESCAPE branch.

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