source: trunk/src/user32/msgbox.cpp@ 1036

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

David Raison partially implemented MessageBoxIndirectA/W

File size: 6.5 KB
Line 
1/* $Id: msgbox.cpp,v 1.2 1999-09-19 08:24:47 sandervl 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
30int 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
67int 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
101INT WIN32API MessageBoxIndirectW(LPMSGBOXPARAMSW lpMsgBoxParams)
102{
103 dprintf(("USER32:MessageBoxIndirectW (%08x) partially implemented.\n",
104 lpMsgBoxParams));
105
106 return (MessageBoxW(lpMsgBoxParams->hwndOwner,
107 lpMsgBoxParams->lpszText,
108 lpMsgBoxParams->lpszCaption,
109 lpMsgBoxParams->dwStyle));
110}
111
112
113/*****************************************************************************
114 * Name : BOOL WIN32API MessageBoxIndirectA
115 * Purpose : The MessageBoxIndirect function creates, displays, and operates
116 * a message box. The message box contains application-defined
117 * message text and title, any icon, and any combination of
118 * predefined push buttons.
119 * Parameters:
120 * Variables :
121 * Result :
122 * Remark :
123 * Status : UNTESTED STUB
124 *
125 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
126 *****************************************************************************/
127
128// @@@PH Win32 BOOL's are casted to INTs
129INT WIN32API MessageBoxIndirectA(LPMSGBOXPARAMSA lpMsgBoxParams)
130{
131 dprintf(("USER32:MessageBoxIndirectA (%08x) partially implemented.\n",
132 lpMsgBoxParams));
133
134 return (MessageBoxA(lpMsgBoxParams->hwndOwner,
135 lpMsgBoxParams->lpszText,
136 lpMsgBoxParams->lpszCaption,
137 lpMsgBoxParams->dwStyle));
138}
139//******************************************************************************
140//******************************************************************************
141int WIN32API MessageBoxA(HWND hwndOwner, LPCTSTR lpszText, LPCTSTR lpszTitle, UINT fuStyle)
142{
143 dprintf(("USER32: MessageBoxA %s %s\n", lpszText, lpszTitle));
144 return(O32_MessageBox(hwndOwner, lpszText, lpszTitle, fuStyle));
145}
146//******************************************************************************
147//******************************************************************************
148int WIN32API MessageBoxW(HWND arg1, LPCWSTR arg2, LPCWSTR arg3, UINT arg4)
149{
150 char *astring1, *astring2;
151 int rc;
152
153 astring1 = UnicodeToAsciiString((LPWSTR)arg2);
154 astring2 = UnicodeToAsciiString((LPWSTR)arg3);
155#ifdef DEBUG
156 WriteLog("USER32: MessageBoxW %s %s\n", astring1, astring2);
157#endif
158 rc = O32_MessageBox(arg1, astring1, astring2, arg4);
159 FreeAsciiString(astring1);
160 FreeAsciiString(astring2);
161 return(rc);
162}
163/*****************************************************************************
164 * Name : BOOL WIN32API SysErrorBox
165 * Purpose : Unknown
166 * Parameters: Unknown
167 * Variables :
168 * Result :
169 * Remark : HARDERR like ?
170 * Status : UNTESTED UNKNOWN STUB
171 *
172 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
173 *****************************************************************************/
174
175BOOL WIN32API SysErrorBox(DWORD x1,
176 DWORD x2,
177 DWORD x3)
178{
179 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n",
180 x1,
181 x2,
182 x3));
183
184 return (FALSE); /* default */
185}
Note: See TracBrowser for help on using the repository browser.