Click here to Skip to main content
16,012,468 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: create/control dynamic combo box Pin
elephantstar18-May-04 10:53
elephantstar18-May-04 10:53 
GeneralWaring 4530 Pin
monrobot1317-May-04 13:47
monrobot1317-May-04 13:47 
GeneralRe: Waring 4530 Pin
alex.barylski17-May-04 14:39
alex.barylski17-May-04 14:39 
GeneralRe: Waring 4530 Pin
monrobot1317-May-04 16:29
monrobot1317-May-04 16:29 
GeneralRe: Waring 4530 Pin
alex.barylski17-May-04 18:53
alex.barylski17-May-04 18:53 
GeneralRe: Waring 4530 Pin
Mike Dimmick18-May-04 2:59
Mike Dimmick18-May-04 2:59 
GeneralRe: Waring 4530 Pin
monrobot1318-May-04 5:23
monrobot1318-May-04 5:23 
GeneralIs it Modeless or Modal dialog. I'm confused Pin
robert_s17-May-04 13:27
robert_s17-May-04 13:27 
Hi
As far as I know there are two types of dialogs. Modeless and Modal.

Now according what it says here : [url]http://www.devarticles.com/c/a/Cplusplus/Using-MFC-in-Cplus-Dialog-Boxes/4/[/url] and also on Microsft's MSDN site that to create Modeless dialog I must call Create() function and DestroyWindow() function. Whereas for the modal dialog I only call DoModal.

Now I am confused as my dialog does not call any of those functions and I am still able to display it.


The dialog initialization is:
BOOL CProgressDlg::OnInitDialog()
{
CDialog::OnInitDialog();
ShowWindow(SW_HIDE); // Show or hide a control, etc.
return TRUE;
}

and to display I call ShowWindow(SW_SHOW);


and Close() function to close dialog:

void CProgressDlg::Close()
{
EndDialog(IDOK);
}

It works.! So what kind of dialog is this? I guess this is a modeless dialog as it doesnt need to wait untill the user presses OK button. Is it correct what I am doing here or its wrong? Please let me know.


My second question: The dialog I created is used to display a progress bar while some text files are processed using a separate worker thread (thread used purely for files processing not for the dialog). The problem I have is when I start processing files the dialog with the progress bar appears but its behind the main window. How can I force it to display over the main window as the modal dialogs do? I guess WS_OVERLAPPED will do but where to use it?
GeneralRe: Is it Modeless or Modal dialog. I'm confused Pin
alex.barylski17-May-04 13:42
alex.barylski17-May-04 13:42 
GeneralCombo Box and Edit Box Pin
Eversman17-May-04 13:10
Eversman17-May-04 13:10 
GeneralRe: Combo Box and Edit Box Pin
alex.barylski17-May-04 13:32
alex.barylski17-May-04 13:32 
GeneralRe: Combo Box and Edit Box Pin
Eversman17-May-04 13:38
Eversman17-May-04 13:38 
GeneralRe: Combo Box and Edit Box Pin
alex.barylski17-May-04 13:46
alex.barylski17-May-04 13:46 
GeneralRe: Combo Box and Edit Box Pin
Eversman17-May-04 13:52
Eversman17-May-04 13:52 
GeneralRe: Combo Box and Edit Box Pin
monrobot1317-May-04 13:52
monrobot1317-May-04 13:52 
GeneralRe: Combo Box and Edit Box Pin
Eversman17-May-04 13:59
Eversman17-May-04 13:59 
GeneralRe: Combo Box and Edit Box Pin
Eversman17-May-04 14:01
Eversman17-May-04 14:01 
GeneralRe: Combo Box and Edit Box Pin
monrobot1317-May-04 14:32
monrobot1317-May-04 14:32 
GeneralRe: Combo Box and Edit Box Pin
Eversman17-May-04 14:36
Eversman17-May-04 14:36 
GeneralRe: Combo Box and Edit Box Pin
monrobot1317-May-04 16:18
monrobot1317-May-04 16:18 
GeneralRe: Combo Box and Edit Box Pin
Eversman17-May-04 16:22
Eversman17-May-04 16:22 
QuestionVirtual MIDI Ports/Drivers ? Pin
mikemilano17-May-04 12:57
mikemilano17-May-04 12:57 
AnswerRe: Virtual MIDI Ports/Drivers ? Pin
Jim A. Johnson17-May-04 13:17
Jim A. Johnson17-May-04 13:17 
GeneralRe: Virtual MIDI Ports/Drivers ? Pin
mikemilano17-May-04 14:22
mikemilano17-May-04 14:22 
Generalmemory and CPU related question Pin
ben217-May-04 12:27
ben217-May-04 12:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.