Board index » cppbuilder » Dialog box
Rob C.
![]() CBuilder Developer |
Dialog box2003-10-23 02:04:40 AM cppbuilder109 Application win32 Here is code I copied out of the book, entitled “using a dialog box as your main window.?Everything compiles and links fine, but when I run it, I get . . . “Thread stopped c:\BC5\Robcpp\step04.exe (my path and exe name) Fault access violation at 0x45546d: read of address 0xffffffff? First off let me say that I am a beginner at win32 applications, and dialog boxes especially. The whole problem may be that there is not a resource file in this project, (I don’t know how to add one after I delete the original). ------------------------------------------------------------- #include <owl\applicat.h> #include <owl\framewin.h> #include <owl\dialog.h> class TMyApp : public TApplication { public: TMyApp( char *title ) : TApplication( title ) {} void InitMainWindow(); }; void TMyApp::InitMainWindow() { SetMainWindow( new TFrameWindow( 0, "My App", new TDialog( 0, "DIALOG1"), true )); } int OwlMain( int argc, char *argv[] ) { return TMyApp( "My App" ).Run(); } |