RSS

Category Archives: MFC

Cannot open file ‘mfc120d.lib’


If you encounter below error:

error LNK1104: cannot open file ‘mfc120d.lib’   

Try download and install Multibyte MFC Library for Visual Studio 2013.

 
Leave a comment

Posted by on May 7, 2014 in MFC, Programming

 

Tags: , ,

How to solve error LNK1104: cannot open file ‘mfc120d.lib’


If you encounter the same problem as below:

 error LNK1104: cannot open file ‘mfc120d.lib’ 

You can solve this problem by downloading Multibyte MFC Library for Visual Studio 2013 and install that. However note that VisualStudio has deprecated MBCS support in MFC, and unicode is preferred.

 
Leave a comment

Posted by on March 3, 2014 in MFC, Programming

 

Tags: , , , ,

Application 0x00000007 error and troubleshooting


Recently I was asked to build a MFC application, and it worked on my development PC, but after packaging all the dlls, the application does not run, and an error with 0x00000007 pops up.

I then opened the exe file with Dependency Walker:

image

Read the rest of this entry »

 
Leave a comment

Posted by on February 27, 2014 in MFC, Programming

 

Tags: , , , , ,

Duplicate Toolbars/buttons after reinstalling Visual Studio .Net


My Visual Studio.Net crashes frequently and I then asked my colleague to reinstall it for me. Sadly, after reinstallation, the GUI becomes rather chaotic, with duplicate toolbar buttons as shown below:

clip_image002

Read the rest of this entry »

 
Leave a comment

Posted by on July 29, 2011 in MFC, Programming

 

Using /clr and incompatibility troubleshooting in MFC applications


In some circumstances, to use C# Winform or other .Net objects in MFC applications, the “/clr” directive should be used in the MFC project settings. However, it is found not always possible to use “/clr” to avoid conflicts with other projects in the same solution.

The workaround is to apply “/clr” on a specific cpp file, rather than on the entire project!

clip_image002

Read the rest of this entry »

 
Leave a comment

Posted by on April 16, 2011 in Dotnet/C#, MFC

 

Tags:

How to use .Net Winform or UserControl in MFC


For VisualStudio 2005 or above versions, refer to below link

http://msdn.microsoft.com/en-us/library/ahdd1h97.aspx
http://msdn.microsoft.com/en-us/library/b1kyh79x(v=VS.80).aspx

The basic idea of this implementation is to use the class CWinFormsControl<NameSpce::WinformClass/UserControlClass> to host .Net Winform or UserControl.

This article presents how to implement this in VS2002 environment. Read the rest of this entry »

 
1 Comment

Posted by on April 16, 2011 in MFC

 

How to manually setup/modify Visual C++ Project settings such as /GL, /Yu etc. in VisualStudio.Net 2002


Most Visual C++ project settings can be setup using the Project Properties dialog, but not all. In my recent project, I am trying to host Windows Form in MFC (VS2002), and the directive “/clr” must be used.

Once “/clr” is used, some other directives such “/GL” must be disabled to avoid incompatibilities. After searching MSDN, I have found that “/GL” is related to “Whole Program Optimization”, but even after disabling the whole program optimization in Visual Studio 2002, it is stated that the “/GL” switch is still turned on. I have tried every setting, but have no way to disable this, and this is clearly shown in the final command line.

Read the rest of this entry »

 
Leave a comment

Posted by on April 16, 2011 in MFC

 

Tags: