source: trunk/src/user32/new/win32class.h@ 614

Last change on this file since 614 was 614, checked in by sandervl, 26 years ago

Erase background changes

File size: 2.4 KB
Line 
1/* $Id: win32class.h,v 1.4 1999-08-22 08:30:52 sandervl Exp $ */
2/*
3 * Win32 Window Class Managment Code for OS/2
4 *
5 *
6 * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 */
9#ifndef __WIN32CLASS_H__
10#define __WIN32CLASS_H__
11
12#include <gen_object.h>
13
14class Win32WndClass : public GenericObject
15{
16public:
17 Win32WndClass(WNDCLASSEXA *wndclass, BOOL isUnicode = FALSE);
18 ~Win32WndClass();
19
20 ULONG getClassLongA(int index, BOOL isUnicode = FALSE);
21 ULONG getClassLongW(int index)
22 {
23 return getClassLongA(index, TRUE);
24 };
25 WORD getClassWord(int index);
26
27 ULONG setClassLongA(int index, LONG lNewVal, BOOL isUnicode = FALSE);
28 ULONG setClassLongW(int index, LONG lNewVal)
29 {
30 return setClassLongA(index, lNewVal, TRUE);
31 }
32 WORD setClassWord(int index, WORD wNewVal);
33
34 ATOM getAtom() { return (ATOM) classAtom; };
35 BOOL getClassInfo(WNDCLASSEXA *wndclass);
36 BOOL getClassInfo(WNDCLASSEXW *wndclass);
37
38 ULONG getClassName(LPSTR lpszClassName, ULONG cchClassName);
39 ULONG getClassName(LPWSTR lpszClassName, ULONG cchClassName);
40
41 WNDPROC getWindowProc() { return windowProc; };
42 LPSTR getMenuNameA() { return menuNameA; };
43 DWORD getExtraWndWords() { return nrExtraWindowWords; };
44
45 HICON getIcon() { return hIcon; };
46
47 HBRUSH getBackgroundBrush() { return backgroundBrush; };
48
49 void setMenuName(LPSTR newMenuName);
50
51 void IncreaseWindowCount() { cWindows++; };
52 void DecreaseWindowCount() { cWindows--; };
53 DWORD GetWindowCount() { return cWindows; };
54
55 static void UnregisterClassA(HINSTANCE hinst, LPSTR id);
56
57 static Win32WndClass *FindClass(HINSTANCE hinst, LPSTR id);
58
59private:
60 BOOL isUnicode;
61
62 //Standard class words/longs
63 ULONG nrExtraClassWords; //GCL_CBCLSEXTRA
64 ULONG nrExtraWindowWords; //GCL_CBWNDEXTRA
65 HBRUSH backgroundBrush; //GCL_HBRBACKGROUND
66 HCURSOR hCursor; //GCL_HCURSOR
67 HICON hIcon; //GCL_HICON
68 HINSTANCE hInstance; //GCL_HMODULE
69 PCHAR menuNameA; //GCL_MENUNAME
70 WCHAR *menuNameW; //GCL_MENUNAME
71 ULONG windowStyle; //GCL_STYLE
72 WNDPROC windowProc; //GCL_WNDPROC
73 ULONG classAtom; //GCW_ATOM
74
75 PCHAR classNameA;
76 WCHAR *classNameW;
77 HICON hIconSm;
78
79 //User data class words/longs
80 ULONG *userClassLong;
81
82 //nr of windows created with this class
83 ULONG cWindows;
84
85 static GenericObject *wndclasses;
86};
87
88#endif //__WIN32CLASS_H__
Note: See TracBrowser for help on using the repository browser.