List of C Examples

Code Display 4-1   	The Hello World Parameters File 	CGetSta : 114

Code Display 4-2   	Inclusion Files and Global Variables 	CGetSta : 118

Code Display 4-3   	Hello World's Process Object 	CGetSta : 119

Code Display 4-4   	Hello World's Application Object 	CGetSta : 122

Code Display 4-5   	Hello World's Primary and View Objects 	CGetSta : 123

Code Display 4-6   	The Hello World Menu 	CGetSta : 125

Code Display 4-7   	The Hello World Dialog Box and Its Triggers 	CGetSta : 127

Code Display 4-8   	Constant and Routine Definition 	CGetSta : 129

Code Display 4-9   	Messages from the View 	CGetSta : 130

Code Display 4-10   	MSG_META_EXPOSED Handler 	CGetSta : 132

Code Display 4-11   	Handlers for MSG_HELLO_- 	CGetSta : 135

Code Display 5-1   	Flag Records and ByteEnums 	CCoding : 143

Code Display 5-2   	GEOS Data Structures 	CCoding : 147

Code Display 5-3   	Using ProcCallFixedOrMovable_cdecl() 	CCoding : 153

Code Display 5-4   	TicTac's New Game Trigger 	CCoding : 175

Code Display 5-5   	Goc Keywords 	CCoding : 183

Code Display 5-6   	Defining Classes 	CCoding : 186

Code Display 5-7   	Defining Messages 	CCoding : 188

Code Display 5-8   	Aliasing Messages 	CCoding : 191

Code Display 5-9   	Declaring Instance Data Fields 	CCoding : 194

Code Display 5-10   	Examples of Instance Data Declarations 	CCoding : 197

Code Display 5-11   	Defining Variable Data 	CCoding : 198

Code Display 5-12   	Variable Data Handlers 	CCoding : 201

Code Display 5-13   	Use of the @noreloc Keyword 	CCoding : 203

Code Display 5-14   	A Class Definition 	CCoding : 206

Code Display 5-15   	Declaring a Method As a Routine 	CCoding : 208

Code Display 5-16   	Declaring Data Resources 	CCoding : 212

Code Display 5-17   	Declaring Objects with @object 	CCoding : 218

Code Display 5-18   	Instantiating an Object 	CCoding : 230

Code Display 6-1   	Defining a Library-the sound.gp File 	CAppl : 258

Code Display 6-2   	Saving Generic Object Options 	CAppl : 270

Code Display 6-3   	Example GEOS.INI File Entries 	CAppl : 272

Code Display 6-4   	EC Macros 	CAppl : 282

Code Display 7-1   	ClipboardItemHeader 	CClipb : 303

Code Display 7-2   	ClipboardItemFormatInfo 	CClipb : 306

Code Display 7-3   	ClipboardQueryArgs and ClipboardRequestArgs 	CClipb : 307

Code Display 7-4   	A Sample Edit Menu 	CClipb : 311

Code Display 7-5   	Handling Clipboard Changes 	CClipb : 313

Code Display 7-6   	GenEditControl Features and Tools 	CClipb : 315

Code Display 7-7   	MSG_META_CLIPBOARD_CUT 	CClipb : 317

Code Display 7-8   	MSG_META_CLIPBOARD_COPY 	CClipb : 318

Code Display 7-9   	MSG_META_CLIPBOARD_PASTE 	CClipb : 320

Code Display 8-1   	Storing Strings in Localizable Resources 	CLocal : 339

Code Display 8-2   	Storing Strings in Localizable Resources 	CLocal : 340

Code Display 9-1   	Adding a Process Object to a GCN List 	CGCN : 360

Code Display 9-2   	Removing a Process from a GCN list 	CGCN : 364

Code Display 9-3   	Creating New Notification Types and Lists 	CGCN : 366

Code Display 9-4   	Adding Yourself to a Custom GCN List 	CGCN : 367

Code Display 9-5   	Using MSG_META_NOTIFY 	CGCN : 368

Code Display 9-6   	MSG_META_NOTIFY_WITH_DATA_BLOCK 	CGCN : 369

Code Display 9-7   	Intercepting an Application Notification Change 	CGCN : 370

Code Display 9-8   	Removing from an Application GCN List 	CGCN : 371

Code Display 10-1   	TicTacApp and TicTacPrimary 	CUIOver : 393

Code Display 10-2   	The TicTac Game Menu 	CUIOver : 395

Code Display 10-3   	The TicTacView Object 	CUIOver : 396

Code Display 10-4   	TicTacBoardClass and TicTacPieceClass 	CUIOver : 398

Code Display 10-5   	Methods of TicTacBoardClass 	CUIOver : 401

Code Display 10-6   	Methods for TicTacPieceClass 	CUIOver : 406

Code Display 11-1   	Sample MSG_META_KBD_CHAR Handler 	CInput : 441

Code Display 11-2   	Delivering Messages to the Focus 	CInput : 455

Code Display 11-3   	Delivering Messages to the Target 	CInput : 459

Code Display 12-1   	Orienting a Composite 	CGeom : 475

Code Display 12-2   	A Complex Dialog Box 	CGeom : 476

Code Display 12-3   	Using Full Justification of Children 	CGeom : 483

Code Display 12-4   	Creating a Reply Bar 	CGeom : 494

Code Display 13-1   	Allocating Single Music Notes 	CSound : 510

Code Display 13-2   	Playing Single Music Notes 	CSound : 512

Code Display 13-3   	Stopping and Freeing a Note 	CSound : 512

Code Display 13-4   	Simple Sound Buffer Example 	CSound : 514

Code Display 13-5   	Preparing and Playing Sound Buffers 	CSound : 517

Code Display 13-6   	Stopping and Freeing a Sound 	CSound : 517

Code Display 15-1   	Allocating and Using a Block 	CMemory : 557

Code Display 16-1   	LMem Usage in GOC 	CLMem : 581

Code Display 16-2   	Example of Chunk Array Usage 	CLMem : 592

Code Display 16-3   	Structure for Element Array Elements 	CLMem : 599

Code Display 16-4   	Allocating a Name Array 	CLMem : 605

Code Display 17-1   	The DiskInfoStruct Structure 	CFile : 621

Code Display 17-2   	Standard FileEnum() Return Structures 	CFile : 660

Code Display 18-1   	VMInfoStruct 	CVM : 692

Code Display 19-1   	CellFunctionParameters 	CDB : 735

Code Display 19-2   	Rectangle 	CDB : 738

Code Display 19-3   	The RangeInsertParams and Point structures 	CDB : 739

Code Display 23-1   	Multi-Page Printing Loop 	CGraph : 835

Code Display 23-2   	GSComment Example 	CGraph : 836

Code Display 23-3   	GString in Visual Monikers 	CGraph : 837

Code Display 23-4   	GString Declared Without Macros 	CGraph : 838

Code Display 23-5   	Statically Declared GString 	CGraph : 839

Code Display 23-6   	Creating a GString Dynamically 	CGraph : 840

Code Display 23-7   	GrDrawGString() in Action 	CGraph : 843

Code Display 23-8   	GrSetGStringPos() In Action 	CGraph : 846

Code Display 23-9   	GrGetGStringElement() In Action 	CGraph : 847

Code Display 24-1   	Color Data Structures 	CShapes : 886

Code Display 24-2   	Hatch Pattern Data 	CShapes : 894

Code Display C-1 	A Library Entry Point 	CLibr : 938

Code Display D-1 	Extracting an Exponent 	CMath : 946

Code Display D-2 	Adding Two FP Numbers 	CMath : 947

Code Display D-3 	Creating a Random Number 	CMath : 951

Code Display D-4 	FloatFloatToAsciiData Structure 	CMath : 953

Code Display D-5 	DateTime Parameters 	CMath : 957

Code Display D-6 	System-defined Float Formats 	CMath : 960

Code Display D-7 	Float Format IDs 	CMath : 962

Code Display D-8 	User-defined Formats 	CMath : 963
