1 | /* $Id: msgbox.cpp,v 1.2 1999-09-01 19:12:20 phaller Exp $ */
|
---|
2 | /*
|
---|
3 | * Win32 message box function for OS/2
|
---|
4 | *
|
---|
5 | * Copyright 1999 Sander van Leeuwen
|
---|
6 | *
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | *
|
---|
10 | */
|
---|
11 | #include <os2win.h>
|
---|
12 | #include <misc.h>
|
---|
13 | /*****************************************************************************
|
---|
14 | * Name : int WIN32API MessageBoxExA
|
---|
15 | * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
|
---|
16 | * Parameters: HWND hWnd handle of owner window
|
---|
17 | * LPCTSTR lpText address of text in message box
|
---|
18 | * LPCTSTR lpCaption address of title of message box
|
---|
19 | * UINT uType style of message box
|
---|
20 | * WORD wLanguageId language identifier
|
---|
21 | * Variables :
|
---|
22 | * Result : If the function succeeds, the return value is a nonzero menu-item
|
---|
23 | * value returned by the dialog box.
|
---|
24 | * Remark :
|
---|
25 | * Status : UNTESTED STUB
|
---|
26 | *
|
---|
27 | * Author : Patrick Haller [Thu, 1998/02/26 11:55]
|
---|
28 | *****************************************************************************/
|
---|
29 |
|
---|
30 | int WIN32API MessageBoxExA(HWND hWnd,
|
---|
31 | LPCTSTR lpText,
|
---|
32 | LPCTSTR lpCaption,
|
---|
33 | UINT uType,
|
---|
34 | WORD wLanguageId)
|
---|
35 | {
|
---|
36 | dprintf(("USER32:MessageBoxExA (%08xh,%s,%s,%u,%08w) not implemented.\n",
|
---|
37 | hWnd,
|
---|
38 | lpText,
|
---|
39 | lpCaption,
|
---|
40 | uType,
|
---|
41 | wLanguageId));
|
---|
42 |
|
---|
43 | return (MessageBoxA(hWnd,
|
---|
44 | lpText,
|
---|
45 | lpCaption,
|
---|
46 | uType));
|
---|
47 | }
|
---|
48 |
|
---|
49 |
|
---|
50 | /*****************************************************************************
|
---|
51 | * Name : int WIN32API MessageBoxExW
|
---|
52 | * Purpose : The MessageBoxEx function creates, displays, and operates a message box.
|
---|
53 | * Parameters: HWND hWnd handle of owner window
|
---|
54 | * LPCTSTR lpText address of text in message box
|
---|
55 | * LPCTSTR lpCaption address of title of message box
|
---|
56 | * UINT uType style of message box
|
---|
57 | * WORD wLanguageId language identifier
|
---|
58 | * Variables :
|
---|
59 | * Result : If the function succeeds, the return value is a nonzero menu-item
|
---|
60 | * value returned by the dialog box.
|
---|
61 | * Remark :
|
---|
62 | * Status : UNTESTED STUB
|
---|
63 | *
|
---|
64 | * Author : Patrick Haller [Thu, 1998/02/26 11:55]
|
---|
65 | *****************************************************************************/
|
---|
66 |
|
---|
67 | int WIN32API MessageBoxExW(HWND hWnd,
|
---|
68 | LPCWSTR lpText,
|
---|
69 | LPCWSTR lpCaption,
|
---|
70 | UINT uType,
|
---|
71 | WORD wLanguageId)
|
---|
72 | {
|
---|
73 |
|
---|
74 | dprintf(("USER32:MessageBoxExW (%08xh,%x,%x,%u,%08w) not implemented.\n",
|
---|
75 | hWnd,
|
---|
76 | lpText,
|
---|
77 | lpCaption,
|
---|
78 | uType,
|
---|
79 | wLanguageId));
|
---|
80 |
|
---|
81 | return MessageBoxW(hWnd, lpText, lpCaption, uType);
|
---|
82 | }
|
---|
83 |
|
---|
84 |
|
---|
85 | /*****************************************************************************
|
---|
86 | * Name : BOOL WIN32API MessageBoxIndirectW
|
---|
87 | * Purpose : The MessageBoxIndirect function creates, displays, and operates
|
---|
88 | * a message box. The message box contains application-defined
|
---|
89 | * message text and title, any icon, and any combination of
|
---|
90 | * predefined push buttons.
|
---|
91 | * Parameters:
|
---|
92 | * Variables :
|
---|
93 | * Result :
|
---|
94 | * Remark :
|
---|
95 | * Status : UNTESTED STUB
|
---|
96 | *
|
---|
97 | * Author : Patrick Haller [Thu, 1998/02/26 11:55]
|
---|
98 | *****************************************************************************/
|
---|
99 |
|
---|
100 | // @@@PH Win32 BOOL's are casted to INTs
|
---|
101 | INT WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
|
---|
102 | {
|
---|
103 | dprintf(("USER32:MessageBoxIndirectW (%08x) not implemented.\n",
|
---|
104 | lpMsgBoxParams));
|
---|
105 |
|
---|
106 | return (FALSE);
|
---|
107 | }
|
---|
108 |
|
---|
109 |
|
---|
110 | /*****************************************************************************
|
---|
111 | * Name : BOOL WIN32API MessageBoxIndirectA
|
---|
112 | * Purpose : The MessageBoxIndirect function creates, displays, and operates
|
---|
113 | * a message box. The message box contains application-defined
|
---|
114 | * message text and title, any icon, and any combination of
|
---|
115 | * predefined push buttons.
|
---|
116 | * Parameters:
|
---|
117 | * Variables :
|
---|
118 | * Result :
|
---|
119 | * Remark :
|
---|
120 | * Status : UNTESTED STUB
|
---|
121 | *
|
---|
122 | * Author : Patrick Haller [Thu, 1998/02/26 11:55]
|
---|
123 | *****************************************************************************/
|
---|
124 |
|
---|
125 | // @@@PH Win32 BOOL's are casted to INTs
|
---|
126 | INT WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
|
---|
127 | {
|
---|
128 | dprintf(("USER32:MessageBoxIndirectA (%08x) not implemented.\n",
|
---|
129 | lpMsgBoxParams));
|
---|
130 |
|
---|
131 | return (FALSE);
|
---|
132 | }
|
---|
133 | //******************************************************************************
|
---|
134 | //******************************************************************************
|
---|
135 | int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
|
---|
136 | {
|
---|
137 | dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
|
---|
138 | return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
|
---|
139 | }
|
---|
140 | //******************************************************************************
|
---|
141 | //******************************************************************************
|
---|
142 | int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
|
---|
143 | {
|
---|
144 | char *astring1, *astring2;
|
---|
145 | int rc;
|
---|
146 |
|
---|
147 | astring1 = UnicodeToAsciiString((LPWSTR)arg2);
|
---|
148 | astring2 = UnicodeToAsciiString((LPWSTR)arg3);
|
---|
149 | #ifdef DEBUG
|
---|
150 | WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
|
---|
151 | #endif
|
---|
152 | rc = O32_MessageBox(arg1, astring1, astring2, arg4);
|
---|
153 | FreeAsciiString(astring1);
|
---|
154 | FreeAsciiString(astring2);
|
---|
155 | return(rc);
|
---|
156 | }
|
---|
157 | /*****************************************************************************
|
---|
158 | * Name : BOOL WIN32API SysErrorBox
|
---|
159 | * Purpose : Unknown
|
---|
160 | * Parameters: Unknown
|
---|
161 | * Variables :
|
---|
162 | * Result :
|
---|
163 | * Remark : HARDERR like ?
|
---|
164 | * Status : UNTESTED UNKNOWN STUB
|
---|
165 | *
|
---|
166 | * Author : Patrick Haller [Wed, 1998/06/16 11:55]
|
---|
167 | *****************************************************************************/
|
---|
168 |
|
---|
169 | BOOL WIN32API SysErrorBox(DWORD x1,
|
---|
170 | DWORD x2,
|
---|
171 | DWORD x3)
|
---|
172 | {
|
---|
173 | dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
|
---|
174 | x1,
|
---|
175 | x2,
|
---|
176 | x3));
|
---|
177 |
|
---|
178 | return (FALSE); /* default */
|
---|
179 | }
|
---|