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
1 answer

Enter key does not trigger IDOK Default Push Button action

I have a CDialog derived class. Its interface definition has several picture boxes and some buttons after, defined in resource file as: IDD_SELECT_ITEMS DIALOGEX 0, 0, 462, 274 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |…
sergiol
  • 4,122
  • 4
  • 47
  • 81
1
vote
2 answers

OnInitDialog not called in descendant of CDialog

I have a class Derived from CDialog (CNotificationDialog) which is auto-generated by Visual Studio when selecting the Add Class option. I also have another class that's derived from CNotificationDialog (CWebNotificationDialog). My code is something…
conectionist
  • 2,694
  • 6
  • 28
  • 50
1
vote
1 answer

CMFCMenuButton does not close

I have a CDialog with a CFMCMenuButton. when I open it, everything appears normally: The problem happens when I click somewhere else to close the menu. The menu seems unclosable, unless user selects an option of it. And if I press Escape on the…
sergiol
  • 4,122
  • 4
  • 47
  • 81
1
vote
1 answer

Copying text from an MFC CDialog

I'm currently working on code that I inherited. There is a class (I'll refer to it as logWindow) which inherits from CDialog. Overall the logWindow class creates a window and prints out text. What I need to do is copy the text that is automatically…
1
vote
1 answer

why do cx/cy from GetWindowRect(rcWindow2) differ from cx/cy fed into OnSize?

I want to get the cx and cy during OnInitDialog of a CDialog. I can do this with the following code: myDialog::OnInitDialog() { CRect rcWindow2; this->GetWindowRect(rcWindow2); CSize m_szMinimum = rcWindow2.Size(); int width =…
Fractal
  • 1,748
  • 5
  • 26
  • 46
1
vote
1 answer

How to enable shadow for Owner Drawn Dialog

I am using owner drawn dialog. I like to give the shadow for my sub-dialog. Is it possible? Thank in advance.
bala
  • 275
  • 2
  • 3
  • 13
1
vote
1 answer

Should a CDialog based app set AfxGetApp()->m_pMainWnd

EDIT: I Need to Research some weird stuff first, is there some way to put the question "on hold"? Original: I am working on an existing codebase using a CDialog based GUI. The Application consists of a CDialog "MainWindow", which spawns other…
Lukas Rieger
  • 676
  • 10
  • 31
1
vote
1 answer

Open CDialog from Java using JNI

I have an application that needs to open a CDialog written inside a DLL. The problem is that when DoModal() is called inside the DLL, the program crashes with: "Debug Assertion Failed!". Does anyone have any idea how can i get the CDialog opened?…
Cristian
  • 11
  • 1
  • 1
1
vote
4 answers

Visual C++ 6.0 - OnInitDialog in a Derived CDialog class not working

I have create a simple MFC appwizard dialog project. I used the Class Wizard to create a new class called CMyDlg based on CDialog. Then I went to the Message Map screen and doubleclicked on the WM_INITDIALOG entry to automatically create a…
SparkyNZ
  • 6,266
  • 7
  • 39
  • 80
1
vote
2 answers

I can't seem to add a column header to a list box in an inherited MFC dialog. What's wrong?

I have a CStdDlg thats inherits from a CDialog class. In the CStdDlg dialog, I have a list box (m_lcList1), edit box (m_ceEdit1), a radio button(m_rbButton2) and buttons OK, Cancel and Button1. I am trying to create another class named…
Mike S
  • 27
  • 5
1
vote
0 answers

MFC floating CDialog control clipping issue

I am making an SDI MDF application that uses a frameview to provid the user with a set of controls (buttons, editboxes and such). The view also owns a set of CDialogs used to desplay aditional controls that can be can be shown or hidden via a…
JBode
  • 23
  • 3
1
vote
1 answer

VB6 Host with MFC DLL Showing Modal Dialog Incorrectly

We have a VB6 application that we have provided extended functionality through an MFC DLL. However, there's a specific problem with CDialog-based classes in the DLL. We pass in Me.hWnd from the VB6 app's main form to give to the CDialog constructor…
Todd Sprang
  • 2,899
  • 2
  • 23
  • 40
1
vote
0 answers

CDialog DoModal (dialog opens with keyboard focus, but not mouse focus)

I have a CDialog window (CDrafter) which contains a CRichEditCtrl control. I overrided CDrafter::PreTranslateMessage and CDrafter::OnNotify to allow me to click on special words in the RichTextEdit with the mouse, which in turn opens another dialog…
user297500
  • 210
  • 3
  • 16
1
vote
2 answers

mfc tab control switch tabs

I created a simple tab control that has 2 tabs (each tab is a different dialog). The thing is that i don't have any idea how to switch between tabs (when the user presses Titlu Tab1 to show the dialog i made for the first tab, and when it presses…
MRM
  • 561
  • 5
  • 12
  • 29
1
vote
1 answer

c++ CDialog ID change

I have a CDialog class and i need it to be called by a sum of other classes, at the same time. This should work from what i understand, but it would be the same instance of the Dialog, and i need as many different instances as calling classes. Is…
MRM
  • 561
  • 5
  • 12
  • 29