atl做acitvex控件,中间有语句
((CStatic *)hWnd5)->GetWindowRect(&orirc);
运行到此时报错
Unhandled exception in Mby.exe MFC42D.DLL :0xC0000005;Access Violation
然后停留在:
{ ASSERT(::IsWindow(m_hWnd)); ::GetWindowRect(m_hWnd, lpRect); }
这是杂回事哦!
((CStatic *)hWnd5)->GetWindowRect(&orirc);
运行到此时报错
Unhandled exception in Mby.exe MFC42D.DLL :0xC0000005;Access Violation
然后停留在:
{ ASSERT(::IsWindow(m_hWnd)); ::GetWindowRect(m_hWnd, lpRect); }
这是杂回事哦!
解决方案 »
- 按下当前对话框确定键后对当前对话框中的Tab控件中的Page页面上的checkbox控件进行UpdateData(TRUE)绑定
- VC串口问题
- 串口api接收数据,为何读完数据后WaitForSingleObject还会返回一次?
- 就是调用DLL不成功出现如下:error LNK2001: unresolved external symbol _WriteCode@32
- 请问,程序启动,加载dll时,有没有钩子能监视到?
- 在Dll内调用了ADO的Connection对象,在另一个工程里使用这个dll,退出时出错
- 小弟初学操作系统,老师让做cpu管理进程的模拟,怎样用图形化的形式模拟出来??
- 请教作图中关于窗口和视口的问题
- 确定子窗口的大小和位置
- 请问:CMap是啥类?如何用????
- 程序为什么不显示界面?
- 能否抛弃TCHAR而完全采用Unicode编程?
为啥要强制转化?
无法用classwizard获得
最好贴出你怎么给hwnd5赋值的
{
hWnd5 =GetDlgItem(IDC_STATIC5);
hWnd6 =GetDlgItem(IDC_STATIC6);
hWnd7 =GetDlgItem(IDC_STATIC7);
hWnd8 =GetDlgItem(IDC_STATIC8);
MP4_ClientSetNetPort(5050,6050);
MP4_ClientStartup(WM_MYCOMMAND,this->m_hWnd);
blarged=FALSE; return 0;
}
LRESULT OnClickedStatic5(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{CRect orirc;
if (nn1 >= 0 )
{
MP4_ClientAudioStart(nn1);
MP4_ClientAudioVolume(0xfff0);
}
if (blarged)
{
ScreenToClient((LPPOINT)&orirc);
ScreenToClient((LPPOINT)&orirc+1); ((CStatic *)hWnd5)->MoveWindow(orirc,TRUE);
((CStatic *)hWnd6)->ShowWindow(SW_SHOW);
((CStatic *)hWnd7)->ShowWindow(SW_SHOW);
((CStatic *)hWnd8)->ShowWindow(SW_SHOW); blarged = FALSE;
}
else
{
((CStatic *)hWnd5)->GetWindowRect(&orirc);
((CStatic *)hWnd6)->ShowWindow(SW_HIDE);
((CStatic *)hWnd7)->ShowWindow(SW_HIDE);
((CStatic *)hWnd8)->ShowWindow(SW_HIDE);
RECT XX;
GetClientRect(&XX);
((CStatic *)hWnd5)->MoveWindow(0,0,XX.right ,XX.bottom ,TRUE);
//m_video5.MoveWindow(10,10,(int)(352*1.6),(int)(288*1.6),TRUE);
blarged = TRUE;
}
Fire_click();
return 0;
}非空,难道我强制转化他就空了?用mfc的话估计没这个问题了
...wnd5.MoveWindow(orirc,TRUE);
....