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

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

Use shared memory for class & window objects

File size: 2.5 KB
Line 
1/* $Id: win32class.h,v 1.5 1999-08-28 14:09:30 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 BOOL hasClassName(LPSTR classname, BOOL fUnicode = 0);
56
57 static void UnregisterClassA(HINSTANCE hinst, LPSTR id);
58
59 static Win32WndClass *FindClass(HINSTANCE hinst, LPSTR id);
60
61private:
62 BOOL isUnicode;
63
64 //Standard class words/longs
65 ULONG nrExtraClassWords; //GCL_CBCLSEXTRA
66 ULONG nrExtraWindowWords; //GCL_CBWNDEXTRA
67 HBRUSH backgroundBrush; //GCL_HBRBACKGROUND
68 HCURSOR hCursor; //GCL_HCURSOR
69 HICON hIcon; //GCL_HICON
70 HINSTANCE hInstance; //GCL_HMODULE
71 PCHAR menuNameA; //GCL_MENUNAME
72 WCHAR *menuNameW; //GCL_MENUNAME
73 ULONG windowStyle; //GCL_STYLE
74 WNDPROC windowProc; //GCL_WNDPROC
75 ULONG classAtom; //GCW_ATOM
76
77 PCHAR classNameA;
78 WCHAR *classNameW;
79 HICON hIconSm;
80
81 //User data class words/longs
82 ULONG *userClassLong;
83
84 //nr of windows created with this class
85 ULONG cWindows;
86
87 static GenericObject *wndclasses;
88};
89
90#endif //__WIN32CLASS_H__
Note: See TracBrowser for help on using the repository browser.