Tuesday, June 26, 2007

VC++ Win32 Dialog box

VC++ Win32 Dialog box :
-------------------------------------------

Dialog Box :

1.A dialog box generally takes the form of a popup window containing various child window controls.
2.The size and placement of these controls are specified in a "dialog box template" in the program's resource script file. (.rc)

3.window procedure for processing the dialog box messages is referred as the "dialog Procedure."
4.Dialog procedures generally do not process WM_PAINT messages.
5.dialog box can be considered as an input/output "black box" meaning that you don't have to know how a dialog box works internally in order to be able to use it, you only have to know how to interact with it.That's a principle of object oriented programming (OOP) called information hiding.

6.A dialog box is defined as a resource much the same way as a menu. You write a dialog box template describing the characteristics of the dialog box and its controls and then compile the resource script with a resource editor.

7.all resources are put together in the same resource script file.


two main types of dialog box:

1.modal
2.modeless.


Modeless dialog box :
A modeless dialog box lets you change input focus to other window. The example is the Find dialog of MS Word.

Modal dialog box :

two subtypes of modal dialog box:

1.application modal
2.system modal

An application modal dialog box doesn't let you change input focus to other window in the same application but you can change the input focus to the window of OTHER application.
A system modal dialog box doesn't allow you to change input focus to any other window until you respond to it first.

A modeless dialog box is created by calling CreateDialogParam API function.
A modal dialog box is created by calling DialogBoxParam API function.

The only distinction between an application modal dialog box and a system modal one is the DS_SYSMODAL style. If you include DS_SYSMODAL style in a dialog box template, that dialog box will be a system modal one.

Labels:

0 Comments:

Post a Comment

<< Home