|
-
Oct 2nd, 2001, 10:40 AM
#1
Thread Starter
PowerPoster
LoadAccelerators?
what will happen if i create a win32app without the following line?
PHP Code:
hAccelTable = LoadAccelerators(hInst, "MapCE");
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
Will my app still receive all the window messages?
regards,
-
Oct 2nd, 2001, 11:04 AM
#2
You can leave the LoadAccelerators out, but your window then won't react to accelerator keys (like ctrl+s to save in most programs). Also, you would have to leave the if(!TranslateAccelerator(...)) out (hAccelTable wouldn't be initialized).
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 2nd, 2001, 11:08 AM
#3
Thread Starter
PowerPoster
That code is generated by the Visual C++, and sure I'll remove when those code is not applicable
Thx
-
Oct 2nd, 2001, 12:18 PM
#4
Monday Morning Lunatic
Huh? I wasn't aware Visual C++ generated skeleton raw apps for you...is this new in VC6 or something?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Oct 2nd, 2001, 04:01 PM
#5
no I think he used the "Hello, World" app
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|