Results 1 to 5 of 5

Thread: LoadAccelerators?

  1. #1

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    LoadAccelerators?

    what will happen if i create a win32app without the following line?

    PHP Code:
                hAccelTable LoadAccelerators(hInst"MapCE");

                
    // Main message loop:
                
    while (GetMessage(&msgNULL00)) 
                {
                    if (!
    TranslateAccelerator(msg.hwndhAccelTable, &msg)) 
                    {
                        
    TranslateMessage(&msg);
                        
    DispatchMessage(&msg);
                    }
                }
                return 
    msg.wParam
    Will my app still receive all the window messages?

    regards,

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  3. #3

    Thread Starter
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    That code is generated by the Visual C++, and sure I'll remove when those code is not applicable

    Thx

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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
  •  



Click Here to Expand Forum to Full Width