/*=========================================================== * CCT_test.iwb * Custom Control Tutorial Testing File * PART 04a * Copyright (c)T.L. McCaughn 2011 * This file may be freely shared *============================================================*/ AUTODEFINE "OFF" /* I always use this - personal preference */ $MAIN /* Reguired for this develpoment project not required when making single example file */ $include "windowssdk.inc" /* I always use this - personal preference */ /*----------------SECTION 1---------------------------------- This section contains declarations that will be converted into an include file that User's will use in there applications with the following line: $INCLUDE "myControl.inc" ------------------------------------------------------------*/ '$USE "myControl.lib /* uncomment when converted to include file */ DECLARE EXTERN CreateGageRLM(win as WINDOW,l as INT,t as INT,d as INT,id as UINT ) DECLARE EXTERN ConfigGageRLM(win as WINDOW,style as int,title as string,u as string,rawmin as int,rawmax as int,dialmin as int,dialmax as int,sf as int,id as UINT ) DECLARE EXTERN SetGagePanelColorRLM(win as WINDOW,id as UINT,pnlcolor as UINT) DECLARE EXTERN SetGageDialDarkRLM(win as WINDOW,id as UINT) DECLARE EXTERN SetGagePos1RLM(win as WINDOW,id as UINT,pos as INT) DECLARE EXTERN SetGagePos2RLM(win as WINDOW,id as UINT,pos as INT) const ROUND270B = 1 const ROUND270T = 2 const ROUND270L = 3 const ROUND270R = 4 const ROUND360SGL = 5 const ROUND360DBL = 6 const ROUNDCLOCK12 = 7 const ROUNDCLOCK24 = 8 const ROUND2PENV = 9 const ROUND2PENH = 10 /*=============== END OF SECTION 1 =========================*/ /*----------------SECTION 2--------------------------------- This section contains declarations needed for the test program and the converted example along with any needed initialization -------------------------------------------------------------*/ window main int run /*=============== END OF SECTION 2 ===========================*/ /*----------------SECTION 3----------------------------------- This section creates our test/example parent window and its associated parts --------------------------------------------------------------*/ openwindow main, 0, 0, 880, 780, @CAPTION|@SYSMENU, 0, "Gage Demo", &mainHandler BEGINMENU main MENUTITLE "&File" MENUITEM "Quit", 0, 100 ENDMENU /*=============== END OF SECTION 3 ================================*/ /*----------------SECTION 4--------------------------------------- This section is where we create one or more instances of our control. ------------------------------------------------------------------*/ /*=============== END OF SECTION 4 =================================*/ /*----------------SECTION 5----------------------------------------- This section is where we configure each instance of our control. --------------------------------------------------------------------*/ /*=============== END OF SECTION 5 =================================*/ /*----------------SECTION 6----------------------------------------- This section sets the timer which will update our controls. ---------------------------------------------------------------------*/ STARTTIMER main, 100, 42 run = 1 /*=============== END OF SECTION 6 ===================================*/ /*----------------SECTION 7-------------------------------------------- This section is the idle loop for our test/example program. -----------------------------------------------------------------------*/ WAITUNTIL run = 0 /*=============== END OF SECTION 7 ====================================*/ /*----------------SECTION 8-------------------------------------------- This section is where we do any cleanup and close our test/example program -----------------------------------------------------------------------*/ STOPTIMER main, 42 CLOSEWINDOW main END /*=============== END OF SECTION 8 =====================================*/ /*----------------SECTION 9--------------------------------------------- This section contains the message handler for our test/example program.. -------------------------------------------------------------------------*/ SUB mainHandler(),INT SELECT @MESSAGE CASE @IDCREATE centerwindow main CASE @IDCLOSEWINDOW run = 0 CASE @IDTIMER SELECT @CODE CASE 42 ENDSELECT CASE @IDMENUPICK SELECT @MENUNUM CASE 100 run = 0 ENDSELECT ENDSELECT RETURN 0 ENDSUB /*=============== END OF SECTION 9 =====================================*/