Advertisement

Dialog Box

Started by January 10, 2003 09:38 PM
4 comments, last by Tazel 21 years, 10 months ago
What is a dialog box exactly? tcache Contact Me ----------- AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)
tcacheContact Me-----------AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)
A dialog box is a type of window.

This type of window can be complex and consist of many control elements (I.E Button, check box etc) but is usually used to confirm a selection or prompt/alert a user about his or her input.

An example of a simple dialog box is one that appears when you close an application. Your are prompted to save:

"Are you sure you want to quit without saving"
"yes" "No" "Cancel"

Hope that helps
Advertisement
So it''s like a message box? What are the differences?


tcache
Contact Me
-----------
AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)
tcacheContact Me-----------AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)
A message box is a (normally) simple type of dialog box used to ask a single question or display a single message. A dialog box (the more general term) MAY contain several choices to be made simultaneously, and often contains several controls for indicating these choices.

[edited by - zealouselixir on January 10, 2003 11:20:31 PM]

[twitter]warrenm[/twitter]

quote: Original post by Tazel
So it''s like a message box? What are the differences?

A dialog box is basically a popup window except that it uses a slightly different type of callback function that responds to dialog specific window messages in a few places. An "About Box" is usually a dialog box. An application typically uses a dialog box to present the user with choices - controls etc. Dialog boxes come in two flavors - modal and modeless. A modal dialog seizes focus, a modeless dialog cedes it. One thing that makes a dialog box very useful is the ability to use a template to store the arrangement of the various controls employed by the dialog box.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
A message box is exactly what it sounds like: it displays a message. It may require a simple answer (Yes, No, or Cancel, for example).

A dialog box is for creating a ''dialog'' with the user - the idea is that you use them to present or request more detailed information than a simple message. They make up part of the ''user interface.'' There''s also an aspect of ''configuration'' - you use a dialog box to view or change the properties of something about your program. The obvious example is the ''options'' dialog box; but, another example would be the ''Find'' dialog box, where you configure and control the program''s ''find text'' task.

The main difference between a dialog box and a plain window, though, is that in a normal situation you don''t draw stuff on a dialog box - you lay controls (buttons, edit boxes, etc) out on it.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement