Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of VS 2008 feature pack Control

Shulou Source: shulou.com Published: 2022-06-02 08:31:30 10月03日 Update

This article shares with you the content of a sample analysis of VS 2008 feature pack controls. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

A problem was found during the use of the VS 2008 vc Enhancement Pack. Mfc was upgraded in VS 2008 feature pack, making it easy for mfc to build an office 2007-style interface. The questions are as follows:

The mfc office 2007 interface established by the wizard can work normally. Using the simplest dialog project, and then using office 2007, there is an error at:

BOOL _ stdcall CMFCVisualManagerOffice2007::SetStyle (Style style, LPCTSTR lpszPath) {if (m_Style = = style & & m_hinstRes > (HINSTANCE) 32) {return TRUE;} UNREFERENCED_PARAMETER (lpszPath); CString strStyle (GetStyleResourceID (style)); HINSTANCE hinstRes = AfxFindResourceHandle (strStyle, AFX_RT_STYLE_XML); if (: FindResource (hinstRes, strStyle, AFX_RT_STYLE_XML) = = NULL) {TRACE (_ T ("Cannot load Style:% s\ r\ n"), strStyle) ASSERT (FALSE); return FALSE;} CleanStyle (); m_Style = style; SetResourceHandle (hinstRes); m_bAutoFreeRes = TRUE; return TRUE;}

Can you see what the problem is? From the point of view of the code, it is a resource loading error. I once compared the difference between the code I wrote and the engineering code that could be run, and there was nothing wrong with the code. After searching on the Internet, VS 2008 feature pack has not encountered this problem in Chinese, only on a foreigner's forum. Discussion and discussion, writing is the problem of loading local resources, which is more fun. There are always some unknown mistakes in the old and new things. If you meet him, you still have to take care of him.

VS 2008 feature pack is really a good thing, at least with this, you can get rid of that pirated BCGCBPro. I think VisualManager still lacks some functions, for example, Dialog cannot support VisualManager. After looking at the code of CFrameImpl, I think it is OK to write a DialogImpl by visiting the model.

Thank you for reading! This is the end of this article on "sample Analysis of VS 2008 feature pack controls". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Problems code controls examples analysis good things content engineering more interfaces articles resources or errors running fun practical nothing no need Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno NVidia Linux Apple Shulou Tech Info