   MDI?
  I'm currently creating a simple 3D object editor as a bit of extra curriculum.  What I need to do is have the model that you are working on (.X models) displayed in a separate window in DirectX.  Now, I’ve done a bit of DirectX so that isn’t the problem.  The problem is I’m not sure how to create a child window in Win32.  I have had a bit of a Google and found Multiple Document Interface (MDI) but was wondering if I could just use CreateWindowEx Function to create the Window (I don’t want to have to go out and learn all about MDI).  I was just wondering if anybody knew any tutorials on how I can get my Main Window to create and display a Child Window.  Also, what is the go with the different Message Loops?   
  the reason why the message loop typically looks like this: MSG msg; while(GetMessage(&msg, 0, 0, 0)) {    if(!TranslateMDISysAccel(hMDIClient, &msg)) {   TranslateMessage(&msg);   DispatchMessage(&msg);  }   }is because the client window controls the children and any keyboard shortcut accelerators. so say when you press Ctrl + F4 (to close a child window), TranslateMDISysAccel will be called but TranslateMessage and DispatchMessage will not. If you leave out TranslateMDISysAccel in the message loops, pressing Ctrl + F4 will do nothing.to create an MDI child window you can use WM_MDICREATE, CreateWindowEx, or CreateMDIWindow. here is a bare bones MDI sample:#define _WIN32_WINNT 0x0501#define UNICODE#include<windows.h>#include "stdres.h"static HINSTANCE basead;static HWND hMDIFrame;static HWND hMDIClient;static int current = 0; // used to keep track of how many children you've created (ie. Untitled 1, Untitled 2, etc)static LRESULT CALLBACK MDIFrameWndProc(HWND, UINT, WPARAM, LPARAM);static LRESULT CALLBACK MDIChildWndProc(HWND, UINT, WPARAM, LPARAM);int WINAPI WinMain(HINSTANCE handle, HINSTANCE, LPSTR, int){ basead = handle; // register frame window WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX);  wcex.style= CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = MDIFrameWndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance= basead; wcex.hIcon= LoadIcon(basead, IDI_APPLICATION); wcex.hCursor = LoadCursor(0, IDC_ARROW); wcex.hbrBackground= 0; wcex.lpszMenuName = L"IDRES_MENU"; wcex.lpszClassName= L"MDIFRAMEWINDOW"; wcex.hIconSm = 0; RegisterClassEx(&wcex); // register child window wcex.cbSize = sizeof(WNDCLASSEX);  wcex.style= CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = MDIChildWndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = sizeof(int); wcex.hInstance= basead; wcex.hIcon= LoadIcon(basead, IDI_APPLICATION); wcex.hCursor = LoadCursor(0, IDC_ARROW); wcex.hbrBackground= (HBRUSH)GetStockObject(WHITE_BRUSH); wcex.lpszMenuName = 0; wcex.lpszClassName= L"MDICHILDWINDOW"; wcex.hIconSm = 0; RegisterClassEx(&wcex); // now create MDI Frame DWORD style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE; int x = CW_USEDEFAULT; int y = CW_USEDEFAULT; int w = CW_USEDEFAULT; int h = CW_USEDEFAULT; hMDIFrame = CreateWindow(L"MDIFRAMEWINDOW", L"Main Window", style, x, y, w, h, 0, 0, basead, 0); ShowWindow(hMDIFrame, SW_SHOW); UpdateWindow(hMDIFrame); // message loop MSG msg; while(GetMessage(&msg, 0, 0, 0)) {    if(!TranslateMDISysAccel(hMDIClient, &msg)) {   TranslateMessage(&msg);   DispatchMessage(&msg);  }   } }LRESULT CALLBACK MDIFrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){ switch(message) {   case(WM_CREATE) : {   // create client window   CLIENTCREATESTRUCT ccs = { 0, current++ };   DWORD style = WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL;   hMDIClient = CreateWindow(L"MDICLIENT", 0, style, 0, 0, 0, 0, hWnd, (HMENU)0xCAC, basead, (LPSTR)&ccs);   ShowWindow(hMDIClient, SW_SHOW);   return DefFrameProc(hWnd, hMDIClient, message, wParam, lParam);  }   case(WM_COMMAND) : {   // File->New   if(LOWORD(wParam) == IDC_NEW) { MDICREATESTRUCT mcs; mcs.szTitle = L"Untitled"; mcs.szClass = L"MDICHILDWINDOW"; 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);}   // File->Exit   else if(LOWORD(wParam) == IDC_EXIT) SendMessage(hWnd, WM_CLOSE, 0, 0);   return DefFrameProc(hWnd, hMDIClient, message, wParam, lParam);  }   case(WM_DESTROY) : {   PostQuitMessage(0);   break;  }    default: return DefFrameProc(hWnd, hMDIClient, message, wParam, lParam);   } return 0;}LRESULT CALLBACK MDIChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){ return DefMDIChildProc(hWnd, message, wParam, lParam);}stdres.h#ifndef __STDRES_H#define __STDRES_H#include<windows.h>#define IDC_NEW 100#define IDC_EXIT 101#endif // gotta have an endline herestdres.rc#include "stdres.h"IDRES_MENU MENU{ POPUP "&File" {  MENUITEM "&New", IDC_NEW  MENUITEM "E&xit", IDC_EXIT }};Tutorial 9: Child Window ControlsWin32 ProgrammingWelcome to Version 2.0 of theForger's Win32 API TutorialWindows API Tutorials;  Thanks guys for the quick reply.  Looks like I will be doing a bit of reading :-)   