home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 December
/
PCWorld_2000-12_cd.bin
/
Software
/
Vyzkuste
/
Hackman
/
_SETUP.1
/
splugin.h
< prev
next >
Wrap
Text File
|
2000-07-05
|
2KB
|
72 lines
#define TITLE "SIMPLE PLUGIN!"
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
OPENFILENAME OpenFileName;
char szFileName[MAX_PATH];
char szDirectory[255];
unsigned _int32 instruction;
switch(uMsg)
{
case WM_CREATE:
break;
case WM_COMMAND:
// DestroyWindow(hWnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return(DefWindowProc(hWnd, uMsg, wParam, lParam));
}
return(0L);
}
int WINAPI DLLMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
HWND hWnd;
WNDCLASSEX wc;
RECT rect;
HINSTANCE hInst;
rect.left=20;
rect.top=45;
rect.right=324;
rect.bottom=287;
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, TRUE);
wc.style=CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc=(WNDPROC)WndProc;
wc.cbClsExtra=0;
wc.cbWndExtra=0;
wc.hInstance=hInstance;
wc.hIcon=LoadIcon(hInstance, TITLE);
wc.hCursor=LoadCursor(NULL,IDC_ARROW);
wc.hbrBackground=(HBRUSH)(COLOR_WINDOW+1);
wc.lpszMenuName=TITLE;
wc.lpszClassName=TITLE;
wc.cbSize=sizeof(WNDCLASSEX);
wc.hIconSm=(HICON)LoadImage(hInstance, TITLE, IMAGE_ICON,
16,16,LR_DEFAULTCOLOR);
if(!RegisterClassEx(&wc)) return (FALSE);
hInst=hInstance;
hWnd=CreateWindow(TITLE, TITLE, WS_OVERLAPPEDWINDOW,
rect.left,rect.top,rect.right,rect.bottom,NULL,NULL,hInstance,NULL);
// hWndMain=hWnd;
if(!hWnd) return (FALSE);
ShowWindow(hWnd, SW_SHOWMAXIMIZED);
UpdateWindow(hWnd);
// hMenu = GetMenu(hWnd);
// hDC=GetDC(hWnd);
// bitdepth=GetDeviceCaps(hDC, BITSPIXEL);
// screen_width=GetDeviceCaps(hDC, HORZRES);
// screen_height=GetDeviceCaps(hDC, VERTRES);
}