Making a new window from a menu option

This is a discussion on Making a new window from a menu option within the Windows Programming forums, part of the Platform Specific Boards category; I'm wondering how I can make a new window appearing after clicking on an option from a menu. Perhaps it ...

  1. #1
    LD_Dreamer
    Guest

    Making a new window from a menu option

    I'm wondering how I can make a new window appearing after clicking on an option from a menu. Perhaps it could access a whole new window class. In theory something like:

    if(menu_ID==clicked){activate(window_ID);}

    Since I don't know much Win32, please give me the actual code for this purpose.

  2. #2
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    go to www.winprog.org. you'll benefit more than asking how to do things like [what you asked] before knowing anything else.

  3. #3
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    but anyhow, you need to handle it under WM_COMMAND. and to create a window:

    http://msdn.microsoft.com/library/de...tewindowex.asp

    Code:
    case WM_COMMAND:
    			switch(LOWORD(wParam))
    			{
    				case ID_FILE_EXIT:
    					PostMessage(hwnd, WM_CLOSE, 0, 0);
    				break;
    				case ID_STUFF_WINDOW:
    					//Code here for window with the link i provided
    				break;
    			}
    //this is an example, you'll need to change it to implement it as 
    //you probably know
    Last edited by Leeman_s; 12-28-2002 at 08:13 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Window menu Probem
    By elwad in forum Windows Programming
    Replies: 5
    Last Post: 05-11-2009, 03:14 AM
  2. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 06:57 PM
  3. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 07:14 AM
  4. My Window Class
    By Epo in forum Game Programming
    Replies: 2
    Last Post: 07-10-2005, 02:33 PM
  5. Window menu question
    By axr0284 in forum Windows Programming
    Replies: 0
    Last Post: 03-08-2005, 08:01 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21