{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

L3 - Harry Acknowledgement Some ppts are copied from the...

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

View Full Document Right Arrow Icon
Harry 05/10/2009
Background image of page 1

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

View Full Document Right Arrow Icon
Acknowledgement Some ppts are copied from the previous TAs.
Background image of page 2
Set up a MFC Project Steps and options File-> New-> Project-> Visual C++-> MFC ->MFC Application Application Type: Dialog based. Use of MFC: Use MFC in a Static library
Background image of page 3

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

View Full Document Right Arrow Icon
Intro to MFC programming
Background image of page 4
How to draw GUI? Steps In resource view mode, the Dialog folder, choose the dialog you need to draw. Pull controls from the Dialog Editor Delete some controls from the dialog you don’t need.
Background image of page 5

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

View Full Document Right Arrow Icon
The Result
Background image of page 6
MFC Application Class Dialog (GUI) Class Start your code here Class View
Background image of page 7

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

View Full Document Right Arrow Icon
MFC - Event handler Each UI control (button, text box, ) can generate events For example, a button can generate a clicked event Easy to register event handlers (=class methods that are invoked when the event occurs)
Background image of page 8
MFC - Event handler Event handlers can also be added by right clicking and selecting Add Event Handler
Background image of page 9

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

View Full Document Right Arrow Icon
MFC - Control Variables Control Variables: Used to get and set properties of UI controls For example, change the text of a edit control Each type of control has its own type of variable For example, CEdit for edit controls
Background image of page 10
MFC - Control Variables To assign a control variable, right click the UI control and select Add Variable
Background image of page 11

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

View Full Document Right Arrow Icon
MFC - Control Variables Then, choose a name for the variable and click Finish
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}