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

Create MFC controls in CDialog constructor [win32/MFC]

I'm working on the library, that wraps some MFC classes and methods. I want the user to be able to dynamically create a CDialogEx using a template in memory. For the modal dialogs, I call CDialog::InitModalIndirect and then CDialog::DoModal. For the…
mrdecompilator
  • 155
  • 1
  • 8
2
votes
0 answers

How to stop CDialog(mfc) from flickering on Invalidate when updating a RichEdit20A

I have a timer that I display to the user in a RichEdit20A that is inside a CDialog. The problem is every time I update the RichEdit20A, the screen flickers. Since I have several RichEdit20A in my Dialog, I have a method below that I use to update…
user3768804
  • 139
  • 1
  • 1
  • 15
2
votes
1 answer

Resize cursor is showing on the border of a fixed dialog frame

It is a bit difficult to provide you with a minimal working example here but I am going to try and explain this issue that I have only just noticed. The Context So, I have a regular CDialogEx derived class, defined like this: class…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
2
votes
1 answer

How can I display a nested CDialog within another CDialog?

I have two CDialog classes that I have created. Let's call them MainDialog and ExtraDialog. I want ExtraDialog to be able to be displayed both through doModal and as a nested dialog within MainDialog. I can already bring it up separately through a…
Kemal Tezer Dilsiz
  • 3,739
  • 5
  • 24
  • 43
2
votes
1 answer

How to nicely handle cdialogex resizing?

I do not want to use another classes for this purpose like easysize or sizecbar from codeproject.com. I am using MFC CDialogEx. I try this: LRESULT ChildDialog::OnNcHitTest(CPoint point) { // TODO: Add your message handler code here and/or call…
Muhammad Raza
  • 847
  • 1
  • 8
  • 22
2
votes
2 answers

Put MFC CDialog in a WPF form

We are porting an MFC application to WPF, and will probably won't have time to port the entire application. The MFC app has many CDialog-based windows, and we are thinking of leaving some of these windows in MFC, and show them inside a WPF window,…
splintor
  • 9,924
  • 6
  • 74
  • 89
2
votes
0 answers

How to create a CDialog transparent with Tree View Control in mfc cpp

I want to make my dialog transparent along with the tree control and the list box attached to it as transparent. I have gone through many samples and I am able to do it. Dialog and tree control Transparent by: BOOL CMyDlg::OnEraseBkgnd(CDC *pDC) { …
2
votes
0 answers

Problems using CDialogEx class that don't occur when using the CDialog class

1.- H ello. After searching in a lot of sites and forums all this week I found the point of the problem I was having. The problem is that when I create a New MFC project in Visual C++, if I set the Application type as "Dialog Based" and let the…
2
votes
2 answers

How to apply CS_DROPSHADOW to a subclass of CDialog

I have a c++ class, MyDialog, deriving from CDialog, where I have removed the Windows frame and thereby the Windows generated shadow. I would like to add the shadow again, without adding the frame. I have found there is a class style CS_DROPSHADOW…
JOG
  • 5,590
  • 7
  • 34
  • 54
1
vote
2 answers

MFC CDialog::Create fails

I'm having problems with some code to create a CDialog based window. The code was working fine last week. The only changes I made was replacing a C++ deque with a hash array. I had commented out the line of code with the Create method being…
Noaki
  • 1,673
  • 2
  • 14
  • 16
1
vote
3 answers

How to end a dialog mfc application from CDialog::OnInitDialog or immediately after this function ends?

In one case of my application, I want to end the application in the dialog's OnInitDialog or immediately after this function. Is there any way to do it? I tried using windows messages – in OnInitDialog calling SendMessage and in the handler of the…
Anorflame
  • 376
  • 3
  • 12
1
vote
2 answers

How to change CDialog icon in response to mouseover?

How can I change the application icon on mouseover? I want to put some menu items in the system menu of my CDialog, and I want the icon to highlight when the user mouses over it to indicate that it is a user interface component (similar to how…
User
  • 62,498
  • 72
  • 186
  • 247
1
vote
0 answers

Can I programmatically set this modeless dialog to be hidden so it is not even seen momentarily?

In my application I have two editors and each editor is displayed in a modal dialog. I am working on some test code to use one editor from within the other editor, to obtain data. This second editor is being loaded as a modeless dialog: void…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
2 answers

how to hide CDialogEX from taskbar? (MFC C++)

I have the main-frame, when someone is pressing a button I open a CDialogEX. After I open it, it get's an empty task-bar tab, with no title or icon... i want it to open as a child window of the main-frame and without task-bar tab. i have tried using…
eladyanai
  • 1,063
  • 2
  • 15
  • 34
1
vote
0 answers

Can we show the caret cursor as we drop files onto the CEdit control of a CDialogEx?

I have a OnDropFiles handler for a CDialogEx: void CWeekendMeetingDlg::OnDropFiles(HDROP hDropInfo) { __super::OnDropFiles(hDropInfo); // ... } Example in action: Is it possible to adjust it so that when the cursor is over the CEdit…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164