title: DialogBox not rendering correctly?
body: <p>I'm not sure what I'm doing wrong, but here's how it looks (there's no close button, no caption bar):</p>
  
  <p><a href="https://i.stack.imgur.com/t2yMf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t2yMf.png" alt="enter image description here"></a></p>
  
  <p>It looks as if it's not updating/ticking/repainted.</p>
  
  <p>Here's my Resource.rc file:</p>
  
  <pre><code>#include "resource.h"
  #include "windows.h"
  
  #define IDC_STATIC -1
  
  ID_ICON_MAIN ICON "Smile.ico"
  
  ID_DIALOG_ABOUT DIALOG 0, 0, 240, 70
  STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_BORDER
  CAPTION "About"
  FONT 8, "Terminal"
  {
          DEFPUSHBUTTON   "&amp;OK", IDOK, 174, 18, 50, 14
          PUSHBUTTON      "&amp;Cancel", IDCANCEL, 174, 36, 50, 14
          GROUPBOX        "About this program...", IDC_STATIC, 7, 7, 225, 52
          CTEXT           "An example program\r\nBy vexe", IDC_STATIC, 16, 18, 144, 33
  }
  </code></pre>
  
  <p>Changing the styles, caption, font size, etc doesn't change anything. Note that I'm using Windows Classic Theme, changing to the standard Windows 7 doesn't help either so it's not a theme issue.</p>
  
  <p>Here's my window code:</p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #include "resource.h"
  
  INT_PTR WINAPI DialogWndProc(HWND Window, UINT Message,
                               WPARAM WParam, LPARAM LParam)
  {
      INT_PTR Result = TRUE;
  
      switch (Message)
      {
          case WM_INITDIALOG:
          {
              // UpdateWindow(Window); // Doesn't really help. Taking out the case didn't do anything either
          }
          break;
  
          case WM_COMMAND:
          {
              int Command = LOWORD(WParam);
              switch(Command)
              {
                  case IDOK:
                  {
                      EndDialog(Window, IDOK);
                  }
                  break;
  
                  case IDCANCEL:
                  {
                      EndDialog(Window, IDCANCEL);
                  }
                  break;
  
                  default:
                  {
                      Result = FALSE;
                  }
                  break;
              }
          }
          break;
      }
  
      return(Result);
  }
  
  LRESULT WINAPI MainWndProc(HWND Window, UINT Message, 
                             WPARAM WParam, LPARAM LParam)
  {
      LRESULT Result = 0;
  
      switch (Message)
      {
          // (Causes GetMessage to return false)
          case WM_CLOSE:
          {
              DestroyWindow(Window);
          }
          break;
  
          case WM_DESTROY:
          {
              PostQuitMessage(0);
          }
          break;
  
          case WM_COMMAND:
          {
              int Command = LOWORD(WParam);
              switch (Command)
              {
                  case ID_MENU_FILE_EXIT:
                  {
                      PostMessage(Window, WM_QUIT, 0, 0);
                  }
                  break;
  
                  case ID_MENU_HELP_ABOUT:
                  {
                      int Choice = DialogBox(0, MAKEINTRESOURCE(ID_DIALOG_ABOUT), Window, DialogWndProc);
                      switch (Choice)
                      {
                          case IDOK: MessageBox(Window, "Okay!", "OK", MB_OK | MB_ICONINFORMATION); break;
                          case IDCANCEL: MessageBox(Window, "Canceled!", "Cancel", MB_OK | MB_ICONINFORMATION); break;
                      }
                  }
                  break;
              }
          }
          break;
  
          case WM_CREATE:
          {
              HMENU Menu;
              HMENU SubMenu;
  
              // Create the main menu
              Menu = CreateMenu();
  
              // Create submenus
              {
                  SubMenu = CreatePopupMenu();
                  AppendMenu(SubMenu, MF_STRING, ID_MENU_FILE_EXIT, "E&amp;xit");
                  AppendMenu(Menu, MF_STRING | MF_POPUP, (UINT_PTR)SubMenu, "&amp;File");
  
                  SubMenu = CreatePopupMenu();
                  AppendMenu(SubMenu, MF_STRING, ID_MENU_HELP_ABOUT, "&amp;About");
                  AppendMenu(Menu, MF_STRING | MF_POPUP, (UINT_PTR)SubMenu, "&amp;Help");
              }
  
              // Set the menu on the window
              SetMenu(Window, Menu);
          }
          break;
  
          default:
          {
              Result = DefWindowProc(Window, Message, WParam, LParam);
          }
      }
  
      return(Result);
  }
  
  int CALLBACK WinMain(HINSTANCE Instance, HINSTANCE Previous, LPSTR CommandLine, int CmdShow)
  {
      // Create window class
      WNDCLASSEX WindowClass = {0};
      WindowClass.cbSize = sizeof(WNDCLASSEX);
      WindowClass.style = CS_HREDRAW | CS_VREDRAW;
      WindowClass.lpfnWndProc = (WNDPROC)MainWndProc;
      WindowClass.hInstance = Instance;
      WindowClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
      WindowClass.lpszMenuName = MAKEINTRESOURCE(ID_MENU_MAIN);
      WindowClass.lpszClassName = "SaedoGames_0";
      WindowClass.hIcon = LoadIcon(Instance, MAKEINTRESOURCE(ID_ICON_MAIN));
      WindowClass.hIconSm = (HICON)LoadImage(0, "Smile.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE);
      RegisterClassEx(&amp;WindowClass);
  
      // Create window
      HWND Window = CreateWindowEx(WS_EX_OVERLAPPEDWINDOW, "SaedoGames_0", "Test Window",
          WS_OVERLAPPEDWINDOW | WS_VISIBLE,
          CW_USEDEFAULT, CW_USEDEFAULT,
          640, 480,
          0, 0,
          Instance, 0
      );
  
      // Show window
      ShowWindow(Window, CmdShow);
      UpdateWindow(Window);
  
      // Message loop
      MSG Msg;
      while (GetMessage(&amp;Msg, Window, 0, 0) &gt; 0)
      {
          TranslateMessage(&amp;Msg);
          DispatchMessage(&amp;Msg);
      }
  
      return(0);
  }
  </code></pre>
  
  <p>Pretty sure I'm missing a simple function call but just not sure what it is. What am I missing?</p>