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

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

Accelerator + icon changes

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