1 // Created on: 1996-01-26
2 // Created by: PLOTNIKOV Eugeny
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _WNT_WClass_HeaderFile
18 #define _WNT_WClass_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_CString.hxx>
24 #include <Aspect_Handle.hxx>
25 #include <Standard_Address.hxx>
26 #include <MMgt_TShared.hxx>
27 #include <WNT_Uint.hxx>
28 #include <Standard_Integer.hxx>
29 class WNT_ClassDefinitionError;
34 DEFINE_STANDARD_HANDLE(WNT_WClass, MMgt_TShared)
36 //! This class defines a Windows NT window class.
37 //! A window in Windows NT is always created based on a
38 //! window class. The window class identifies the window
39 //! procedure that processes messages to the window. Each
40 //! window class has unique name ( character string ). More
41 //! than one window can be created based on a single window
42 //! class. For example, all button windows in Windows NT
43 //! are created based on the same window class. The window
44 //! class defines the window procedure and some other
45 //! characteristics ( background, mouse cursor shape etc. )
46 //! of the windows that are created based on that class.
47 //! When we create a window, we define additional
48 //! characteristics of the window that are unique to that
49 //! window. So, we have to create and register window
50 //! class before creation of any window. Of course, it's possible
51 //! to create a new window class for each window inside
52 //! the Window class and do not use the WClass at all.
53 //! We implemented this class for sake of flexibility of
55 class WNT_WClass : public MMgt_TShared
61 //! Creates a Windows NT window class and registers it.
62 Standard_EXPORT WNT_WClass(const Standard_CString aClassName, const Standard_Address aWndProc, const WNT_Uint& aStyle, const Standard_Integer aClassExtra = 0, const Standard_Integer aWindowExtra = 0, const Aspect_Handle aCursor = 0, const Aspect_Handle anIcon = 0, const Standard_CString aMenuName = 0);
64 //! Destroys all resources attached to the class
65 Standard_EXPORT ~WNT_WClass();
67 //! Returns address of window procedure.
68 Standard_Address WndProc() const;
70 //! Returns a class name.
71 Standard_CString Name() const;
73 //! Returns a program instance handle.
74 Aspect_Handle Instance() const;
76 friend class WNT_Window;
79 DEFINE_STANDARD_RTTIEXT(WNT_WClass,MMgt_TShared)
84 Standard_CString lpszName;
85 Aspect_Handle hInstance;
86 Standard_Address lpfnWndProc;
97 #include <WNT_WClass.lxx>
103 #endif // _WNT_WClass_HeaderFile