| 1 | /* $Id: win32class.h,v 1.1 1999-05-24 20:20:04 ktk Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | #ifndef __WIN32CLASS_H__
|
|---|
| 4 | #define __WIN32CLASS_H__
|
|---|
| 5 |
|
|---|
| 6 | //SvL: 18-7-'98, Registers system window classes (button, listbox etc etc)
|
|---|
| 7 | extern "C" {
|
|---|
| 8 | void RegisterSystemClasses(ULONG hModule);
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | class Win32WndClass
|
|---|
| 12 | {
|
|---|
| 13 | public:
|
|---|
| 14 | Win32WndClass(WNDCLASSEXA wndclass, BOOL isUnicode);
|
|---|
| 15 | ~Win32WndClass();
|
|---|
| 16 |
|
|---|
| 17 | ULONG getClassLongA(int index, BOOL isUnicode = FALSE);
|
|---|
| 18 | ULONG getClassLongW(int index)
|
|---|
| 19 | {
|
|---|
| 20 | return getClassLongA(index, TRUE);
|
|---|
| 21 | };
|
|---|
| 22 | WORD getClassWord(int index);
|
|---|
| 23 |
|
|---|
| 24 | ULONG setClassLongA(int index, LONG lNewVal, BOOL isUnicode = FALSE);
|
|---|
| 25 | ULONG setClassLongW(int index, LONG lNewVal)
|
|---|
| 26 | {
|
|---|
| 27 | return setClassLongA(index, lNewVal, TRUE);
|
|---|
| 28 | }
|
|---|
| 29 | WORD setClassWord(int index, WORD wNewVal);
|
|---|
| 30 |
|
|---|
| 31 | ATOM getAtom() { return (ATOM) classAtom; };
|
|---|
| 32 | BOOL getClassInfo(WNDCLASSEXA *wndclass);
|
|---|
| 33 | BOOL getClassInfo(WNDCLASSEXW *wndclass);
|
|---|
| 34 |
|
|---|
| 35 | ULONG getClassName(LPSTR lpszClassName, ULONG cchClassName);
|
|---|
| 36 | ULONG getClassName(LPWSTR lpszClassName, ULONG cchClassName);
|
|---|
| 37 |
|
|---|
| 38 | static void UnregisterClassA(HINSTANCE hinst, LPSTR id);
|
|---|
| 39 |
|
|---|
| 40 | static Win32WndClass *FindClass(HINSTANCE hinst, LPSTR id);
|
|---|
| 41 |
|
|---|
| 42 | private:
|
|---|
| 43 | BOOL isUnicode;
|
|---|
| 44 |
|
|---|
| 45 | //Standard class words/longs
|
|---|
| 46 | ULONG nrExtraClassWords; //GCL_CBCLSEXTRA
|
|---|
| 47 | ULONG nrExtraWindowWords; //GCL_CBWNDEXTRA
|
|---|
| 48 | HBRUSH backgroundBrush; //GCL_HBRBACKGROUND
|
|---|
| 49 | HCURSOR hCursor; //GCL_HCURSOR
|
|---|
| 50 | HICON hIcon; //GCL_HICON
|
|---|
| 51 | HINSTANCE hInstance; //GCL_HMODULE
|
|---|
| 52 | ULONG menuName; //GCL_MENUNAME
|
|---|
| 53 | ULONG menuNameW; //GCL_MENUNAME
|
|---|
| 54 | ULONG windowStyle; //GCL_STYLE
|
|---|
| 55 | WINWNDPROC windowProc; //GCL_WNDPROC
|
|---|
| 56 | ULONG classAtom; //GCW_ATOM
|
|---|
| 57 |
|
|---|
| 58 | ULONG className;
|
|---|
| 59 | ULONG classNameW;
|
|---|
| 60 | HICON hIconSm;
|
|---|
| 61 |
|
|---|
| 62 | //User data class words/longs
|
|---|
| 63 | ULONG *userClassLong;
|
|---|
| 64 |
|
|---|
| 65 | static Win32WndClass *wndclasses;
|
|---|
| 66 | Win32WndClass *next;
|
|---|
| 67 | };
|
|---|
| 68 |
|
|---|
| 69 | #endif //__WIN32CLASS_H__
|
|---|