MiniGUI Programming Guide

MiniGUI Programming Guide
Version 2.0 (revised edition 4)
For MiniGUI Version 2.0.4/1.6.10
Beijing Feynman Software Technology Co. Ltd.
August, 2007

MiniGUI Programming Guide V2.0-4
I
Introduction
MiniGUI, developed by Beijing Feynman Software Technology Co. Ltd.,
originates from a world famous free software project, which is initiated by Wei
Yongming. MiniGUI aims to provide a fast, stable and lightweight graphics user
interface (GUI) support system for real-time embedded systems. MiniGUI is “a
cross-operating-system graphics user interface support system for embedded
devices”, and “an embedded graphics middleware”; it can run on Linux/uClinux,
eCos, VxWorks, pSOS, ThreadX, Nucleus, OSE, and even uC/OS-II, also on
Win32 platform.
Currently, the latest freely downloadable stable releases (GPL releases) of
MiniGUI are MiniGUI-STR V1.6.2 and MiniGUI V1.3.3. The source code,
development documents and sample programs are available from the download
area (http://www.minigui.com/download/index.shtml) of the website of
Beijing Feynman software Technology Co. Ltd. It should be noted that the
freely downloadable MiniGUI could be only used for developing GPL or other
application software with open source code. If you are using MiniGUI for
developing commercial, proprietary, or other software not covered by the
terms listed in GPL, you must have a commercial license for MiniGUI. Beijing
Feynman software Technology Co. Ltd. will provide the latest value-added
release and related porting and development technology support service for
the users who have buy the MiniGUI commercial licenses.
This guide describes in detail the foundation knowledge of MiniGUI
V2.0.4/1.6.10 on developing embedded application software, technical
documents and development skills, the content of which involves various
aspects of MiniGUI programming, include message looping, window procedure,
dialog box, controls, graphics interfaces, and so on. Please refer to MiniGUI
API Reference for complete description of MiniGUI APIs (Application
Programming Interfaces).
MiniGUI Programming Guide V2.0-4
II
Copyright Claim
MiniGUI Programming Guide Version 2.0 (revised edition 4) for MiniGUI Ver
2.0.4/1.6.10.
Copyright © 2003~2007, Beijing Feynman Software Technology Co., Ltd.
All rights reserved.
By whatever means you get the entire or partial text or
photograph data in this guide, no matter mechanical or
electronic, you are only authorized by Beijing Feynman
Software Technology Co., Ltd. the reading right. Any format
conversion, redistribution, dissemination, and copying its
entire or partial content, or using text or photograph therein
for commercial purpose without written permission will be
regarded as tortuous, and may result in severe civil or criminal
punishment.
MiniGUI Programming Guide V2.0-4
III
Contents
Introduction .................................................................................... I
Copyright Claim .............................................................................. II
1 Preface ....................................................................................... 1
1.1 Relevant Documents.............................................................................1
1.2 Organization of this Guide .....................................................................2
1.3 Obtaining Samples of the Guide .............................................................3
1.4 Compiling and Running Environment of Samples........................................4
1.5 Copyright and Licensing ........................................................................5
I Foundation of MiniGUI Programming ....................................... 7
2 Beginning MiniGUI Programming ..................................................... 9
2.1 Basic Programming Concepts .................................................................9
2.1.1 Event Driven Programming................................................ 9
2.1.2 Three Runtime Modes of MiniGUI......................................... 10
2.2 A Simple MiniGUI Program................................................................... 12
2.2.1 Header Files ........................................................... 14
2.2.2 Entrance of the Program................................................ 15
2.2.3 Join a Layer in MiniGUI-Processes ..................................... 15
2.2.4 Creating and Showing Main Window ...................................... 16
2.2.5 Entering Message Loop.................................................. 18
2.2.6 Window Procedure Function.............................................. 20
2.2.7 Screen Output .......................................................... 21
2.2.8 Exit of the Program.................................................... 21
2.3 Compiling, Linking and Running............................................................ 22
2.3.1 Compiling MiniGUI Program.............................................. 22
2.3.2 Function Libraries of MiniGUI.......................................... 23
2.4 Writing Automake/Autoconf Scripts for MiniGUI Application ....................... 23
3 Window and Message ...................................................................31
3.1 Window System and Window................................................................ 31
3.1.1 What Is Window System.................................................. 31
3.1.2 Concept of Window ...................................................... 32
3.2 Window of MiniGUI ............................................................................. 33
3.2.1 Window Type ............................................................ 33
MiniGUI Programming Guide V2.0-4
IV
3.2.2 Main Window ............................................................ 35
3.2.3 Window Style ........................................................... 36
3.2.4 Destroying Main Window................................................. 37
3.2.5 Dialog Box ............................................................. 38
3.2.6 Control and Control Class.............................................. 38
3.2.7 Input Method Window.................................................... 41
3.3 Message and Message Handling ............................................................ 43
3.3.1 Message ................................................................ 43
3.3.2 Message Type ........................................................... 45
3.3.3 Message Queue .......................................................... 45
3.3.4 Message Handling ....................................................... 47
3.3.5 Sending and Posting Message............................................ 49
3.3.6 Message Handling Function Specific to MiniGUI-Processes ............... 51
3.4 Several Important Messages and Corresponding Handling ......................... 52
3.4.1 MSG_NCCREATE ........................................................... 53
3.4.2 MSG_SIZECHANGING ....................................................... 53
3.4.3 MSG_SIZECHANGED and MSG_CSIZECHANGED .................................. 54
3.4.4 MSG_CREATE ............................................................. 54
3.4.5 MSG_FONTCHANGING ....................................................... 55
3.4.6 MSG_FONTCHANGED ........................................................ 55
3.4.7 MSG_ERASEBKGND ......................................................... 56
3.4.8 MSG_PAINT .............................................................. 57
3.4.9 MSG_CLOSE .............................................................. 58
3.4.10 MSG_DESTROY ........................................................... 58
3.5 Common Window Operation Functions ................................................... 59
4 Foundation of Dialog Box Programming ...........................................63
4.1 Main Window and Dialog Box ............................................................... 63
4.2 Dialog Box Template........................................................................... 63
4.3 Dialog Box Callback Function ............................................................... 65
4.4 MSG_INITDIALOG Message.................................................................. 66
4.5 Modal and Modeless Dialog Box ............................................................ 68
4.6 Control Styles and Operations Relevant to Dialog Box............................... 69
5 Foundation of Control Programming................................................73
5.1 Control and Control Class .................................................................... 73
5.2 Creating Control Instance by Using Predefined Control Class ..................... 75
MiniGUI Programming Guide V2.0-4
V
5.3 Topics Involved in Control Programming................................................. 77
5.4 Operations Specific to Control .............................................................. 81
6 Advanced Programming of Control ..................................................83
6.1 User-Defined Control .......................................................................... 83
6.2 Subclassing of Control ........................................................................ 83
6.3 Combined Use of Controls ................................................................... 84
7 Menu.........................................................................................89
7.1 Concept of Menu................................................................................ 89
7.2 Creating and Handling Menu ................................................................ 89
7.2.1 Creating Normal Menu................................................... 89
7.2.2 Creating Popup Menu.................................................... 90
7.2.3 MENUITEMINFO Structure................................................. 91
7.2.4 Operating on Menu Item................................................. 93
7.2.5 Deleting and Destroying Menu or Menu Item ............................. 94
7.2.6 MSG_ACTIVEMENU Message................................................. 94
7.3 Sample Program ................................................................................ 95
8 Scrollbar ....................................................................................99
8.1 Concept of Scrollbar ........................................................................... 99
8.2 Enabling or Disabling a Scrollbar ........................................................ 100
8.3 Range and Position of a Scrollbar........................................................ 100
8.4 Messages of Scrollbar ....................................................................... 102
8.5 Sample Program .............................................................................. 104
9 Keyboard and Mouse .................................................................. 109
9.1 Keyboard........................................................................................ 109
9.1.1 Keyboard Input ........................................................ 109
9.1.2 Key Stroke Message .................................................... 110
9.1.3 Character Message ..................................................... 111
9.1.4 Key Status ............................................................ 112
9.1.5 Input Focus ........................................................... 113
9.1.6 Sample Program ........................................................ 114
9.2 Mouse............................................................................................ 114
9.2.1 Mouse Input ........................................................... 114
9.2.2 Mouse Message ......................................................... 115
9.2.3 Capture of Mouse ...................................................... 118
9.2.4 Tracking Mouse Cursor................................................. 120
MiniGUI Programming Guide V2.0-4
VI
9.3 Event Hook ..................................................................................... 123
10 Icon, Cursor, and Caret............................................................. 127
10.1 Icon............................................................................................. 127
10.1.1 Loading and Displaying Icon.......................................... 127
10.1.2 Destroying Icon ...................................................... 130
10.1.3 Creating Icon ........................................................ 130
10.1.4 Using System Icons................................................... 133
10.2 Cursor.......................................................................................... 135
10.2.1 Loading and Creating Cursor.......................................... 136
10.2.2 Destroying Cursor .................................................... 137
10.2.3 Positioning and Displaying Cursor ................................... 137
10.2.4 Clipping Cursor ...................................................... 139
10.2.5 Using System Cursors................................................. 140
10.2.6 Sample Program ....................................................... 142
10.3 Caret ........................................................................................... 145
10.3.1 Creating and Destroying Caret........................................ 145
10.3.2 Showing and Hiding Caret............................................. 146
10.3.3 Positioning Caret .................................................... 146
10.3.4 Changing Blink Time of Caret......................................... 147
10.3.5 Sample Program ....................................................... 147
11 Using MiniGUIExt Library .......................................................... 153
11.1 User Interface Wrap Functions.......................................................... 153
11.2 Skin............................................................................................. 156
11.2.1 Form of skin ......................................................... 157
11.2.2 Skin Window .......................................................... 161
11.2.3 Use of callbacks ..................................................... 162
11.2.4 Skin Operations ...................................................... 164
11.2.5 Normal Label ......................................................... 165
11.2.6 Image Label .......................................................... 166
11.2.7 Command Button ....................................................... 167
11.2.8 Check Button ......................................................... 167
11.2.9 Normal Slider ........................................................ 168
11.2.10 Rotate Slider ....................................................... 169
11.2.11 MiniGUI Control ..................................................... 170
11.2.12 Sample Program ...................................................... 170
MiniGUI Programming Guide V2.0-4
VII
11.3 Color Selection Dialog Box ............................................................... 173
11.4 New Open File Dialog Box ................................................................ 175
12 Other Programming Topics ........................................................ 177
12.1 Timer........................................................................................... 177
12.2 Dynamic Change of Color of Window Element ...................................... 180
12.3 Clipboard...................................................................................... 181
12.3.1 Creating and Destroying Clipboard ................................... 182
12.3.2 Transferring Data to Clipboard ...................................... 183
12.3.3 Getting Data from Clipboard.......................................... 183
12.4 Reading/Writing Configuration File .................................................... 184
12.5 Writing Portable Program................................................................. 188
12.5.1 Using Endian-Specific Read/Write Functions of MiniGUI ............... 189
12.5.2 Using Condition Compilation to Write Portable Code .................. 191
12.6 Fixed-Point Computing .................................................................... 193
II MiniGUI Graphics Programming ..........................................195
13 Graphics Device Interfaces ........................................................ 197
13.1 Architecture of MiniGUI Graphics System............................................ 197
13.1.1 GAL and GDI .......................................................... 197
13.1.2 New GAL .............................................................. 198
13.2 Painting and Updating of a Window ................................................... 200
13.2.1 When to Paint a Window?.............................................. 200
13.2.2 MSG_PAINT Message .................................................... 200
13.2.3 Valid and Invalid Region............................................. 201
13.3 Graphics Device Context.................................................................. 203
13.3.1 Abstraction of Graphics Device ...................................... 203
13.3.2 Getting and Releasing of Device Context ............................. 205
13.3.3 Saving and Restoring of Device Context .............................. 209
13.3.4 Device Context in Memory............................................. 209
13.3.5 Screen Device Context................................................ 209
13.4 Mapping Mode and Coordinate Space ................................................. 210
13.4.1 Mapping Mode ......................................................... 210
13.4.2 Viewport and Window.................................................. 211
13.4.3 Conversion of Device Coordinates .................................... 213
13.4.4 The Deviation and Zoom of Coordinate System ......................... 214
13.5 Rectangle and Region Operations ...................................................... 215
MiniGUI Programming Guide V2.0-4
VIII
13.5.1 Rectangle Operations................................................. 215
13.5.2 Region Operations .................................................... 216
13.6 Basic Graphics Drawing ................................................................... 218
13.6.1 Basic Drawing Attributes............................................. 218
13.6.2 Basic Drawing Functions.............................................. 219
13.6.3 Clipping Region Operations........................................... 219
13.7 Text and Font ................................................................................ 220
13.8 Bitmap Operations.......................................................................... 221
13.8.1 Concept of Bitmap .................................................... 221
13.8.2 Bitmap Color ......................................................... 222
13.8.3 Device-Dependent Bitmap and Device-Independent Bitmap ............... 224
13.8.4 Loading a Bitmap from File........................................... 226
13.8.5 Filling Block ........................................................ 228
13.8.6 Bit Blitting ......................................................... 230
13.9 Palette ......................................................................................... 233
13.9.1 Why Is the Palette Needed?........................................... 233
13.9.2 Using Palette ........................................................ 235
14 Handling and Rendering of Text.................................................. 237
14.1 Charset and Encoding ..................................................................... 237
14.2 Device Font................................................................................... 239
14.3 Logical font ................................................................................... 240
14.4 Text Analysis ................................................................................. 242
14.5 Text Transformation ........................................................................ 243
14.6 Text Output................................................................................... 244
14.7 Special Render Effects of Font Glyph.................................................. 248
15 Advanced GDI Functions Based on NEWGAL ................................. 251
15.1 New Region Implementation............................................................. 251
15.2 Raster Operations .......................................................................... 252
15.3 Memory DC and BitBlt ..................................................................... 253
15.4 Enhanced BITMAP Operations ........................................................... 256
15.5 New GDI functions ......................................................................... 258
15.6 Advanced GDI functions .................................................................. 258
15.6.1 Image Scaling Functions.............................................. 258
15.6.2 Image Rotation Functions............................................. 259
15.6.3 Rounded Corners Rectangle............................................ 261
MiniGUI Programming Guide V2.0-4
IX
15.7 Curve Generators ........................................................................... 261
15.7.1 Line Clipper and Line Generator ..................................... 262
15.7.2 Circle Generator ..................................................... 263
15.7.3 Ellipse Generator .................................................... 263
15.7.4 Arc Generator ........................................................ 263
15.7.5 Vertical Monotonous Polygon Generator ............................... 264
15.7.6 General Polygon Generator............................................ 265
15.7.7 Flood Filling Generator.............................................. 265
15.7.8 Using Curve Generator................................................ 266
15.8 Plotting Complex Curve ................................................................... 268
15.9 Filling Enclosed Curve ..................................................................... 269
15.10 Building Complex Region................................................................ 270
15.11 Visiting Frame Buffer Directly ......................................................... 272
15.12 YUV Overlay and Gamma Correction ................................................ 273
15.12.1 YUV Overlay ......................................................... 273
15.12.2 Gamma Correction .................................................... 276
15.13 Advanced Two-Dimension GDI Functions ........................................... 277
15.13.1 Pen and Its Properties.............................................. 277
15.13.2 Brush and Its Properties............................................ 280
15.13.3 Advanced Two-Dimension Drawing Functions ........................... 281
15.13.4 Using Advanced Two-Dimension GDI Functions ......................... 282
15.14 Support for Slave Screens.............................................................. 285
15.14.1 Creating Slave Screen............................................... 285
15.14.2 Destroying Slave Screen............................................. 285
III MiniGUI Advanced Programming Topics...............................287
16 Inter-Process Communication and Asynchronous Event Process ....... 289
16.1 Asynchronous Event Process ............................................................ 289
16.2 MiniGUI-Processes and Inter-Process Communication ........................... 291
16.2.1 Multi-Process Model under MiniGUI-Processes ......................... 292
16.2.2 Simple Request/Response Processing .................................. 293
16.2.4 Wraps for UNIX Domain Socket......................................... 296
17 Developing Customized MiniGUI-Processes Server Program............. 299
17.1 Mginit of MDE ................................................................................ 299
17.1.1 Initializing Itself as the Server of MiniGUI-Processes .............. 299
17.1.2 Displaying Copyright Information .................................... 305
MiniGUI Programming Guide V2.0-4
X
17.1.3 Creating Taskbar ..................................................... 305
17.1.4 Startup the Default Program.......................................... 306
17.1.5 Entering Message Loop................................................ 307
17.2 A Simple Mginit Program ................................................................. 307
17.3 Functions Specific to Clients of MiniGUI-Processes ............................... 311
17.4 Other Functions and Interfaces Specific to Mginit ................................. 312
18 GAL and IAL Engines ................................................................ 314
18.1 Shadow NEWGAL Engine.................................................................. 315
18.2 CommLCD NEWGAL Engine .............................................................. 315
18.3 The IAL Interface of MiniGUI ............................................................ 317
18.4 Comm Input Engine ........................................................................ 321
18.5 Developing IAL Engine for a Specific Embedded Device ......................... 322
IV MiniGUI Control Programming ...........................................328
19 Static Control.......................................................................... 330
19.1 Types and Styles of Static Control ..................................................... 330
19.1.1 Standard Type ........................................................ 330
19.1.2 Bitmap Type .......................................................... 332
19.1.3 Group Box ............................................................ 333
19.1.4 Other static control types........................................... 334
19.2 Static Control Messages .................................................................. 334
19.3 Notification Codes of Static Control ................................................... 335
19.4 Sample Program ............................................................................ 335
20 Button Control ........................................................................ 338
20.1 Types and Styles of Button .............................................................. 338
20.1.1 Push button .......................................................... 338
20.1.2 Check Box ............................................................ 340
20.1.3 Radio Button ......................................................... 341
20.2 Messages of Button ........................................................................ 343
20.3 Notification Codes of Button ............................................................. 344
20.4 Sample Program ............................................................................ 345
21 List Box Control....................................................................... 350
21.1 Types and Styles of List Box............................................................. 350
21.2 Messages of List Box....................................................................... 352
21.2.1 Adding Item into List Box............................................ 352
21.2.2 Deleting Item from List Box.......................................... 354
MiniGUI Programming Guide V2.0-4
XI
21.2.3 Selecting and Getting Item........................................... 354
21.2.4 Searching Item Including a Text String .............................. 356
21.2.5 Setting/Getting the Status of Check Mark ............................ 356
21.2.6 Setting the Bold Status of Item ..................................... 357
21.2.7 Setting/Getting the Disable Status of Item .......................... 357
21.2.8 Adding Multiple Items into List Box ................................. 357
21.2.9 Other Messages ....................................................... 358
21.3 Notification Codes of List Box ........................................................... 359
21.4 Sample Program ............................................................................ 360
22 Edit Box Control ...................................................................... 365
22.1 Styles of Edit Box........................................................................... 366
22.2 Messages of Edit Box ...................................................................... 367
22.2.1 Getting/Setting Caret Position ...................................... 368
22.2.2 Setting/Getting Selection of Text ................................... 368
22.2.3 Copy, Cut, and Past.................................................. 369
22.2.4 Setting/Getting Properties of Line Height and Others ................ 370
22.2.5 Setting Limit of Text................................................ 371
22.2.6 Setting or Canceling Read-only Status ............................... 371
22.2.7 Setting/Getting Password Character .................................. 371
22.2.8 Setting Title and Tip Text........................................... 372
22.2.9 Setting End of Line Symbol........................................... 373
22.2.10 Setting End of Line................................................. 373
22.2.11 Getting Paragraphs Information ..................................... 374
22.3 Notification Codes of Edit Box........................................................... 375
22.4 Sample Program ............................................................................ 375
23 Combo Box Control .................................................................. 379
23.1 Types and Styles of Combo Box ........................................................ 379
23.1.1 Simple Combo Box, Pull-Down Combo Box, and Spin Combo Box ........... 379
23.1.2 Digital Spin Box ..................................................... 381
23.2 Messages of Combo Box .................................................................. 382
23.2.1 Messages of Simple, Pull-Down, and Spin Combo Box ................... 382
23.2.2 Messages of Digital Spin Box......................................... 384
23.3 Notification Codes of Combo Box....................................................... 385
23.4 Sample Program ............................................................................ 386
24 Menu Button Control ................................................................ 391
MiniGUI Programming Guide V2.0-4
XII
24.1 Styles of Menu Button ..................................................................... 391
24.2 Messages of Menu Button ................................................................ 392
24.2.1 Adding Items to Menu Button Control ................................. 392
24.2.2 Deleting Items from Menu Button Control ............................. 392
24.2.3 Deleting All Items in the Menu ...................................... 393
24.2.4 Setting Current Selected Item........................................ 393
24.2.5 Getting Current Selected Item........................................ 393
24.2.6 Getting/Setting Data of Menu Item ................................... 393
24.2.7 Other Messages ....................................................... 394
24.3 Notification Codes of Menu Button..................................................... 394
24.4 Sample Program ............................................................................ 395
25 Progress Bar Control ................................................................ 399
25.1 Styles of Progress Bar..................................................................... 399
25.2 Messages of Progress Bar ................................................................ 400
25.2.1 Setting Range of Progress Bar........................................ 400
25.2.2 Setting Step Value of Progress Bar .................................. 400
25.2.3 Setting Position of Progress Bar .................................... 400
25.2.4 Setting Offset Based-on Current Position ............................ 401
25.2.5 Advancing Position by One Step ...................................... 401
25.3 Notification Codes of Progress Bar..................................................... 401
25.4 Sample Program ............................................................................ 402
26 Track Bar Control..................................................................... 405
26.1 Styles of Track Bar ......................................................................... 405
26.2 Messages of Track Bar..................................................................... 406
26.3 Notification Codes of Track Bar ......................................................... 407
26.4 Sample Program ............................................................................ 407
27 Toolbar Control........................................................................ 409
27.1 Creating Toolbar Control .................................................................. 409
27.2 Styles of Toolbar ............................................................................ 410
27.3 Messages of Toolbar ....................................................................... 411
27.3.1 Adding an Item ....................................................... 411
27.3.2 Getting/Setting Information of an Item .............................. 413
27.3.3 NTBM_SETBITMAP Message............................................... 414
27.4 Notification Codes of Toolbar ............................................................ 414
27.5 Sample Program ............................................................................ 414
MiniGUI Programming Guide V2.0-4
XIII
28 Property Sheet Control ............................................................. 419
28.1 Styles of Property Sheet .................................................................. 420
28.2 Messages of Property Sheet ............................................................. 420
28.2.1 Adding Property Page................................................. 420
28.2.2 Procedure Function of Property Page ................................. 420
28.2.3 Deleting Property Page............................................... 423
28.2.4 Handle and Index of Property Page ................................... 423
28.2.5 Messages Relevant Property Page ..................................... 424
28.3 Notification Codes of Property Sheet.................................................. 425
28.4 Sample Program ............................................................................ 425
29 Scroll Window Control .............................................................. 431
29.1 Scrollable Window .......................................................................... 431
29.2 General Scroll Window Messages....................................................... 432
29.2.1 Get/Set the Range of Content Area and Visible Area .................. 432
29.2.2 Get Position Information and Set Current Position ................... 433
29.2.3 Get/Set Scroll Properties............................................ 434
29.3 Message of Scroll Window Control ..................................................... 435
29.3.1 Add Child Control .................................................... 435
29.3.2 Get Handle of Child Control.......................................... 436
29.3.3 Container (Content) Window Procedure ................................ 436
29.4 Sample Program ............................................................................ 437
30 Scroll View Control .................................................................. 441
30.1 Styles of Scroll View Control ............................................................ 441
30.2 Messages of Scroll View Control ........................................................ 442
30.2.1 Draw of List Item .................................................... 442
30.2.2 Set Operation Functions of List Item ................................ 443
30.2.3 Operations on List Item.............................................. 444
30.2.4 Get/Set Current Highlighted Item .................................... 446
30.2.5 Selection and Display of List Item .................................. 446
30.2.6 Optimization of Display.............................................. 447
30.2.7 Set Range of Visible Area............................................ 448
30.3 Notification Codes of Scroll View Control ............................................ 449
30.4 Sample Program ............................................................................ 449
31 Tree View Control .................................................................... 453
31.1 Styles of Tree View Control .............................................................. 453
MiniGUI Programming Guide V2.0-4
XIV
31.2 Messages of Tree View Control.......................................................... 454
31.2.1 Creating and Deleting Node Item ..................................... 454
31.2.2 Setting/Getting Properties of Node Item ............................. 455
31.2.3 Selecting and Searching a Node Item ................................. 456
31.2.4 Comparing and Sorting................................................ 458
31.3 Notification Codes of Tree View Control .............................................. 459
31.4 Sample Program ............................................................................ 459
32 List View Control ..................................................................... 463
32.1 Styles of List View Control ............................................................... 463
32.2 Messages of List View Control........................................................... 464
32.2.1 Operations on Columns................................................ 464
32.2.2 Operations on List Item.............................................. 467
32.2.3 Selecting, Displaying, and Searching List Item ...................... 472
32.2.4 Comparing and Sorting................................................ 474
32.2.5 Operation of Tree View Node.......................................... 475
32.3 Handling of Key Messages................................................................ 476
32.4 Notification Codes of List View Control ............................................... 477
32.5 Sample Program ............................................................................ 477
33 Month Calendar Control ............................................................ 483
33.1 Styles of Month Calendar................................................................. 483
33.2 Messages of Month Calendar ............................................................ 483
33.2.1 Getting Date ......................................................... 483
33.2.2 Setting Date ......................................................... 485
33.2.3 Adjusting Colors ..................................................... 486
33.2.4 Size of Control ...................................................... 487
33.3 Notification Codes of Month Calendar................................................. 487
33.4 Sample Program ............................................................................ 487
34 Spin Box Control ..................................................................... 489
34.1 Styles of Spin Box .......................................................................... 489
34.2 Messages of Spin Box ..................................................................... 490
34.2.1 Setting/Getting Position............................................. 490
34.2.2 Disabling and Enabling............................................... 491
34.2.3 Target Window ........................................................ 491
34.3 Notification Codes of Spin Box .......................................................... 492
34.4 Sample Program ............................................................................ 492
MiniGUI Programming Guide V2.0-4
XV
35 Cool Bar Control ...................................................................... 495
35.1 Styles of Cool Bar .......................................................................... 495
35.2 Messages of Cool Bar ...................................................................... 495
35.3 Sample Program ............................................................................ 497
36 Animation Control .................................................................... 499
36.1 ANIMATION Object ......................................................................... 499
36.2 Styles of Animation Control.............................................................. 501
36.3 Messages of Animation Control ......................................................... 502
36.4 Sample Program ............................................................................ 502
37 GridView Control ..................................................................... 505
37.1 Styles of Gridview .......................................................................... 505
37.2 Messages of GridView ..................................................................... 505
37.2.1 Column Operations .................................................... 506
37.2.2 Row Operations ....................................................... 509
37.2.3 Cell Operations ...................................................... 511
37.3 Other Messages ............................................................................. 512
37.4 Notification Codes of GridView.......................................................... 513
37.5 Sample Program ............................................................................ 514
38 IconView Control ..................................................................... 519
38.1 Styles of IconView.......................................................................... 519
38.2 Messages of IconView ..................................................................... 520
38.2.1 Icon operation ....................................................... 520
38.3 Notification Codes of IconView.......................................................... 523
38.4 Sample Program ............................................................................ 523
Appendix A Universal Startup API for RTOSes ................................... 528
A.1 Malloc Initialization Interface ............................................................. 528
A.2 Standard Output Initialization Interface ............................................... 529
A.3 POSIX Threads Initialization Interface ................................................. 529

MiniGUI Programming Guide V2.0-4
1
1 Preface
MiniGUI is a cross operating system and lightweight GUI support system for
real-time embedded systems, and is especially suitable for embedded systems
based on Linux/uClinux, VxWorks, pSOS, eCos, uC/OS-II, ThreadX, OSE, and
Nucleus. Launched at the end of 1998, the software has, over nine years of
development, become a stable and reliable one securing widespread
applications in a variety of products and projects. At present, the latest stable
version of MiniGUI is 2.0.4/1.6.10. This handbook is the programming guide
for the MiniGUI version 2.0.4/1.6.101, which describes how to develop
applications based on MiniGUI.
This handbook is a complete guide on MiniGUI programming, which describes
the foundation knowledge of MiniGUI programming and various programming
methods and skills, and detailed describes the main API functions. Though the
handbook tries to detailed describe various aspects of MiniGUI programming, it
is not a complete reference manual about MiniGUI APIs; please refer to
MiniGUI API Reference for relevant information.
1.1 Relevant Documents
Except for this guide, Feynman Software also ships the following printed
manual with the MiniGUI-VAR product:

你可能感兴趣的:(MiniGUI Programming Guide)