4c2 Subj : Dialog box To : borland.public.cpp.borlandcpp From : "Rob C. " Date : Wed Oct 22 2003 12:04 pm 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 #include #include 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(); } . 0