/* * main * * Program begins here */ int main (int argc, char *argv[]) { /* --- GTK initialization --- */ gtk_init (&argc, &argv); CreateNotebookWindow ("Tabs on top", GTK_POS_TOP); CreateNotebookWindow ("Tabs on left", GTK_POS_LEFT); CreateNotebookWindow ("Tabs on bottom", GTK_POS_BOTTOM); CreateNotebookWindow ("Tabs on right", GTK_POS_RIGHT); gtk_main (); exit (0); }
HWND bookSetup( ULONG idInitialPage ) { HWND hwndFrame; if( hwndBook ) { hwndFrame = PARENT( hwndBook ); // For some reason it is necessary to restore the notebook before // setting the frame as the active window if the frame is being // restored from a minimized state. WinSetWindowPos( hwndBook, NULLHANDLE, 0, 0, 0, 0, SWP_SHOW | SWP_RESTORE ); WinSetWindowPos( hwndFrame, NULLHANDLE, 0, 0, 0, 0, SWP_SHOW | SWP_RESTORE | SWP_ACTIVATE ); } else { FRAMECDATA fcdata; memset( &fcdata, 0, sizeof fcdata ); fcdata.cb = sizeof( FRAMECDATA ); fcdata.flCreateFlags = FRAME_FLAGS; fcdata.idResources = ID_NBFRAME; hwndFrame = WinCreateWindow( HWND_DESKTOP, WC_FRAME, NULL, WS_ANIMATE, 0, 0, 0, 0, NULLHANDLE, HWND_TOP, ID_NBFRAME, &fcdata, NULL ); if( hwndFrame ) { pfnwpFrame = WinSubclassWindow( hwndFrame, wpNBFrame ); if( pfnwpFrame ) if( CreateNotebookWindow( hwndFrame ) ) WinSetWindowText( hwndFrame, BOOK_TITLE ); else { WinDestroyWindow( hwndFrame ); hwndFrame = NULLHANDLE; } else { WinDestroyWindow( hwndFrame ); Msg( "bookSetup WinSubclassWindow RC(%X)", HWNDERR(hwndFrame) ); hwndFrame = NULLHANDLE; } } else Msg( "bookSetup WinCreateWindow of frame window RC(%X)", HABERR(0)); } if( hwndBook ) TurnToPage( idInitialPage ); return hwndFrame; }