source: trunk/src/user32/new/msgbox.cpp@ 577

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

Very preliminary code for Open32 replacement

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