Minigui Programming Guide

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 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). I MiniGUI Programming Guide V2.0-4 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. I I MiniGUI Programming Guide V2.0-4 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 III MiniGUI Programming Guide V2.0-4 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 IV MiniGUI Programming Guide V2.0-4 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 ...............................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    548 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us