Thread: Switch(LOWORD(wParam) does not work..

  1. #1
    Registered User
    Join Date
    Aug 2010

    Switch(LOWORD(wParam) does not work..

    Hello everyone! I know C++ pretty well, and a command i use often is not working (I'm finally making the switch to GUI programming)

    Here is the code that is not working:
     case WM_COMMAND:
                   case ID_SAVE_ANIM:
                         MessageBox(hwnd, "This feature is not yet implemented", "Error", MB_OK | MB_ICONERROR);
                   case ID_FILE_EXIT:
                        PostMessage(hwnd, WM_CLOSE, 0, 0);
    The IDs:
    #define IDR_MYMENU 101
    #define IDI_MYICON 201
    #define ID_FILE_EXIT 9001
    #define ID_SAVE_ANIM 9002
    #define ID_OPEN_ANIM 9003
    #define ID_FILE_NEW 9004
    #define ID_LOAD_BG 9005
    #define ID_LOAD_FT 9006
    #define ID_CREATE_FT 9007
    #define ID_CANVAS_SIZE 9008
    #define ID_PREFERENCES 9009
    #define ID_README_FILE 9010
    #define ID_UPDATE_CHECK 9011
    #define ID_ABOUT 9012
    #define ID_CLEAR_BG 9013
    what is happening is this:
    if I click "Exit" (ID_FILE_EXIT) it just does the ID_SAVE_ANIM parT (Not implemented thing).

    The full code can be posted upon request. What is wrong? If you need screenshots, i can send some..
    Last edited by pivotraze; 08-09-2010 at 11:52 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > switch(LOWORD(wParam));
    Spot the ; at the end of the line?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 07:48 PM
  2. getline() don't want to work anymore...
    By mikahell in forum C++ Programming
    Replies: 7
    Last Post: 07-31-2006, 10:50 AM
  3. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 10:39 PM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. DLL __cdecl doesnt seem to work?
    By Xei in forum C++ Programming
    Replies: 6
    Last Post: 08-21-2002, 04:36 PM