Toolbar Combo Box and MDI Child windows

Started by
2 comments, last by Aviscowboy1 18 years, 1 month ago
I have been working on an MDI for my "Game Editor" in C++ win 32 language. This will be a 2d interface game editor that will basically fuel my server and game clients. I have all the code I need to build the game editor but here is the problem. I am working on the parent window and creating the tool bar(This I am hard coding with NO MFC). Here is the problem. I cannot get my child windows to do any thing except show my script compiler. I want to allow my child windows to do different things in this MDI. and lastly the most important thing how do I create a "comboBox" (hard coded remember :D) onto the tool bar... this will serve as a drop down menu for my Tile Classes (Land -> Land tiles, NPC -> character tiles) and for my map editor this will be a better way to get my dungeon layers.:D If anyone can tell me how to get my TBstyleS to show the combo box I would appreciate it :D Aviscowboy [Edited by - Aviscowboy1 on March 15, 2006 4:00:49 PM]
Advertisement
ON the mdi child window creation do I have to keep the classes the same on my
MDICREATESTRUCT, LRESULT CALLBACK MDIChildWndProc, and on the window class to create something different for the other child windows?

also does anyone have anything at all on the Combo box for the toolbar?
Quote:Original post by Aviscowboy1
ON the mdi child window creation do I have to keep the classes the same on my
MDICREATESTRUCT, LRESULT CALLBACK MDIChildWndProc, and on the window class to create something different for the other child windows?


No, they can be different.

LRESULT CALLBACK MDIFrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){ switch(message) {   case(WM_COMMAND) : {        int id = LOWORD(wParam);         int event = HIWORD(wParam);        if(id == IDC_EXIT) SendMessage(hWnd, WM_CLOSE, 0, 0);        // Window #1        if(id == IDC_NEW1) {           MDICREATESTRUCT mcs;           mcs.szTitle = "Script Editor";           mcs.szClass = "SCRIPTEDITOR";           mcs.hOwner = basead;           mcs.x = mcs.cx = CW_USEDEFAULT;            mcs.y = mcs.cy = CW_USEDEFAULT;            mcs.style = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW;           SendMessage(hMDIClient, WM_MDICREATE, 0, (LONG)(LPMDICREATESTRUCT)&mcs);          }        // Window #2        if(id == IDC_NEW2) {           MDICREATESTRUCT mcs;           mcs.szTitle = "OpenGL View";           mcs.szClass = "OPENGLVIEW";           mcs.hOwner = basead;           mcs.x = mcs.cx = CW_USEDEFAULT;            mcs.y = mcs.cy = CW_USEDEFAULT;            mcs.style = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW;           SendMessage(hMDIClient, WM_MDICREATE, 0, (LONG)(LPMDICREATESTRUCT)&mcs);          }        // etc.        return DefFrameProc(hWnd, hMDIClient, message, wParam, lParam);       }


Quote:also does anyone have anything at all on the Combo box for the toolbar?


as for the combo box, as I recall correctly since child windows can't be displayed outside the client of the parent, and you are programming your own toolbar and combobox, you might want to look into windowless controls. never used them or programmed them myself (except for ones that stay inside the client area like buttons and stuff), but there is a section about them in MSDN under COM Development.
Thanks Dude,

I got the child windows to work :D and much different stuff to add to it.

This topic is closed to new replies.

Advertisement