Queue_Status.cpp
Upload User: dq031136
Upload Date: 2022-08-08
Package Size: 802k
Code Size: 1k
Development Platform:

C++ Builder

  1. #include <genstub.cpp>
  2. // Windows message procedure.
  3. LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  4. {
  5.     switch (uMsg)
  6.     {
  7.             case WM_COMMAND:       /* process menu items */
  8.                     switch ( LOWORD( wParam )  )
  9.                     {
  10.                         case IDM_TEST:  // force a paint to display screen.
  11.                         {
  12.                             TCHAR szBuffer[128];
  13.                             // Show the desktop.
  14.                             HDESK hDesktopObject = GetThreadDesktop( GetCurrentThreadId( ) );
  15.                             wsprintf( szBuffer, "Desktop Object is %x", hDesktopObject );
  16.                             MessageBox( hWnd, szBuffer, "GetThreadDesktop()", MB_OK );
  17.                         }
  18.                         break;
  19.                         case IDM_EXIT:
  20.                               DestroyWindow( hWnd );
  21.                               break;
  22.                     }
  23.                     break;
  24.            case WM_DESTROY:
  25.                     PostQuitMessage( 0 );
  26.                     break;
  27.            default:
  28.                  return (DefWindowProc(hWnd, uMsg, wParam, lParam));
  29.     }
  30.     return (NULL);
  31. }