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

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

Very preliminary code for Open32 replacement

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