source: trunk/src/user32/new/win32dlg.h@ 822

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

Dialog changes

File size: 2.8 KB
Line 
1/* $Id: win32dlg.h,v 1.4 1999-09-04 19:42:29 sandervl Exp $ */
2/*
3 * Win32 Dialog Code for OS/2
4 *
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#ifndef __WIN32DLG_H__
13#define __WIN32DLG_H__
14
15#include <win32wbase.h>
16
17#ifdef __cplusplus
18
19#define DF_END 0x0001
20
21 /* Dialog control information */
22typedef struct
23{
24 DWORD style;
25 DWORD exStyle;
26 DWORD helpId;
27 INT x;
28 INT y;
29 INT cx;
30 INT cy;
31 UINT id;
32 LPCSTR className;
33 LPCSTR windowName;
34 LPVOID data;
35} DLG_CONTROL_INFO;
36
37/* Dialog template */
38typedef struct
39{
40 DWORD style;
41 DWORD exStyle;
42 DWORD helpId;
43 UINT nbItems;
44 INT x;
45 INT y;
46 INT cx;
47 INT cy;
48 LPCSTR menuName;
49 LPCSTR className;
50 LPCSTR caption;
51 WORD pointSize;
52 WORD weight;
53 BOOL italic;
54 LPCSTR faceName;
55 BOOL dialogEx;
56} DLG_TEMPLATE;
57
58class Win32Dialog : public Win32BaseWindow
59{
60public:
61 Win32Dialog(HINSTANCE hInst, LPCSTR dlgTemplate, HWND owner,
62 DLGPROC dlgProc, LPARAM param, BOOL isUnicode);
63
64virtual ~Win32Dialog();
65
66 LRESULT DefDlgProcA(UINT Msg, WPARAM wParam, LPARAM lParam);
67 LRESULT DefDlgProcW(UINT Msg, WPARAM wParam, LPARAM lParam);
68
69 LRESULT DefDlg_Epilog(UINT msg, BOOL fResult);
70
71virtual ULONG MsgOS2Create(HWND hwndOS2, ULONG initParam);
72
73virtual LONG SetWindowLongA(int index, ULONG value);
74virtual ULONG GetWindowLongA(int index);
75
76protected:
77 BOOL DIALOG_Init(void);
78 BOOL getCharSizeFromDC( HDC hDC, HFONT hFont, SIZE * pSize );
79 BOOL getCharSize( HFONT hFont, SIZE * pSize);
80 LPCSTR parseTemplate( LPCSTR dlgtemplate, DLG_TEMPLATE *result);
81 WORD *getControl(const WORD *p, DLG_CONTROL_INFO *info, BOOL dialogEx);
82 BOOL createControls(LPCSTR dlgtemplate, HINSTANCE hInst);
83
84 LRESULT DefDlg_Proc(UINT msg, WPARAM wParam, LPARAM lParam);
85 BOOL setDefButton(HWND hwndNew );
86 HWND findDefButton();
87 BOOL saveFocus();
88 BOOL restoreFocus();
89 void setFocus(HWND hwndCtrl );
90
91 // values normally contained in the standard dialog words
92 DLGPROC Win32DlgProc; //DWL_WNDPROC
93 ULONG msgResult; //DWL_MSGRESULT
94 ULONG userDlgData; //DWL_USER
95
96 DLG_TEMPLATE dlgInfo;
97 WORD xUnit;
98 WORD yUnit;
99 HWND hwndFocus;
100 HFONT hUserFont;
101 HMENU hMenu;
102 DWORD idResult;
103 DWORD dialogFlags;
104
105private:
106 static BOOL fInitialized;
107 static int xBaseUnit;
108 static int yBaseUnit;
109};
110
111/* Built-in class names (see _Undocumented_Windows_ p.418) */
112#define DIALOG_CLASS_NAME "#32770" /* Dialog */
113#define DIALOG_CLASS_ATOM 32770 /* Dialog */
114
115BOOL DIALOG_Register();
116BOOL DIALOG_Unregister();
117
118#endif //__cplusplus
119
120#endif //__WIN32WND_H__
Note: See TracBrowser for help on using the repository browser.