source: trunk/src/user32/win32class.h@ 1540

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

Activate + group box fixes + cleanup changes

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