5/14/09

Explain modal and modeless dialog box ? what is the difference between modal and modeless dialog box ?

A modal dialog box is popped up over the parent dialog( from which it is envoked) it never allows user to go back to parent (calling) dialog box and work until the popped up dialog box is not exited.
Madal dilog box can be displayed as follows.
Ex. class MyDlg; // Class derived from CDialog.
MyDlg myDlg; // create an object
myDlg.DoModal();


A modaless dialogbox is on user can move back and forth between the poped up dialogbox and the parent (calling dialog)
For creating a modless dialogbox. needs to follow follwing things.

Ex. class MyDlg; // Class derived from CDialog.
MyDlg myDlg; // create object
myDlg.create(uint DialogId); // Call create method by providing the dialog resource id.
provide the message handling and run loop.

Difference between modal an modaless dialog box.
modal doesnt allow user to go back to parent window and work in it untill it is not exited while modeless allows to work in parent window.
Other differnce is of creation and displaying of dialog object.

No comments:

ITUCU