Controls-w32api-2009 - Child Window Controls More notes at:

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Child Window Controls More notes at: http://www.cs.binghamton.edu/~reckert/360/class5a.htm Child Window Controls Windows created by a parent window ? An app uses them in conjunction with parent ? Normally used for simple I/O tasks ? Properties, appearance, behavior determined by predefined class definitions – But behavior can be customized – Easy to set them up as common Windows objects • buttons, scroll bars, etc. ? Can also define custom Child Window Controls
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
? Allow user to display/select/input info in standard ways ? Windows Environment does most of work in: – painting/updating a Control's screen area – determining what user is doing ? Often used as input devices for parent window ? Are the "working components" of Dialog Boxes ? Windows OS contains each control's WinProc – so messages to controls are processed in predefined way ? Parent window communicates with controls by sending/receiving messages Six “Classic” Control Types ? Go back to first versions of Windows Type Window Class MFC Class ---------------------------------------------------- Static Text “STATIC” CStatic Button “BUTTON” CButton Edit Control “EDIT” CEdit List Box “LISTBOX” CListBox Combo Box “COMBOBOX” CComboBox Scroll Bar “SCROLLBAR” CScrollBar ? All are windows
Background image of page 2
Creating Controls--Win32 API ? CreateWindow() F or any kind of window, including a control – Typically called in response to WM_CREATE or WM_SIZE ? Parameters: – 1. Predefined control window class names: • "STATIC", "BUTTON", “EDIT”, “LISTBOX”, “COMBOBOX”, ”SCROLLBAR”, others – 2. Name of the window • BUTTON, EDIT, STATIC classes: – text in center of control • COMBOBOX, LISTBOX, SCROLLBAR classes: – ignored (use "")
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/04/2009 for the course ER CS 360 taught by Professor Reckert during the Spring '09 term at Istanbul Technical University.

Page1 / 11

Controls-w32api-2009 - Child Window Controls More notes at:

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online