Questions tagged [mfc]
This tag should be used for questions concerning Microsoft Foundation Class Library (MFC), a C++ framework for Windows desktop GUI application programming. You should specify a tag for the version of C++ or Visual Studio being used. Due to the size of MFC, additional tags such as [com], [wininet], [winapi] or other subject matter tags are helpful.
13,149
questions
0
votes
0
answers
25
views
OPOS LDN Not Found in VS2022 (possible UAC issue?)
I know this is super esoteric but here goes:
I've just recently ported a vs2008 app to vs2022. As part of this process I'm cleaning up our various UAC issues so the application can be run properly by ...
2
votes
2
answers
97
views
I want to detect who causes a WM_COMMAND to be fired?
Background: I have an application with context menu, normal menu and accelerator.
I have a paste command and in case the context menu was opened with the mouse, the paste operation should use the ...
0
votes
0
answers
57
views
CreateDialogIndirectParam causes atom leak in MFC application?
I have an MFC Application where I added a common shared non-MFC library routine that displays a dialog with CreateDialogIndirectParam(). However, using deleaker I now see each time it is called, ...
1
vote
1
answer
66
views
ComboBox - add user value to dropdown list
I have CComboBox - dropdown type. I add there any predefined values from my own list in OnInitDilaog() method.
User can either choose value from list or add his own value to editbox. How can I add ...
0
votes
1
answer
47
views
MFC CDialog::Domodal returns -1 with exact error 1814
I'm trying to create a UI(dialog) in an existing dll using MFC where an application is supposed to call the method which should create this dialog(this can be any application. the dialog is specific ...
0
votes
1
answer
54
views
MFC Support in Visual Studio
I have a VC++ 6.0 application that looks rather dated and doesn't build on anything later than Windows 7. I'm worried that MFC will not be supported moving forward as I upgrade to newer versions of ...
0
votes
0
answers
53
views
How do I do horizontal and vertical ScrollBar at the same time? In Visual Studio on MFC C++
The download button opens the Documents folder and you select an image from the documents. The "Show" button displays horizontal scrolling and an image. If the dialog box is larger than the ...
0
votes
2
answers
63
views
How do I do horizontal and vertical ScrollBar at the same time? In Visual Studio on MFC C++ Where is the error?
The Load button opens the documents folder and you select an image from the documents. The Show button displays vertical and horizontal scrolls, as well as an image. If the dialog box is larger than ...
0
votes
1
answer
79
views
Default STATIC control height is 8 (dialog units) and text fits, but DrawText() DT_CALCRECT says it's too small?
Inside a dialog, I checked a STATIC control that was created using a default height of 8 dialog units in the resource editor. The text looks fine.
However, if I check the required text height with ...
0
votes
0
answers
21
views
How can I handle the selection in a Task Pane, AddMRUFilesList function, using MFC?
I want to handle the selection in a Task Pane, AddMRUFilesList function using MFC. I'd think that there would be a function to handle that option. But I can't find one.
0
votes
0
answers
75
views
Can't get fopen_s to work in new Visual Studio MFC project
I am trying to use some code that works fine in an earlier Visual Studio MFC project, but I can not get fopen_s() to work in a new Visual Studio MFC project. It refuses to open files. I can get a ...
0
votes
1
answer
77
views
Windows resource file (.rc) : RTEXT vs. LTEXT with WS_EX_RIGHT style
While doing localisation of dialogs in an .rc file I came upon following difference in the definition of a right aligned static control:
in the original resource file a static control in a DIALOGEX ...
0
votes
0
answers
37
views
CRichEditCtrl control Hyperlink color change
I have derived a class from CRichEditCtrl and the control contains multiple hyperlinks.
While every thing works as expected, customer wants to change the color of the hyperlinks to red. I tried many ...
-1
votes
1
answer
55
views
Preserve ScrollBar & Window position after resizing the Dialog
I have a MFC based Dialog application. I would like to preserve the previous scrolled position of the window and reshow the same position after resizing the dialog. How can I achieve it?
I am using ...
2
votes
1
answer
87
views
Exception on loading C# dll on a secondary thread in C++ MFC
I have a .NET Framework 4.8 console application and a test project in the same framework in C#, that use some dlls, with the following structure:
The c++ dll is in MFC.
The problem is the following ...