问题:在PB中添加process等扩展控件时程序运行不起来。
解决:
头文件:
#define _COMCTL32_
#include <commctrl.h>
#undef _COMCTL32_
在wmain函数中加入
INITCOMMONCONTROLSEX iccEx;
bool bResult = true;
// Initialize COM/OLE (Under CE, it's done via CoInitializeEx)
//if (FAILED(CoInitializeEx(NULL, COINIT_MULTITHREADED)))
{
// bResult = false;
}
// Initialize the common control DLL
memset(&iccEx, 0, sizeof (iccEx));
iccEx.dwSize = sizeof (iccEx);
iccEx.dwICC = ICC_BAR_CLASSES | ICC_UPDOWN_CLASS | ICC_COOL_CLASSES | ICC_PROGRESS_CLASS;
if (FALSE == InitCommonControlsEx(&iccEx))
{
MessageBox(NULL,_T("InitCommonControlsEx Failed!"),_T("warning"),MB_OK);
bResult = false;
}
source里
TARGETLIBS= /
$(_PROJECTROOT)/cesysgen/sdk/lib/$(_CPUINDPATH)/coredll.lib /
$(_PROJECTROOT)/cesysgen/sdk/lib/$(_CPUINDPATH)/commctrl.lib