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
0
votes
2 answers

Is there a list of controls or controls container defined in an MFC dialog

I'm asking about a list or controls container in mfc dialog? i don't mean listing the child windows of the a dialog like this question Loop through MFC Child Dialogs, MDIFrames etc ,What i want is a list of the controls defined as variables in the…
ahmedsafan86
  • 1,776
  • 1
  • 26
  • 49
0
votes
1 answer

CWnd::GetParent causes an exception

I am trying to call the function GetParent() of CWnd class. Every time there is an exception thrown. I'm calling the function from a working thread. This is the line that causes the exception: CWnd* parent = this->GetParent(); I've also tried…
g-los
  • 33
  • 1
  • 7
0
votes
1 answer

Is there a way to defocus fields in CDialog of VC++?

When I make a dialog using CDialog project of VC++, I can not defocus any field on this dialog(CDialog). What I want to do is how some field can be defocused when I clicked the outside of this field with mouse. Thanks for any advice and comments.
0
votes
1 answer

CDialog not main frame descendant

Is there a way to make a dialog (CDialog) not descendant of the main frame? If I don't specify a parent window at creation time the parent window is the main application window. I have tried to use SetOwner and SetParent with a NULL parameter but…
Javier De Pedro
  • 2,219
  • 4
  • 32
  • 49
0
votes
1 answer

Fastest method to enumerate the child controls in a CDialog

What's the best way to list all the controls that may be on a CDialog based form? The only method I've seen so far is EnumChildWindows() but this involves call backs. Is there no faster way to do this?
snowdude
  • 3,854
  • 1
  • 18
  • 27
0
votes
1 answer

Block escape key in CDialog-derived class

I have a list control and a number of CDialog-derived forms without border. When user clicks on a particular list item - a particular form is displayed. I used CDialog class as a base class for these forms. Everything works well but when I press…
user1260953
  • 35
  • 1
  • 4
0
votes
1 answer

I want to dynamically show 2 images in MFC CDialog dialog box. Can somebody please give me a hint on how to do it?

I am able to show 2 images by opening 2 dialog boxes, but I want to show both of them in the same dialog box. The images will keep on changing
Poojan
  • 3,312
  • 4
  • 20
  • 23
-1
votes
1 answer

Delete a file when dialog box is closed?

This is my code, and its working fine. However I would like to remove the file by variable xmlfilepath which I have mentioned in the OnInitDialog() BOOL CTestDlg::OnInitDialog() { CString xmlfilepath = _T("C:\\Project\\Test\\test.xml"); …
-1
votes
1 answer

Refresh CDialog MFC in the same dialog class

Is there any way to refresh() MFC CDialog in the same class? I have tried using Invalidate(), RedrawWindow(), UpdateWindow() without success... I would appreciate any kind of help.
Alberto Bricio
  • 402
  • 1
  • 6
  • 22
-1
votes
2 answers

MFC: X button on one window is closing a second window also

My application has several windows, each of a different CDialog-derived class. Hitting the "X" button in the upper-right-hand corner of the window frame closes the window and calls PostNcDestroy. For one of the four windows, though, it ALSO calls…
Swiss Frank
  • 1,985
  • 15
  • 33
-1
votes
1 answer

Parent-Child implementation of CDialog classes

Scenario: I Want to use the Parent methods in child. Is it possible to create a solution with two dialog classes as shown below? //Parent is created using class wizard(inherited from CDialog) class CDlgParent : public CDialog //Child class…
RENN
  • 11
-2
votes
2 answers

Font style of caption/title of CDialog

I want to change the font style and font size of title/caption of Dialog(Derived from CDialog).Since caption/title is not associated with any resource id so i can't even use SetFont().Tell
-3
votes
2 answers

Dialog box Handle in MFC

I am creating a dialog box for my Credential Provider. For that I am creating a MFC CDialog box with three edit text labels for: old password, new password, confirm password. After creating dialog box I got an .exe file and its works fine, but I…
BIJAY
  • 13
  • 5
1 2 3 4 5 6 7
8