home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 December / PCWorld_2001-12_cd.bin / Software / Topware / Hackman / _SETUP.1 / Splugin.h < prev    next >
Text File  |  2000-07-05  |  2KB  |  72 lines

  1. #define TITLE "SIMPLE PLUGIN!"
  2.  
  3. LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  4. {
  5.     OPENFILENAME OpenFileName;
  6.     char szFileName[MAX_PATH];
  7.     char szDirectory[255];
  8.     unsigned _int32 instruction;
  9.  
  10.     switch(uMsg)
  11.     {
  12.     case WM_CREATE:
  13.         break;
  14.     case WM_COMMAND:
  15. //        DestroyWindow(hWnd);
  16.         break;
  17.     case WM_DESTROY:
  18.  
  19.         PostQuitMessage(0);
  20.         break;
  21.     default:
  22.         return(DefWindowProc(hWnd, uMsg, wParam, lParam));
  23.     }
  24.     return(0L);
  25. }
  26.  
  27. int WINAPI DLLMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
  28. {
  29.     MSG msg;
  30.     HWND hWnd;
  31.     WNDCLASSEX wc;
  32.     RECT rect;
  33.     HINSTANCE hInst;
  34.  
  35.     rect.left=20;
  36.     rect.top=45;
  37.     rect.right=324;
  38.     rect.bottom=287;
  39.  
  40.     AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, TRUE);
  41.     
  42.     wc.style=CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
  43.     wc.lpfnWndProc=(WNDPROC)WndProc;
  44.     wc.cbClsExtra=0;
  45.     wc.cbWndExtra=0;
  46.     wc.hInstance=hInstance;
  47.     wc.hIcon=LoadIcon(hInstance, TITLE);
  48.     wc.hCursor=LoadCursor(NULL,IDC_ARROW);
  49.     wc.hbrBackground=(HBRUSH)(COLOR_WINDOW+1);
  50.     wc.lpszMenuName=TITLE;
  51.     wc.lpszClassName=TITLE;
  52.     wc.cbSize=sizeof(WNDCLASSEX);
  53.     wc.hIconSm=(HICON)LoadImage(hInstance, TITLE, IMAGE_ICON,
  54.         16,16,LR_DEFAULTCOLOR);
  55.  
  56.     if(!RegisterClassEx(&wc)) return (FALSE);
  57.     hInst=hInstance;
  58.     hWnd=CreateWindow(TITLE, TITLE, WS_OVERLAPPEDWINDOW,
  59.         rect.left,rect.top,rect.right,rect.bottom,NULL,NULL,hInstance,NULL);
  60.     
  61. //    hWndMain=hWnd;
  62.  
  63.     if(!hWnd) return (FALSE);
  64.     ShowWindow(hWnd, SW_SHOWMAXIMIZED);
  65.     UpdateWindow(hWnd);
  66. //    hMenu = GetMenu(hWnd);
  67. //    hDC=GetDC(hWnd);
  68.     
  69. //    bitdepth=GetDeviceCaps(hDC, BITSPIXEL);
  70. //    screen_width=GetDeviceCaps(hDC, HORZRES);
  71. //    screen_height=GetDeviceCaps(hDC, VERTRES);
  72. }