想用WTL的
BEGIN_MSG_MAP_EX(.....)但是老是提示
error C2664: 'CreateCompatibleDC' : cannot convert parameter 1 from 'struct HDC__ *' to 'class CDC *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
error C2065: 'SelectBitmap' : undeclared identifier
error C2440: '=' : cannot convert from 'int' to 'struct HBITMAP__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
我明明已经包含了atlcrack.h了啊
BEGIN_MSG_MAP_EX(.....)但是老是提示
error C2664: 'CreateCompatibleDC' : cannot convert parameter 1 from 'struct HDC__ *' to 'class CDC *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
error C2065: 'SelectBitmap' : undeclared identifier
error C2440: '=' : cannot convert from 'int' to 'struct HBITMAP__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
我明明已经包含了atlcrack.h了啊
回复内容太短了,XXXXXX,够了不??????
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CChCtrlHost, &CLSID_ChCtrl>,
public IDispatchImpl<IChCtrl, &IID_IChCtrl, &LIBID_DemoChCtrlLib>,
CDialogImpl<CChCtrlHost>
{
public:
CChCtrlHost()
{
} enum { IDD = IDD_DIALOG };DECLARE_REGISTRY_RESOURCEID(IDR_CHCTRL)DECLARE_PROTECT_FINAL_CONSTRUCT()BEGIN_COM_MAP(CChCtrlHost)
COM_INTERFACE_ENTRY(IChCtrl)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()BEGIN_MSG_MAP_EX(CChCtrlHost)
MSG_WM_CREATE(OnCreate)
MSG_WM_CONTEXTMENU(OnContextMenu)
END_MSG_MAP()//message implements
int OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
void OnDestroy();
void OnContextMenu(CWindow wnd, CPoint point);
大概就是这样,实现就不贴了