dialogs and windows... why both

i am new to win programming, so plz dont laugh...

i was wondering why we have both dialogs and windows as 
separate concepts.  it seems like a window can perform all 
the functions of a dialog.  why did the designers of 
windows programming feel the need to differentiate?  and 
how do i know when to use a dialog or a window?

thanks
0
12/31/2003 10:12:31 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
431 Views

Similar Articles

[PageSpeed] 33

anonymous@coolgroups.com wrote:
> i am new to win programming, so plz dont laugh...
> 
> i was wondering why we have both dialogs and windows as 
> separate concepts.  it seems like a window can perform all 
> the functions of a dialog.  why did the designers of 
> windows programming feel the need to differentiate?  and 
> how do i know when to use a dialog or a window?
> 
> thanks

They are not separate concepts, they are related concepts.  A dialog is 
a window (and a CDialog is a CWnd).  A dialog has a built in capability 
to display controls (buttons, edits, etc.) without writing any code, and 
a built in capability to move the focus from one control to the next in 
response to user input.  You could do all this in a window by writing 
code, but a window is usually used for something more custom than simply 
hosting controls.

-- 
Scott McPhillips [VC++ MVP]

0
scottmcp8856 (490)
12/31/2003 10:51:21 PM
I'm not really an expert yet myself, but note that CDialog is derived
from CWnd, so they aren't really separate concepts. And CDialog has lots
of dialog-ey things, like automatic parameter checking, transfer of
member variable values back and forth from edit boxes, etc.

Rick

anonymous@coolgroups.com wrote:

> i was wondering why we have both dialogs and windows as
> separate concepts.  it seems like a window can perform all
> the functions of a dialog.  why did the designers of
> windows programming feel the need to differentiate?

0
Rick7596 (41)
12/31/2003 11:07:37 PM
Hi and Happy New Year!

Just about everything thing you see on the screen that holds any kind of
"other stuff" is a window.  Edit control, listbox, list control, static
control, tree control, buttons, toolbars, combo boxes, etc. etc. etc. are
all Windows.  A Dialog is a kind of Window (like a view or frame) that holds
others Windows.  For example, you can place controls (other Windows) on
dialogs and the dialog gets the events (messages) generated by those
controls (most of the time).

So there really isn't any kind of a differentiation.  The thing that *is*
confusing is that in .Net they call the equivalent to the dialog editor
WinForms and what is essentially a dialog from the past is not a form, but a
form is still a Window.

I wouldn't beat myself up too much for being confused.  After writing this I
find myself being more confused as well.  :)

Tom

<anonymous@coolgroups.com> wrote in message
news:12dfa5faa7775968a486569cb3c610d6@news.scbiz.com...
> i am new to win programming, so plz dont laugh...
>
> i was wondering why we have both dialogs and windows as
> separate concepts.  it seems like a window can perform all
> the functions of a dialog.  why did the designers of
> windows programming feel the need to differentiate?  and
> how do i know when to use a dialog or a window?
>
> thanks


0
tserface (3861)
1/1/2004 4:49:40 PM
Reply:

Similar Artilces:

Windows XP Quick Launch bar
In Windows XP home edition using the clasic start menu how do I get the Quick Launch bar to stay showing? Every time I start Windows I have to go to the Start, Taskbar menu and click to show the Quick Launch bar. Can't it be set to stay showing?? TIA http://computersservicing.blogspot.com/2009/03/how-to-fix-quick-launch-bar-missing.html kraut wrote: > > In Windows XP home edition using the clasic start menu how do I get > the Quick Launch bar to stay showing? > > Every time I start Windows I have to go to the Start, Taskbar menu and > click...

Files in folder Windows.old in Vista
I have installed Ultimate on a Business version and then received the Windows.old folder. I want to delete it but have found same working files in old path than in the new. It appears that Windows updates the working files in both folders. Are they mirrored or copies. I changed the name of one file in old - corresponding file in the new folder received the same name. If I delete files from Windows.old will they be deleted from current folder too? "HBj" <HBj@discussions.microsoft.com> wrote in message news:12D90C20-D766-48D2-AA9C-D0FF7097DEBA@microsoft.com... ...

Windows media player question
I would like to rip all my CDs in mp3 files and save them all on my computer each CD in its own folder. Then I would like to include all the folders in my WMP library and be able to select a playlist from any number of folders. Is this possible? If yes, how? Thanks in advance. -- Tony Vella Ottawa, Ontario, Canada -- http://www.amedialuz.ca/ "Tony Vella" <tony.vella@rogers.com> wrote in message news:D7WdnSVc7PrF84fWnZ2dnUVZ_qqdnZ2d@giganews.com... > I would like to rip all my CDs in mp3 files and save them all on my computer each CD in its own > f...

Question: Windows Messenger
Hi I have problm with my Outlook Express, When I open this program other appliction with the name of Windows Messenger start with it!. If anybody know how I can open it without Windows Messenger please tall me. Greeting Reza B. Nikjoo Open OE and select Tools | Options. Uncheck the box about logging into Windows Messenger. From there, you just have to close the contacts pane that shows up in the lower left hand corner. "Reza B. Nikjoo" <reza_nikjoo@atinegar.com> wrote in message news:OKLKkilVDHA.2096@TK2MSFTNGP11.phx.gbl... > Hi > I have problm with my Outloo...

SetLayeredWindowAttributes causing dialog flicker when shown
I have a dialog that I want to be partially transparent when shown. In the dialogs OnInitDialog() function I have set the WS_EX_LAYERED extended window style, and also call SetWindowLayeredAttributes. About 50% of the time the dialog doesn't flicker. Everything in OnInitDialog is done before the window is actually shown so I don't understand why the flicker is occuring. Any help would be appreciated. Rob ...

Please Help. Windows Update crashed my computer.
Hi everyone! I'm trying to fix my computer (Emachines W5243) with Windows Vista Home SP2 (I think). It was a manual update, 19 were in queue. 1 failed to install. I rebooted the system to re-run Update, but the system would not boot. when it tried to start it showed a black screen with white text asking me to run the repair file (recommended). I did this, = it took me to a blue screen (BLOD) with white text saying: "A problem has been detected and windows has been shut down to prevent damage to your computer...... Technical information: ***STOP: 0x0000C1F5 (0x00000000...

Help in creating dialog based application
Hi, I am creating a dialog based application which has a main dialog with 3 buttons. 1. Address Book 2. Student List 3. Course List with which i can go to any one of the screens(which is again the dialog). when i click address book button my main dialog should be hidden/closed and i should open the address book dialog which has again some button to navigate back to main dialog/student list/course list. same kind of functionality for other two dialogs(student/course list). i thought of creating all the 3 dialogs as modeless and main dialog as parent but how i will inform the parent window to ...

Windows 7 Excel 7
Over the last week while in a spreadsheet, excel has just arbitrarily begun to restore/repair a file. This has happened a couple times, no power failures or surges... A converter had been installed, the system went back to a restore but it has happened again. I then have to save as another file name. ...

Setup Outlook 2003 as default in Windows 7
I want to use Outlook 2003 as my default email client but the only choice in the configuration is Windows Live. How or where can I setup Outlook 2003 as the default? "Roger S" <Roger S@discussions.microsoft.com> wrote in message news:92A06CD8-D815-4644-B3AA-72DC0B0F7A7D@microsoft.com... > I want to use Outlook 2003 as my default email client but the only choice > in > the configuration is Windows Live. How or where can I setup Outlook 2003 > as > the default? Start-Control Panel-Programs-Default Programs. Did you install outlook using the...

Are there newsgroups for Windows 7?
I can't find any English newsgroups for Windows 7. Can anyone help? On Wed, 24 Mar 2010 14:16:02 -0400, The Learner <moron@newsgroups.net> wrote: >I can't find any English newsgroups for Windows 7. Can anyone help? alt.windows7.general On Wed, 24 Mar 2010 14:16:02 -0400, The Learner wrote: > I can't find any English newsgroups for Windows 7. Can anyone help? alt.windows7.general There are no Microsoft Win 7 groups. Some newsgroup servers carry alt.windows7.general The support forum for the Windows 7 is: http://social.technet.microsoft.com/Fo...

How to get only active tab to display in windows taskbar?
I'm running IE 8 under Windows Server 2008. Let's say I have two instances of IE running, and each instance has four tabs/urls. In the Windows taskbar, when I click on the IE icon and the list of windows is displayed, instead of two URLs, it displays all eight. I'm not sure if this is an IE8 vs. IE7 issue, or a Windows Server 2008 vs. XP issue, but on my work machine (running IE8 and Win Server 2008) this happens, but on my home machine (IE7 and WinXP) only two URLs are displayed (the active tab/URL of each instance). Is there any way to change this? I really d...

Downloading Microsoft Access in Windows Live Skydrive
Hi I get the following error when trying to download and open a Microsoft Access Database File 2003 from Windows Live SkyDrive."Microsoft Access cannot open this file. The file is located outside your intranet or an untrusted sight. Microsoft Access will not open this file due to potential security problems. To open the file copy it to your machine or an accessible network location." I use Windows Vista Basic with Explorer 8.I also get the error on another seperate internet connection. Can you tell me how to get round this error and explain the error in full. I can how...

IE7 for Windows 7 01-09-10
I would like that IE7 could be installed in Windows 7. In that way, I could use IE7 Pro Traduccion: Me gustaría que IE7 se pudiera instalar en Windows 7, para poder usar IE7 Pro. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.micr...

Excel should have detachable workbook windows for mult. monitors.
I use two monitors at work and I function 99% of the time in Excel. It would be wonderful if I could maximize one workbook on the first monitor and maximize another workbook on the second monitor while both run in the same instance of Excel. This would allow me to view more data while retaining the ability to create formulas that can be easily linked to other workbooks with a few clicks. I understand that I could stretch the Excel application window across both monitors and adjust each of the workbook windows, but it doesn't work so well when the monitors are not the sam...

I having trouble installing Windows XP Pro 32 bit
I having trouble installing Windows XP Pro 32 bit which I have never had problems until now. After Installing Windows Xp Pro 32bit SP3 downloaded all of the updates. It boots into Windows when updating everything, but now a message ups which I have never seen and don't understand WHY? ~~~~The message says: [ Windows connot find 'C:Documents'. Make sure you typed the name correctlyy, and then try again. To search for a file, click the start button, and then click Search.] ~~~~ What update or Windows program would ask this message? Asking for Documents? Why? T...

Global Address List Dialog Focus
I am attempting to use the Outlook 2007 Address Book Dialog to allow users to use a familiar interface to select email recepients. it always displays the dialog minumized behind outlook, or the application, so the user would not know the dialog is displayed unless they click on outlook in the bottom status bar. I have attempted to use the AppActivate function to force outlook as having the focus. I also searchered outlook develpment fourms and documentation, I am developing with VS 2008 on a XP SP3 machine Any Help is Appreciated Here is my Code used on a button_clic...

How to Get Control Type from Window Handler
Dear All, How can I get the Control Type (i.e. Button, Edit, ComboBox, ... etc) from a Window Handle, which returned from GetDlgItem(ID)? Many Thx Marco Marco, You might want to check ::GetClassName. Johan Rosengren Abstrakt Mekanik AB "Marco Hung" <marco@xmlhk.com> a �crit dans le message de news:eqXx4$NLEHA.3944@tk2msftngp13.phx.gbl... > Dear All, > > How can I get the Control Type (i.e. Button, Edit, ComboBox, ... etc) from a > Window Handle, which returned from GetDlgItem(ID)? > > Many Thx > Marco > > ...

Windows Mail setup 01-01-10
I am trying to set up a new Windows Mail account but when at he request for the account name and password assigned by my ISP I don't know what accont name and password to enter. "jean" <jeanieu@msn.com> wrote in message news:%23$lMuUoiKHA.1824@TK2MSFTNGP04.phx.gbl... >I am trying to set up a new Windows Mail account but when at he request for >the account name and password assigned by my ISP I don't know what accont >name and password to enter. Call your ISP and ask them. -Frank Which email account do you want to set up, the one fro...

Removing Look for: Account option in the Look Up Records window
Hello again, I have another question: when I click the lookup button of the "Customer" field on, e.g. new "Invoice" form, a Look Up Records pops up. The re are two options for selecting a customer there in a drop-down: "Account" and "Contact". I would like to remove "Account" so that the customer could only be selected from "Contacts": I was unable to find the way to do it. Thank you in advance, Hrvoje I think you could remove it by using javascript and removing the account type code of the typecodes property of the lookup ...

Increasing text size in PowerPoint 2007 custom animation window
I have tried several display options in Windows XP to increase the text size in that window. I found none. Now I wonder if this is perhaps a setting in the Registry. Is there a procedure to increase this text size, which will help my rather poor vision? Thanks. ...

Need to resize a worksheet window
I have Excel 2002, and need help resizing a worksheet window. My problem is with a worksheet window that, when minimized, is so tall the worksheet tabs cannot be displayed at the bottom (when it's maximized they show just fine, but I need to work with it minimized). Even when I move the worksheet window up as far as I can on the screen, I still cannot reach the bottom border to resize it. Is there a way around this? -- Hasta Pasta Hasta, I think you mean restored, not minimized. The middle button. Restored is a variable-sized window. Minimized is just an icon (left button). ...

Unknown error windows VISTA
I am running vista service pack 2, 32 bit on Dell Inspiron 530 an windows cannot install Security update UPDATE KB979683, gives error msg that widows has encountered an unknown error FFFFFFF , and I cannot get it to install, need help -- HRayJones Hello HRayJ See this: http://www.microsoft.com/security/updates/015/ I hope this post is helpful. Let us know how it works ºut Ǝиçεl ©¿©¬ -=- PS If advise given from anyone, solves problem or not, or if solved from another source, post back & let us know. Then we all benefit. ...

country code maintenance window
Who knows the table name of the country code maintenance window PLEASE? That would be VAT10001. -- Tim Foster "Louella" wrote: > Who knows the table name of the country code maintenance window PLEASE? > > Thank you, Tim! How obscure, I would've never found it. "Tim Foster" wrote: > That would be VAT10001. > > > -- > Tim Foster > > > "Louella" wrote: > > > Who knows the table name of the country code maintenance window PLEASE? > > > > ...

Oh NO! Windows 7 does not include Movie Maker!
That's it, ain't buying this crap! PLEASE NOTE THAT THE WINDOWS 7 ENTERPRISE 90 DAY FREE TRIAL IS SLIGHTLY DIFFERENT FROM W7 ULTIMATE! long time windows user wrote: > That's it, ain't buying this crap! ============================ 5 Versions of Windows Movie Maker Running On Windows 7 http://www.brighthub.com/multimedia/video/articles/25282.aspx Windows 7 - Editing with XP's Movie Maker 2.1... but in Windows 7 http://www.brighthub.com/multimedia/video/articles/28935.aspx -- J. Inzer MS-MVP Digital Media Experience Notice This is...

Debug message window class
In a test MFC SDI application I've implemented a modeless dialog containing "just" a listbox that can be used to display debugging messages in much the same way that TRACE does but it functions not only when executing the application without the debugger but in the Release Version as well as the Debug Version when its enabled. It's at the work-in-progress stage and I have plans to do things like overload << and to make the # of messages retained variable, etc. But before I start down this bumpy road, and because -- at least right now -- it's not a simple cut-and-p...