title: How to display an image in a win32 application?
body: <p>I'm new to windows in c++ and i can't figure out how to display a image in my window? </p>
  
  <pre><code>LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
  {
  int wmId, wmEvent;
  PAINTSTRUCT ps;
  HDC hdc;
  
  switch (message)
  {
  case WM_COMMAND:
      wmId    = LOWORD(wParam);
      wmEvent = HIWORD(wParam);
      // Parse the menu selections:
      switch (wmId)
      {
      case IDM_ABOUT:
          DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
          break;
      case IDM_EXIT:
          DestroyWindow(hWnd);
          break;
      default:
          return DefWindowProc(hWnd, message, wParam, lParam);
      }
      break;
  case WM_PAINT:
      hdc = BeginPaint(hWnd, &amp;ps);
      //Display an image here.
      EndPaint(hWnd, &amp;ps);
      break;
  case WM_DESTROY:
      PostQuitMessage(0);
      break;
  default:
      return DefWindowProc(hWnd, message, wParam, lParam);
  }
  </code></pre>
  
  <p>I have a .png file on my desktop with the file path of Desktop\Dirt.png. i want to display this on my window at the location of 0,0. I don't know how to do this so any help will be nice. Also a function for this would be helpful.</p>