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
3 answers

MFC CDialog not showing

here is my problem : In my Solution, I have 2 projects, one is a lib in which I created a ressource file (mylib.rc) and a dialog template in it. Then I made a class which inherits CDialog and uses this template. But when I instantiate it and call…
Jesus_21
  • 180
  • 1
  • 7
1
vote
2 answers

Create a CDialog in the corner of the screen

I have an MFC application that creates a CDialog. I'd like this CDialog to not show up in the middle of the screen, but rather off to the side of the screen so its barely visible or even minimized would be good. How can I do this?
samoz
  • 56,849
  • 55
  • 141
  • 195
0
votes
2 answers

Dividing a CDialog in two areas with different backgrounds (picture of the objective inside)

I need to build a window designed to look exactly like this (it has controls inside the white area, but that's not relevant for now): http://dl.dropbox.com/u/3432167/example.png My problem is defining those two separate "areas" with different…
baderous
  • 121
  • 8
0
votes
0 answers

Why is CTRL + P not firing for my CDialog menu item?

Sample menu: IDR_MENU_PUBLISHERS_DATABASE MENU BEGIN POPUP "Database" BEGIN MENUITEM "Print\tCTRL + P", ID_DATABASE_PRINT END END Handler: void CPublishersDatabaseDlg::OnDatabasePrint() { …
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
1 answer

How to display system menu on CDialog popup?

I have a CDialog based application. In the Visual Studio resource editor the properties for my dialog show the style is set to "Popup" and the System Menu value is "True". However when I run my application there is no system menu; how can I get a…
User
  • 62,498
  • 72
  • 186
  • 247
0
votes
0 answers

How can I pass a FILE * to stdin/stdout to a C function via Ruby's Fiddle?

I'm trying to interface with an ncurses library (Thomas Dickey's dialog to be precise) using Fiddle and I need to pass FILE pointers for stdin and stdout to the library, but everything I try results in a segfault. Here is an example of one thing I…
Joe McDonagh
  • 163
  • 6
0
votes
0 answers

Confused by failuer of CDialog::Create()

ZTRACE_RUNTIME("Creating Processing Panel"); BOOL result = processingDlg.Create(IDD_PROCESSING); if (FALSE == result) { int lastErr = GetLastError(); ZTRACE_RUNTIME("lastErr = %d", lastErr); } This is a debug build. Problems: I can't…
0
votes
1 answer

MFC aero shake window message

I am working on a program built in MFC. I have this weird situation when I shake my CFormView. The first time everything is minimised correctly, but when I shake it the second time while all of the windows are restored, one of my CDialog's inside…
eladyanai
  • 1,063
  • 2
  • 15
  • 34
0
votes
1 answer

Simplest way to read MFC messages from HWND?

I am trying to use an api library with functions that send messages to a server, then receive back messages. One of the function's arguments is a HWND and the library document says the message will be received by it. To read the received message I…
Hpotato
  • 3
  • 5
0
votes
1 answer

How to Make a Simple GUI with DropDown Menus with C++

I am really struggling how to make a window with three selections of options. I currently have a setup that uses a CFileDialog object and have successfully implemented two dropdown menus and multiple check items. What I want is to implement a pop up…
0
votes
1 answer

How do I add a WebView2 control to a CDialog resource in a MFC project?

I have been able to download and build the sample projects from Microsoft. I can run the Win32 project and it displays a WebView2 object in the View and appears functional. For my situation I want to use a CDialog as the parent for the WebView2…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
1 answer

Issues with handling ON_WM_NCPAINT() message and OnNCPaint() override. (Overriding default MFC window border) [2020]

I'm attempting to create a "dark mode" theme for my Windows app, and I'm experiencing some inconsistencies with overriding the OnNcPaint() function. Please pardon the giant red box. I'm only coloring it in that way to show the issue. Here's my…
Skewjo
  • 379
  • 3
  • 12
0
votes
2 answers

Show dialog from MFC DLL

I loaded the form but only buttons without functions HMODULE hModule = LoadLibrary(L"Tools.dll"); if (hModule != NULL) { AfxSetResourceHandle(hModule); CDialog dgl(MAKEINTRESOURCE(199), NULL); dgl.DoModal(); } so how I can load a full…
AMINE
  • 3
  • 1
  • 2
0
votes
1 answer

Sometimes ShowWindow never calls OnShowWindow and main App hangs

I have a multi-threaded application with several supporting DLLs and several popup dialogs. My Main App loads all DLLs on startup, which creates all popups, but they are kept hidden until needed. When the user presses a button in the main app, a…
0
votes
1 answer

MFC: Creating a class (CWnd?) with a CTreeCtrl and a CToolbar

I have a CDialog based application that has two side-by-side CTreeCtrl and both trees have nearly identical CToolbars above them. Currently, when the dialog receives a message from one of the toolbars, it passes the message to the appropriate tree.…
Steve A
  • 1,798
  • 4
  • 16
  • 34