Category : Files from Magazines
Archive   : CUJ9301.ZIP
Filename : 1101036B

 
Output of file : 1101036B contained in archive : CUJ9301.ZIP
/* LISTING 2: C functions to encapsulate the MS Windows
WNDCLASS.
*/
#include "windows.h"

typedef int BOOL;
typedef WNDCLASS MYWCLASS;
typedef WNDPROC MYWNDPROC;
typedef HINSTANCE MYHINSTANCE;
typedef HCURSOR MYHCURSOR;
typedef HBRUSH MYHBRUSH;

void WCL_Init (MYWCLASS *wndclass, char *szAppName,
MYWNDPROC WndProc, MYHINSTANCE hInstance,
char *szMenuName)
{
wndclass->style = CS_HREDRAW | CS_VREDRAW;
wndclass->lpfnWndProc = WndProc;
wndclass->cbClsExtra = 0;
wndclass->cbWndExtra = 0;
wndclass->hInstance = hInstance;
wndclass->hIcon = LoadIcon (NULL, IDI_APPLICATION);
wndclass->hCursor = LoadCursor (NULL, IDC_ARROW);
wndclass->hbrBackground =
GetStockObject (WHITE_BRUSH);
wndclass->lpszMenuName = szMenuName;
wndclass->lpszClassName = szAppName;
}

void WCL_SetCursor (MYWCLASS *wndclass,
MYHCURSOR hCursor)
{
wndclass->hCursor = hCursor;
}

void WCL_SetBackground (MYWCLASS *wndclass,
MYHBRUSH hbrBackground)
{
wndclass->hbrBackground = hbrBackground;
}

void WCL_SetMenu (MYWCLASS *wndclass, char *szMenuName)
{
wndclass->lpszMenuName = szMenuName;
}

BOOL WCL_RegisterClass (MYWCLASS *wndclass)
{
return (RegisterClass (wndclass));
}




  3 Responses to “Category : Files from Magazines
Archive   : CUJ9301.ZIP
Filename : 1101036B

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/