BUG: Default Dialog-Based Application Doesn't Work in Win32s (138971)
The information in this article applies to:
- The AppWizard, when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
This article was previously published under Q138971 SYMPTOMS
A dialog-based application generated using AppWizard will not run properly
under Win32s.
CAUSE
When AppWizard generates a dialog-based application, it uses a DIALOGEX
resource for the main dialog. Win32s, however, does not support DIALOGEX
resources. As a result, the dialog box looks incorrect on Win32s. This
problem is documented in the Vcread.wri file that ships with Visual C++
version 4.0 and 4.1.
RESOLUTION
To get your dialog-based application working in Win32s, you must change
the DIALOGEX resource to a DIALOG resource, and remove the WS_EX_APPWINDOW
style. This can be done as follows: - Open the .rc file as a text file
- Search for the DIALOGEX statement and change DIALOGEX to DIALOG.
- Remove the line containing the extended style WS_EX_APPWINDOW for this
dialog box.
- In OnInitDialog() for the main dialog, add the extended style by
adding the following line:
ModifyStyleEx(0, WS_EX_APPWINDOW);
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as soon as it
becomes available.
Visual C++ versions 4.2 and later do not support building Win32s
applications.
REFERENCES
Visual C++ version 4.0 Vcread.wri file.
Modification Type: | Major | Last Reviewed: | 10/24/2003 |
---|
Keywords: | kbBug kbProgramming kbui kbwizard KB138971 |
---|
|