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
1
vote
2 answers

Avoid Flickering on a dialog that moves its controls on resize

I have a popup dialog( CDialog ) that handles WM_CTLCOLOR message to color itself. It is having some controls (like bitmap buttons) that draws themselves using OwnerDraw. It is also having a control that displays an image with size that takes up to…
Ragesh Chakkadath
  • 1,521
  • 1
  • 14
  • 32
1
vote
1 answer

MFC: Adding a status bar to a CDialogEx that is resizable?

I thought it be nice to add a Status Bar with percentage and other information to a CDialogEx that is used for viewing an image. But it doesn't seem that you can simply use a CMFCStatusBar or a CStatusBar and have it just work. I found various…
df234987
  • 513
  • 2
  • 13
1
vote
1 answer

Associated dialog controls with a structure member variables

I have this struct definition: typedef struct tagPublicTalkInfo { CString strAwayCong1; CString strAwayCong2; CString strAwayBrother1; CString strAwayBrother2; CString strChairman; CString strCong; …
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
1 answer

Using DDE registered file associations with CDialog app?

I know that SDI and MDI projects by design have the concept of a file type and that you can double-click from file explorer. For example: BOOL CCommunityTalksApp::InitInstance() { // Enable DDE Execute open EnableShellOpen(); …
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
1 answer

How to show Cdialog with std::async

I have a derive class named A was inheritance from CDialog, I created the object to A named a and want to utilize the member function domodal to show dialog. Nonetheless, this dialog cannot show and parent window was block. A a(this); auto…
Savner_Dig
  • 21
  • 1
  • 8
1
vote
2 answers

Set position of MFC dialog-based application window

I have a CDialog based MFC application. I save the window's current position when the program ends. When the program starts, I want to restore the previous position. I'm currently trying to do this in OnInitDialog(), however, the program asserts…
Steve A
  • 1,798
  • 4
  • 16
  • 34
1
vote
1 answer

.NET + COM changed keyboard routing behavior

I have a problem so strange that I hardly can put an adequate title to it. In short: I have COM object written in MSVC++/MFC with a dialog derived from CDialog. On that dialog I have three child "user controls" - windows derived from plain…
Dan Byström
  • 9,067
  • 5
  • 38
  • 68
1
vote
0 answers

MFC modal dialog prevent another modal dialog to continue after dialog closed

Created a simple mfc project, then create three dialog and add CDialog class. TestA, TestB, TestC classes. In the main frame dialog, void CMFCApplication3Dlg::OnBnClickedButton1() { TestA *a = new TestA(CWnd::FromHandle(GetSafeHwnd())); …
tatarmiki
  • 11
  • 1
1
vote
0 answers

Adding statusbar to CDialog and setting control positions correctly

So, I have a CDialog resource that I have had for a long time and I decided to add a statusbar to it. Here is the resource: All controls fit nicely in the dialog. Now, at runtime this is what it looks like: The tutorial I followed was here and for…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
1 answer

CDialog not closing when two buttons mapped

Visual Studio 2005, C++, Windows XP. I have a CDialog with a single button, which calls a function like so: BEGIN_MESSAGE_MAP(Foo, BaseDlg) //BaseDlg inherits from CDialog ON_BN_CLICKED(IDBAR, Bar) END_MESSAGE_MAP() The dialog box closes when…
Aris
1
vote
1 answer

Create multiple CDockablePanes onto an CDialog

I'm trying to do exactly the same as the article describes here: "C++ MFC Feature Pack --> Create multiple CDockablePanes onto an CDialog" I followed his procedure and now am able to undock and move the CDockablePane, but get the same crash when…
Yifeng
  • 11
  • 4
1
vote
0 answers

Is there a way to scale radio buttons or checkboxes for MFC CDialog?

We scale the controls in the dialog based on a current "zoom" font size. Works great for text, edit controls, group boxes. However, the physical radio button circle and checkbox squares are all the same/original "100%" size. Other than writing our…
franji1
  • 3,088
  • 2
  • 23
  • 43
1
vote
4 answers

How to SetFocus to a CButton so that the border and focus dotted line are visible?

I created a simple dialog-based application, and in the default CDialog added three buttons (by drag-and-dropping them) using the Visual Studio editor. The default OK and Cancel buttons are there too. I want to set the focus to button 1 when I…
LLucasAlday
  • 2,349
  • 11
  • 34
  • 41
1
vote
4 answers

Custom tooltip with a WS_POPUP dialog

I want to create custom tooltips where I can put any kind of controls. I have derived from CDialog and used the WS_POPUP | WS_BORDER styles. I also add the CS_DROPSHADOW style in the OnInitDialog to get the tooltip shadow. Then I manage myself the…
Javier De Pedro
  • 2,219
  • 4
  • 32
  • 49
1
vote
0 answers

MFC VS2010 Can't Add CDialogEx derived class by wizard

In my MFC project I try to create dialog. So in Resource View insert Dialog. Then double click inside dialog, to get dialog class. MFC Add Class Wizard runs, when I input Class name, and select Base class: CDialogEx. Click Finish button, wizard…
CAD Developer
  • 1,532
  • 2
  • 21
  • 27