void GUImain( void ) { char buff[256]; char *p; WndMaxDirtyRects = 20; getcmd( buff ); p = buff; while( *p == ' ' ) ++p; if( p[0] == '-' && p[1] == 'n' ) { WndStyle &= ~GUI_GMOUSE; p += 2; } while( *p == ' ' ) ++p; if( p[0] == '-' && p[1] == '1' ) { #ifdef __DOS__ BIOSSetPage( 1 ); // just make sure it works for the debugger #endif p += 2; } WndGadgetInit(); WndInit( "Sample Application" ); WndCreateStatusWindow( &WndColours[GUI_MENU_STANDOUT] ); GUIGetDialogColours( WndDlgColours ); WndStatusText( "Hello World!" ); WndSetIcon( WndMain, &MainIcon ); WndMainMenuProc( WndMain, MENU_OPEN1 ); } // returning starts the events rolling
extern void WPInit( void ) /************************/ { char *rover; bint do_report; char buff[256]; #ifdef TRMEM TRMemOpen(); TRMemRedirect( STDOUT_FILENO ); #endif SamplePath[0] = 0; InitPaths(); rover = getenv( "WPROF" ); if( rover != NULL ) { procCmd( rover ); } getcmd( buff ); do_report = procCmd( buff ); WndInit( "Open Watcom Profiler" ); WPWndInitDone = P_TRUE; InitMADInfo(); WPDipInit(); if( do_report ) { if( GetSampleInfo() ) { ReportSampleInfo(); } exit( 0 ); } }
void DUIInit( void ) { InitScreen(); CmdHistory = WndInitHistory(); SrchHistory = WndInitHistory(); InitToolBar(); InitMemWindow(); InitAboutMessage(); InitIOWindow(); InitMenus(); WndInit( LIT_DUI( The_WATCOM_Debugger ) ); _SwitchOff( SW_ERROR_STARTUP ); #if defined(__GUI__) TellWinHandle(); #endif if( WndMain != NULL ) WndSetIcon( WndMain, &MainIcon ); StartTimer(); InitHelp(); InitGadget(); InitPaint(); InitBrowse(); InitFont(); }