在STDAFX。H 加上 #include <afxwin.h> // MFC core and standard components #include <afxext.h> // MFC extensions #include <afxdisp.h> // MFC Automation classes #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #ifndef _AFX_NO_AFXCMN_SUPPORT #include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT ---------- 在WINMAIN() { InitCommonControls();//在开始的地方加。 }
win32app NOT using mfc!
: fingerfox: thanks 为什么没有tab?
为什么只是显示一块类似BUTTON的矩形?
MFC控件需要初始化然后才能用。 记得设置PROJECT->SETTING->USE MFC IN A SHARE DLL
向导生成了一个vc的hellow world
win32app?
mfcapp?
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
----------
在WINMAIN()
{
InitCommonControls();//在开始的地方加。
}
NOT using mfc!
thanks
为什么没有tab?
记得设置PROJECT->SETTING->USE MFC IN A SHARE DLL
如何用TAB,还是查MSDN吧。
:)
TC_ITEM tItem;
tItem.mask = TCIF_TEXT;
tItem.pszText = "&Tab 1";
tItem.cchTextMax = strlen(tItem.pszText);
m_tabctrl.InsertItem(0, &tItem); m_tabctrl.ShowWindow(SW_SHOW);