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

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

Moved new user32 here

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