title: how to create window without border and with shadow like github app?
body: <p>how to create window which does't have border but it  has behaves like with border . like git-hub app window, it has shadow effect also.how to create window like this.<br>
  thank you. using  win 32 c++.</p>
  
  <p>i had tried by handling wm_Ncpaint call but no use.</p>
  
  <pre><code>        #include "stdafx.h"
          #include "CustomWindow.h"
  
          LONG_PTR g_lpCustomWindowptr = NULL;
          BOOL g_bStateofWindow = TRUE;
  
          // creating window 
          CreateWindowEx(WS_EX_ACCEPTFILES,
                         szWindowClass,
                         szTitle,
                         WS_OVERLAPPEDWINDOW,
                         CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL,
                         NULL, hInstance, NULL);
  
          void CustomWindow::CreateCustomWindow(HWND hwnd)
          {
              // To set border and handling Doc with default cases
              LONG_PTR lpStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
  
              lpStyle &amp;= ~(WS_CAPTION | WS_ACTIVECAPTION );
  
              //lpStyle |= WS_THICKFRAME;
  
              SetWindowLongPtr(hwnd, GWL_STYLE, lpStyle);
  
              //set the customized proc.
              g_lpCustomWindowptr = SetWindowLongPtr(hwnd,
                  GWLP_WNDPROC,
                  (LONG_PTR)CustonWindow_WndProc);
          }
  
          LRESULT CALLBACK CustomWindow::CustonWindow_WndProc(IN HWND hwnd, 
                                                              IN UINT message, 
                                                              IN WPARAM wParam, 
                                                              IN LPARAM lParam)
          {
              switch (message)
              {
              case WM_SIZE:   
                  {           
                      if (SIZE_MAXIMIZED == wParam)
                      {           
                          HMONITOR hmon= MonitorFromWindow(hwnd, 
                              MONITOR_DEFAULTTONEAREST);
  
                          MONITORINFO moninfo = {0};
  
                          moninfo.cbSize= sizeof(moninfo);
  
                          GetMonitorInfo(hmon, &amp;moninfo);
  
                          SetWindowPos(hwnd,
                              HWND_TOP, 
                              moninfo.rcWork.left,            
                              moninfo.rcWork.top,
                              moninfo.rcWork.right,
                              moninfo.rcWork.bottom, 
                              SWP_FRAMECHANGED | 
                              SWP_NOREDRAW);
                      }
                  }
                  break;
              case WM_NCACTIVATE :
                  {
                      if (TRUE == wParam)
                      {
  
                          SendMessage(hwnd,WM_NCPAINT,wParam,0);
  
                      }
                      else if(FALSE == wParam )
                      {
                          SendMessage(hwnd,WM_NCPAINT,wParam,0);
  
                      }
                      return true;
                  }
              case WM_NCCALCSIZE:
                  {   
                      return 0;
                  }
                  break;
  
              case  WM_NCPAINT:
                  {
                      HDC hDC;
  
                      hDC = GetWindowDC(hwnd);
  
                      HPEN hPen = CreatePen(PS_SOLID, 5, RGB(0,0,255));; 
  
                      SelectObject(hDC, hPen);
  
                      RECT rcClientRect = {0};
  
                      GetClientRect(hwnd,&amp;rcClientRect);
  
                      if(FALSE == wParam)
                      {
                          MoveToEx(hDC,rcClientRect.left,rcClientRect.top,NULL);
  
                          LineTo(hDC,rcClientRect.right - 1,rcClientRect.top );
  
                          LineTo(hDC,rcClientRect.right - 1,rcClientRect.bottom - 1 );
  
                          LineTo(hDC,rcClientRect.left,rcClientRect.bottom - 1);
  
                          LineTo(hDC,rcClientRect.left,rcClientRect.top);
                      }
                      else
                      {
                          HPEN hPen1 = CreatePen(PS_SOLID, 5, RGB(255,0,0));; 
  
                          SelectObject(hDC, hPen1);
  
                          MoveToEx(hDC,rcClientRect.left,rcClientRect.top,NULL);
  
                          LineTo(hDC,rcClientRect.right - 1,rcClientRect.top );
  
                          LineTo(hDC,rcClientRect.right - 1,rcClientRect.bottom - 1 );
  
                          LineTo(hDC,rcClientRect.left,rcClientRect.bottom - 1);
  
                          LineTo(hDC,rcClientRect.left,rcClientRect.top);
                      }
                      ReleaseDC(hwnd, hDC);
                  }               
  
  
              }
              break;
  
  
  
  
          }
          return  CallWindowProc((WNDPROC)g_lpCustomWindowptr,
                                 hwnd, 
                                 message, 
                                 wParam, 
                                 lParam);
          }
  </code></pre>