title: CEF3 with WINAPI
body: <p>I don't know if the subject of this topic makes sense.
  I've een trying some work around with CEF3. 
  I just started using C++ and I'm having a hard time. Sorry about that.</p>
  
  <p>The initial target is to make the popup window full-screen as described in this topic:  <a href="http://www.magpcss.org/ceforum/viewtopic.php?f=10&amp;t=11706" rel="nofollow">http://www.magpcss.org/ceforum/viewtopic.php?f=10&amp;t=11706</a></p>
  
  <p>I also think that this one is a better approach: <a href="http://magpcss.org/ceforum/viewtopic.php?f=6&amp;t=10772" rel="nofollow">http://magpcss.org/ceforum/viewtopic.php?f=6&amp;t=10772</a>. However, there are no sufficient explanations. 
  What do you think needs to be added in the snippet below in order for the browser to run in a window based from WINAPI.</p>
  
  <pre><code>#include &lt;windows.h&gt;
  // Source taken here: http://www.winprog.org/tutorial/simple_window.html
  
  const char g_szClassName[] = "MultiscreenProject";
  
  // Step 4: the Window Procedure
  LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
      switch(msg) {
          case WM_CLOSE:
              DestroyWindow(hwnd);
          break;
  
          case WM_DESTROY:
              PostQuitMessage(0);
          break;
  
          default:
              return DefWindowProc(hwnd, msg, wParam, lParam);
      }
      return 0;
  }
  
  int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
  
      WNDCLASSEX wc;
      HWND hwnd;
      MSG Msg;
  
      //Full-screen mode
      RECT desktop;
  
      // Get a handle to the desktop window
      const HWND hDesktop = GetDesktopWindow();
  
      // Get the size of screen to the variable desktop
      GetWindowRect(hDesktop, &amp;desktop);
  
      // The top left corner will have coordinates (0,0)
      // and the bottom right corner will have coordinates
      // (horizontal, vertical)
      int horizontal = desktop.right;
      int vertical = desktop.bottom;
  
      //Step 1: Registering the Window Class
      wc.cbSize        = sizeof(WNDCLASSEX);
      wc.style         = 0;
      wc.lpfnWndProc   = WndProc;
      wc.cbClsExtra    = 0;
      wc.cbWndExtra    = 0;
      wc.hInstance     = hInstance;
      wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
      wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
      wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
      wc.lpszMenuName  = NULL;
      wc.lpszClassName = g_szClassName;
      wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);
  
      if( !RegisterClassEx(&amp;wc) ) {
          MessageBox( NULL, "Window Registration Failed!", "Error!", MB_ICONEXCLAMATION | MB_OK );
          return 0;
      }
  
      hwnd = CreateWindowEx(
          0,
          g_szClassName,
          "Multiscreen Project",
          WS_POPUP,
          CW_USEDEFAULT, CW_USEDEFAULT, horizontal, vertical,
          NULL, NULL, hInstance, NULL
      );
  
      if( hwnd == NULL ){
          MessageBox( NULL, "Window Creation Failed!", "Error!", MB_ICONEXCLAMATION | MB_OK );
          return 0;
      }
  
      ShowWindow(hwnd, nCmdShow);
      UpdateWindow(hwnd);
  
      // Step 3: The Message Loop
      while( GetMessage(&amp;Msg, NULL, 0, 0) &gt; 0 ) {
          TranslateMessage(&amp;Msg);
          DispatchMessage(&amp;Msg);
      }
      return Msg.wParam;
  }
  </code></pre>
  
  <p>Thanks a lot.</p>