That works fine Vlatko, except I can't see my main window now! :D
Printable View
That works fine Vlatko, except I can't see my main window now! :D
Where did you put this code:
Code:DialogBox(NULL, (LPCTSTR)IDD_DIALOG1, NULL, (DLGPROC)About);
In WM_CREATE
Try putting the code in the WM_SHOWWINDOW event (not sure).Code:The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. The window procedure of the new window receives this message after the window is created, but before the window becomes visible. The message is sent before the CreateWindowEx or CreateWindow function returns.
Houston we have a problem....I added the following:
And got the following errors:Code:case WM_SHOWWINDOW:
{
DialogBox(NULL, (LPCTSTR)IDD_DIALOG1, NULL, (DLGPROC)About);
return 0;
}break;
--------------------Configuration: Win32TrainingApp - Win32 Release--------------------
Compiling...
file.cpp
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(96) : error C2043: illegal break
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(98) : error C2046: illegal case
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(110) : error C2043: illegal break
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(111) : error C2047: illegal default
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(111) : error C2043: illegal break
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(117) : error C2143: syntax error : missing ';' before 'return'
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(118) : error C2143: syntax error : missing ';' before '}'
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(118) : error C2143: syntax error : missing ';' before '}'
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(118) : error C2143: syntax error : missing ';' before '}'
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(127) : error C2143: syntax error : missing ';' before '{'
C:\PROGRAMMER\MICROSOFT VISUAL STUDIO\MyProjects\Win32TrainingApp\file.cpp(127) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.
Win32TrainingApp.exe - 11 error(s), 0 warning(s)