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

 
Output of file : 1101036A contained in archive : CUJ9301.ZIP
/* LISTING 1: A C++ class to encapsulate the MS Windows
WNDCLASS.
*/
#include "windows.h"

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

class MyWndClass
{
public:
MyWndClass (char *, MYWNDPROC, MYHINSTANCE, char *);
void SetCursor (MYHCURSOR hCursor)
{ wndclass.hCursor = hCursor; }
void SetBackground (MYHBRUSH hbrBackground)
{ wndclass.hbrBackground = hbrBackground; }
void SetMenu (char *szMenuName)
{ wndclass.lpszMenuName = szMenuName; }
BOOL RegisterClass (void)
{ return (::RegisterClass (&wndclass)); }

private:
// Default constructor is inaccessible.
MyWndClass (void);
WNDCLASS wndclass;
};

MyWndClass::MyWndClass (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;
}



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

  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/