error C2065: “HWND”: 未声明的标识符

展开阅读全文

error C2065: “m_pStrategyDlg”: 未声明标识符

10-28

新手请教个问题,网上查了半天也没找到原因。rnTESTStrategy.h里定义一个对话框的(TestItpDialog* m_pStrategyDlg;),但在TESTStrategy.cpp里面Strategy_CreatWindow函数使用该变量时总是提示“error C2065: “m_pStrategyDlg”: 未声明的标识符”。rnTESTSTRATEGY.H代码:rn#pragma oncern#include "strategybase.h"rn#include "list"rn#include rn#include "map"rn#include "TestItpDialog.h"//TestItpDialog 类的头文件rnrnusing std::vector;rnusing std::list;rnusing std::map;rnrnconst int MAX_BAR_SIZE = 1000;rnrnclass TestStrategy :rnpublic CStrategyBasernrnpublic:rnTestStrategy(void);rn~TestStrategy(void);rnrnvirtual int Strategy_OnStart(IiTPInterface* piTP);rnvirtual int Strategy_OnStop(IiTPInterface* piTP);rnvirtual int Strategy_CreatWindow(HWND hWnd,HWND hWndParent);rnvirtual int Strategy_DestroyWindow(HWND hWnd);rnrnprivate:rnrnTestItpDialog* m_pStrategyDlg; // 策略窗口rnrn;rnrnTESTStrategy.cpp里rnint Strategy_CreatWindow(HWND hWnd,HWND hWndParent)rnrn// 创建策略窗口rnAFX_MANAGE_STATE(AfxGetStaticModuleState());rnm_pStrategyDlg = new TestTipDialog;rnif (NULL == m_pStrategyDlg)rnrnASSERT(FALSE);rnreturn -1;rnrnif (!::IsWindow(m_pStrategyDlg->GetSafeHwnd()) && !m_pStrategyDlg->Create(TestItpDialog::IDD))rn rn return -1;rn rnm_pStrategyDlg->ModifyStyleEx(WS_POPUP | WS_BORDER | WS_DLGFRAME,WS_CHILD);rn hWnd = m_pStrategyDlg->GetSafeHwnd();rnreturn 0;rnrnrn 论坛

没有更多推荐了,返回首页