Thread: Window won't display on button command!?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    still can't get it to work =/
    iv'e switched the project to VC++ now, and have removed the menu.....here is the code that should display the window....everything compiles perfectly, but nothing happens when the button is pressed:

    Code:
    case WM_COMMAND:
    switch(LOWORD(wParam))
    {
    			WORD wID     = LOWORD(wParam);
    			WORD wNotify = HIWORD(wParam);
    
    			if (lParam)
    				switch (wID) // Controls
    				{
    				case 10:
    				LvlEdit(hWnd, level_edit, button, GetModuleHandle(0));
    				if (!LvlEdit(hWnd, level_edit, button, GetModuleHandle(0)))
    						{
    							MessageBox(NULL, "LvlEdit() failed! Commiting suicide...", "Error", MB_OK | MB_ICONERROR);
    							DestroyWindow(hWnd);
    						}
    
    				break;
    
    				}
    			
    			return 0;
    }
    -psychopath

    --EDIT--
    this may be pointless, but here is the code for the button itself:
    Code:
    HWND button;
    button = CreateWindow("BUTTON", "Sprites", WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, 16, 40, 64, 24, menu_box,(HMENU) 10, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE), NULL);
    Last edited by psychopath; 06-22-2004 at 08:17 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL rendering problem
    By JJFMJR in forum Game Programming
    Replies: 8
    Last Post: 08-31-2007, 07:26 PM
  2. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  4. Adding colour & bmps to a Win 32 Window??
    By carey_sizer in forum Windows Programming
    Replies: 4
    Last Post: 09-04-2004, 05:55 PM
  5. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM