What?s the difference between Modal and Modeless Dialog?




Answers were Sorted based on User's Feedback



What?s the difference between Modal and Modeless Dialog?..

Answer / mahesh

Modal dialog box captures the message loop. where as model
less does not.

Model dialog does not allow its parent window unless it is
colosed. where as modelless it allows.

Is This Answer Correct ?    63 Yes 7 No

What?s the difference between Modal and Modeless Dialog?..

Answer / srinivas endra

Example for Model Dialog is Save, Save As Dialog in MS -
Word. while it is opening you can't do any thing in the
application until you close that window
Example for Modeless Dialog is Find,Replace dialogs. You
can use Find Dialog, same time you can also work in that
word application.

Is This Answer Correct ?    60 Yes 4 No

What?s the difference between Modal and Modeless Dialog?..

Answer / ram reddy from miryalguda

let there be a parent window and we created one more dialog
window let it be child window.so we have now parent window
and child window.
MODAL DEF:suppose first parent window is opened then after
from parent window open the child window now if we want to
edit any information first we have to close child window
then after we have to made changes in parent window.
EX for MODAL:take not pad first open note pad and write some
thing . now to save that we go for save option.open that
save option.keeping open that save option it is not possible
to edit note pad.so here parent is note pad,child->save option
MODE LESS:it is converse for the above although child window
is opened we can edit parent window with out closing child
window.
EX FOR MODE less:on desktop click MY computer and then a
folder can be opened and now open any other drive.though
drive is opened we can copy or paste or do any thing in our
MY computer folder.here parent is my computer folder and
child is any other drive.

Is This Answer Correct ?    22 Yes 1 No




What?s the difference between Modal and Modeless Dialog?..

Answer / rama krishna d.v.

Modal Dialog box occupies the Stack Area thats the reason it
can't give the contol to its parent.

Modeless Dialog box occupies the Heap Area it gives the
control to its parent.

Is This Answer Correct ?    25 Yes 6 No

What?s the difference between Modal and Modeless Dialog?..

Answer / rajeshkumar

Modal dialog:does not switches the control of dialog box
outside the window..

Modeless dialog:can perform actios outside dialog box of the
window.

Is This Answer Correct ?    16 Yes 1 No

What?s the difference between Modal and Modeless Dialog?..

Answer / ratnesh sachan

When creating a new window, Internet Explorer lets you
generate two types of windows.The first type retains the
input focus while open. The user cannot switch windows until
window is closed.This behavior is typical to dialog boxes
which you need to close before continuing to other
tasks.This kind of dialog box is referred to as a modal
dialog box.
And the second type of dialog box is referred to as a
modeless dialog box. A modeless dialog allows you to switch
the input focus to another window. It continue to display
even when you switch to other applications.
Bothe type of dialog is derive from CDialog class.

Is This Answer Correct ?    14 Yes 1 No

What?s the difference between Modal and Modeless Dialog?..

Answer / kavita

Modal dialog Box Control Windows Application.When modal
Dialog Box is Open You Can Not Perform Any Other Action
But Modeless dialogBox Perform Action Outside Dialog box of
the Windows Application

Is This Answer Correct ?    12 Yes 1 No

What?s the difference between Modal and Modeless Dialog?..

Answer / karthik

modal captures the message loop where as modeless does not

Is This Answer Correct ?    8 Yes 1 No

What?s the difference between Modal and Modeless Dialog?..

Answer / sultan_ahmed

Modeless Dialogs let you work on Parent Screen even if they
are open, whereas the ModalDialogs dont let you work on the
Parent Screen unless they are closed.

Is This Answer Correct ?    6 Yes 2 No

What?s the difference between Modal and Modeless Dialog?..

Answer / mahesh vanama

You create a modal dialog box by using the DialogBox function. You must specify the identifier or name of a dialog box template resource and a pointer to the dialog box procedure. The DialogBox function loads the template, displays the dialog box, and processes all user input until the user closes the dialog box.
In the following example, the application displays a modal dialog box when the user clicks Delete Item from an application menu. The dialog box contains an edit control (in which the user enters the name of an item) and OK and Cancel buttons. The control identifiers for these controls are ID_ITEMNAME, IDOK, and IDCANCEL, respectively.
Creating a Modeless Dialog Box
You create a modeless dialog box by using the CreateDialog function, specifying the identifier or name of a dialog box template resource and a pointer to the dialog box procedure. CreateDialog loads the template, creates the dialog box, and optionally displays it. Your application is responsible for retrieving and dispatching user input messages to the dialog box procedure.

In the following example, the application displays a modeless dialog box — if it is not already displayed — when the user clicks Go To from an application menu. The dialog box contains an edit control, a check box, and OK and Cancel buttons. The dialog box template is a resource in the application's executable file and has the resource identifier DLG_GOTO. The user enters a line number in the edit control and checks the check box to specify that the line number is relative to the current line. The control identifiers are ID_LINE, ID_ABSREL, IDOK, and IDCANCEL

Is This Answer Correct ?    0 Yes 0 No

Post New Answer



More MFC Interview Questions

How to handle dynamic menus in MFC?

3 Answers   HCL,


How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?

0 Answers  


I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)

2 Answers   Invensys,


What is the difference between Struts and JSF? Pls list some most suitable differences.

0 Answers  


is it possible to display a window .without using windowclass

1 Answers   E Logic,






Types of DLL's

11 Answers   Invensys,


What is userdefine Messages in MFC?

1 Answers   HCL,


Tell us something about MFC?

7 Answers   Microsoft,


What is stack size in win32 program?

1 Answers   HCL,


How to convert a CString variable to char* or LPTSTR?

5 Answers   Dover,


What is the base class for MFC

3 Answers   HCL,


What is serialization ?which function is responsible for serializing data ?

5 Answers  






Categories