Questions Tagged [Mfc]

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.

12,728 questions
0 votes
0 answers
22 views

winforms userControl inside MFC with no Clr

I have an MFC application that uses some specific files with CLR but not the whole project. The challenge is I want to embed a WinForms user control inside the MFC project without the whole project ...
  • 13
0 votes
0 answers
34 views

Component is not registered when adding variable to a dialog in MFC

I made my own ATL Control and then add it to an MFC project. Now I am trying to add a variable to the control and trying to add value to my control properties and call it's method. However, when I'm ...
1 vote
1 answer
59 views

How to add a callback in an event handler in legacy a MFC code?

This is a toy implementation of a legacy code using MFC. OnBnClickedButton is an event handler but it contains codes which are executed asynchronously in a different thread ( may be a bad idea). The ...
2 votes
1 answer
41 views

why SetSel and clear functions are used in editBox in order to write text

Suppose I have an editBox with text "this is edit", and then I want to change that text to "second" I think it is okay to code just like this: m_edit1.SetWindowTextW(_T("this ...
0 votes
0 answers
29 views

UDP winsock chat program receives -1 from recvfrom() and sendto()

Currently, we are producing UDP chat programs using MFC and C. I'm working on both bind because I have to send incoming messages from the server and client. An error occurs when recvfrom() and sendto()...
0 votes
1 answer
72 views

how do I fit my mat image to MFC Picture Control Size?

This is the part where the image set to the picture controller: void CMFCApplication3View::drawImg1(Mat img) { int nX = img.rows; int nY = img.cols; CImage image; Mat2CImage(&img,...
  • 11
0 votes
0 answers
31 views

Migration from VS2003 to latest versions

I have a C++ MFC project that was created and built on visual studio 2003. I want to apply modifications on the software. I tried to open it with visual studio 2013 but a lot of dependencies are not ...
1 vote
4 answers
127 views

What is Different Between "MFC DLL" and "Console Application DLL"?

What is the difference between creating a MFC DLL from Visual Studio wizard and creating C++ Console Application and changing the configuration type to DLL instead of .exe?
0 votes
1 answer
40 views

std::list<int> predicate call to function: Error C3867 function call missing argument list

I am using std::list's predicate to update the list based on predicate. But calling in the OnInitDialog() throws compilation error. My code is as follows: The below is .h: class CDlgWindow : public ...
-1 votes
0 answers
24 views

How do I solved Assertion failed error in my project

My project keeps showing this error. The File that the error is showing doesn't exist.
0 votes
2 answers
59 views

Converting std::list<int> iterator to an CString (MFC)

Newbie in world of MFC and MS Windows C++. I am trying to populate a ComboBox dynamically. But I am not able to convert the iterator pointer to CString or an std::string. Here is my sample code: bool ...
0 votes
0 answers
27 views

Initializing a set of structures and wrong data is showing up

So, I establish a static set of objects like this. static struct rpn_name_type { const std::string name; e_search_in search_in; funct_op& op; std::any obj; std::any val; }...
  • 1,778
0 votes
0 answers
23 views

Why does this cause an exception when I open a CDatabase (ACCDB)

Sample project: I am using VS 2022. Has basic code in the dialogs OnInitDialog: CDatabase db; if (db.OpenEx(_T("Driver={...
1 vote
0 answers
40 views

Removing top level Menu item (in MFC). .

1> I could remove top level menu item (along with its sub-menus) in MFC MDI application using below code. void CMainFrame::OnRemoveMyMenu() { ////////////////////////////////////////////////////...
0 votes
0 answers
24 views

file running with no assertion at release but shows assertion at debug mode

I'm working a project which work fine at release mode but through an debug assertion at debug mode. I already look into the project properties of both mode but they is no change in them + the path ...

15 30 50 per page
1
2 3 4 5
…
849
Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.