Questions tagged [cdialog]

In MFC, the base class used for displaying dialog boxes on the screen.

In MFC, the base class used for displaying dialog boxes on the screen.

Dialog boxes are of two types: modal and modeless. A modal dialog box must be closed by the user before the application continues. A modeless dialog box allows the user to display the dialog box and return to another task without canceling or removing the dialog box.

A CDialog object is a combination of a dialog template and a CDialog-derived class. Use the dialog editor to create the dialog template and store it in a resource, then use the Add Class wizard to create a class derived from CDialog.

MSDN Documentation

118 questions
17
votes
3 answers

How to send a string via PostMessage?

Inside my app, I want to send a message to a dialog from a different thread. I want to pass an std::exception derived class reference to the dialog. Something like this: try { //do stuff } catch (MyException& the_exception) { …
LLucasAlday
  • 2,349
  • 11
  • 34
  • 41
15
votes
6 answers

How to display a non-modal CDialog?

Can someone tell me how I could create a Non Modal Dialog in MFC's Visual c++ 6.0 and show it? I wrote this code: CDialog dialog; if (dialog.init(initialization values...)) dialog.DoModal(); But it blocks my application from showing the dialog.…
9
votes
3 answers

Convert a modeless dialog to modal at runtime

I have a dialog (CDialog derived class) that can be used in two different ways (edition mode and programming mode). When the dialog is open to be used in programming mode it is a modeless dialog that it is used for modifying the main view (kind of a…
Javier De Pedro
  • 2,219
  • 4
  • 32
  • 49
7
votes
1 answer

CDialog memory leaks in VC10

We are upgrading from VC8 to VC10 and have found a number of memory leaks that seem to be CDialog related. The simplest example of this is demonstrated with the following code using a CDialog that just has a number of buttons. In VC10 this leaks,…
lilburne
  • 565
  • 1
  • 3
  • 10
6
votes
3 answers

Command-line dialog tool for Windows

I need a dialog tool similar to cdialog (or whiptail), but one that will work on Windows. I have MinGW and compiling something from source is no problem, but both cdialog and whiptail, the only ones that I know of, contain code that is…
rix0rrr
  • 9,856
  • 5
  • 45
  • 48
6
votes
4 answers

Difference between CDialog and CDialogEx

What is the difference between CDialog and CDialogEx? I decided to use CDialog because I can't assign m_pMainWnd to Dlg if Dlg is derived from CDialogEx. BOOL CPreparationApp::InitInstance() { MyClass2 Dlg; //derived from CDialog m_pMainWnd…
Andrey Zakcharenko
  • 311
  • 2
  • 4
  • 8
5
votes
1 answer

How to get window handle from a CDialog derived class?

Is there a way to retrieve window handle from a CDialog derived class (like CWnd::m_hWnd member) ? Thanks
ivymike
  • 1,511
  • 2
  • 20
  • 27
5
votes
6 answers

CDialog::Create fails for dialog with ActiveX control

I have a module that creates a modeless dialog containing an ActiveX control. This module was part of an MFC EXE application and the creation of the dialog worked fine. Recently, I moved the module out into an ATL/COM server and copied the dialog…
user1756114
  • 51
  • 1
  • 2
4
votes
1 answer

CDialog with IWebBrowser component, backspace doesn't work

I have an MFC CDialog with an IWebBrowser2 in it. I get to a page that has a HTML text area, I can input text but backspace doesn't erase it.
in need of help
  • 1,606
  • 14
  • 27
3
votes
1 answer

Create a control dynamically in an MFC application

According to this link from Microsoft, it should be possible to define a CButton and specify its parent window (CDialog) without having the CButton as a member of the Dialog, but I couldn't do it. So if myButton is a member of a CDialog-derived…
towi_parallelism
  • 1,421
  • 1
  • 16
  • 38
3
votes
1 answer

CDialog to CView

So I've an MFC based application, which is primarily derived from CDialog, with some controls etc. For certain reasons, it needs to be hosted in another application, using a container class, which is based on CView. So there has to be some way...of…
user1173240
  • 1,455
  • 2
  • 23
  • 50
2
votes
0 answers

MFC Modal Dialog is behind other elements

I'm writting a tool which involves displaying data in a CListCtrl. When the user right clicks on an item a menu opens with the option to show more details. I created a class CListCtrExt which extends the features of CListCtrl. When the user clicks…
rgutt
  • 43
  • 5
2
votes
1 answer

Problem with a non-modal, self-closing dialog in combination with other dialogs

It is about a MFC-MDI application. I have added a popup window, which should be closed after some duration. Therefore, I create a non-modal dialog CPopupDlg* pDlg = new CPopupDlg(this); if (pDlg) { pDlg->Create(IDD, this); …
2
votes
0 answers

Modernise look of CMDIChildWndEx in MFC / Visual Studio 2019

Hi my old Windows 10 app uses MFC's CMDIChildWndEx class for some of its windows, and they look about 100 years old, presumably as MDI got deprecated. But is there a way to get a more modern look? The CDialog dialogs look nice and modern after…
drb01
  • 189
  • 1
  • 2
  • 17
2
votes
1 answer

CDialog ShowWindow problem

I have a SDI application. In the application there's a modeless dialog which is used to show some message like communicating with the server during doing work. Question is, when the dialog's parent window is set to main frame, the ShowWindow method…
Wilbur
  • 21
  • 2
1
2 3 4 5 6 7 8