#include //Change the next line to the directory where //your F3C headers are... #define F3CDIR "F3C/" #include F3CDIR"bstring.h" //Uncomment the following line if you want to //have the GUI components automatically //ID themselves. //#define F_AUTOID //Uncomment the following line if you want to //use the GUI controller. //#include F3CDIR"gui_controller_start.h" #include F3CDIR"application.h" #include F3CDIR"form.h" //Uncomment the following line if you want to //use the GUI controller. //#include F3CDIR"gui_controller_end.h" //Declaration for Message Queue... LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM); fFORM Window; int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nShowWindow) { APPLICATION.CreateApp("YourClassName", asNormal | asRedrawOnResize, WindowProcedure); Window.CreateForm("Your Window Title Here", fsUsual, fsNormal); Window.SetSize(460, 360); Window.UpdateForm(); Window.ShowForm(nShowWindow); Window.Center(); //***************************************** //Your other initialisation code goes here. //***************************************** //Start the message queue... F3C_START_MODAL }; //The actual message queue... LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) // Handle the messages { case WM_DESTROY: PostQuitMessage(0); //Send a WM_QUIT to the message queue //And thus quit. break; default: //For messages that we don't deal with return DefWindowProc(hWnd, Message, wParam, lParam); } return DefWindowProc(hWnd, Message, wParam, lParam); };