void CKinectThread::GetKinectAngle(UINT wParam,LONG lParam) { CvSize m_size; m_size.height = 480;//zzz m_size.width = 640;//zzzzz IplImage* m_LocalImg=cvCreateImage(m_size,IPL_DEPTH_8U,3); m_KinHand.whu_Initialize(); MSG message; int first=0; while (true) { if(::PeekMessage(&message,NULL,0,0,PM_REMOVE)) { ::TranslateMessage(&message); ::DispatchMessage(&message); //Sleep(1); } m_start = clock(); if(m_KinHand.whu_GetSkeleton()) { m_KinHand.whu_GetGesture(); //m_gKinectAngle[5]代表需不需要远程视频 if (!m_PauseControl) { if(m_gStopArm){ m_KinHand.whu_GetFingerAngle(m_gKinectAngle[4]); } else{ m_KinHand.whu_GetHandAngles(m_gKinectAngle); } } if (first<=3) { ::PostMessageW((HWND)(GetMainWnd()->GetSafeHwnd()),WM_DISPLAYANGLE,(WPARAM)m_gKinectAngle,NULL); first++; } else{ m_gKinectVideo =false; } //::PostMessageW((HWND)(GetMainWnd()->GetSafeHwnd()),WM_DISPLAYANGLE,(WPARAM)m_gKinectAngle,NULL); //Sleep(30); } m_end = clock(); m_runtime = (double)(m_end - m_start); if (m_gKinectVideo) { m_KinHand.whu_GetCurPic(m_LocalImg); ::PostMessageW((HWND)(GetMainWnd()->GetSafeHwnd()),WM_DISPLAYVIDEO,(WPARAM)m_LocalImg,NULL); Sleep(100); } } }
//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- BOOL CFaceEditMaterialPage::PreTranslateMessage( MSG *pMsg ) { HACCEL hAccel = GetMainWnd()->GetAccelTable(); if( !(hAccel && ::TranslateAccelerator( GetMainWnd()->m_hWnd, hAccel, pMsg ) ) ) { return CPropertyPage::PreTranslateMessage( pMsg ); } else { return TRUE; } }
HFONT andyFont::AutoAdjust(LPCTSTR szText,int w,int h,HDC hDC/* = NULL*/) { if(m_font && szText) { SIZE size; int len = _tcslen(szText); BOOL bDelDC = FALSE; int nStep = 1; if(hDC == NULL) { hDC = GetDC(GetMainWnd()); bDelDC = TRUE; } SelectObject(hDC,m_font); GetTextExtentPoint32(hDC,szText,len,&size); for(;(size.cx < w);m_lpMainFontRec.lfWidth ++) { m_font = CreateFontIndirect(&m_lpMainFontRec); DeleteObject((SelectObject(hDC,m_font))); GetTextExtentPoint32(hDC,szText,len,&size); } for(;(size.cx > w);m_lpMainFontRec.lfWidth --) { m_font = CreateFontIndirect(&m_lpMainFontRec); DeleteObject((SelectObject(hDC,m_font))); GetTextExtentPoint32(hDC,szText,len,&size); } if(m_lpMainFontRec.lfHeight < 0) { nStep = -1; m_lpMainFontRec.lfHeight = -h; } for(;(size.cy < h && m_lpMainFontRec.lfHeight);m_lpMainFontRec.lfHeight += nStep) { m_font = CreateFontIndirect(&m_lpMainFontRec); DeleteObject((SelectObject(hDC,m_font))); GetTextExtentPoint32(hDC,szText,len,&size); } for(;(size.cy > h && m_lpMainFontRec.lfHeight);m_lpMainFontRec.lfHeight -= nStep) { m_font = CreateFontIndirect(&m_lpMainFontRec); DeleteObject((SelectObject(hDC,m_font))); GetTextExtentPoint32(hDC,szText,len,&size); } if(bDelDC) ReleaseDC(GetMainWnd(),hDC); } return m_font; }
void CTextureBrowser::OnReload() { if ( m_cTextureWindow.szCurTexture[0] ) { g_Textures.ReloadTextures( m_cTextureWindow.szCurTexture ); m_cTextureWindow.Invalidate(); if (GetMainWnd()) { GetMainWnd()->m_TextureBar.NotifyGraphicsChanged(); GetMainWnd()->m_pFaceEditSheet->NotifyGraphicsChanged(); } } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CToolMaterial::UpdateStatusBar() { CString str; str.Format("%d faces selected", GetMainWnd()->m_pFaceEditSheet->GetFaceListCount() ); SetStatusText(SBI_SELECTION, str); SetStatusText(SBI_SIZE, ""); }
void CReplaceTexDlg::BrowseTex(int iEdit) { CString strTex; CWnd *pWnd = GetDlgItem(iEdit); pWnd->GetWindowText(strTex); CTextureBrowser *pBrowser = new CTextureBrowser(GetMainWnd()); pBrowser->SetUsed(iEdit == IDC_FIND); pBrowser->SetInitialTexture(strTex); if (pBrowser->DoModal() == IDOK) { IEditorTexture *pTex = g_Textures.FindActiveTexture(pBrowser->m_cTextureWindow.szCurTexture); char szName[MAX_PATH]; if (pTex != NULL) { pTex->GetShortName(szName); } else { szName[0] = '\0'; } pWnd->SetWindowText(szName); } delete pBrowser; }
BOOL CLGBApp::FindContent( LPSTR lpFileName, LPSTR lpExpFileName ) /************************************************************************/ { if ( !lpFileName ) return( FALSE ); while ( TRUE ) { STRING szString; // 1.) Try the file name as passed in if ( FileExistsExpand( lpFileName, lpExpFileName ) ) return( TRUE ); // 2.) Prompt to insert the CDROM disk... szString[0] = '\0'; LoadString( GetInstance(), IDS_CDNAME, szString, sizeof(szString) ); UINT uRet = PrintOKCancel( "Please insert '%s' CD-ROM.", (LPSTR)szString ); if ( uRet == IDCANCEL ) break; Delay( 5000L ); // wait in case the CD is not up to speed } //#ifdef _DEBUG Print("Cannot find file '%s'", lpFileName); //#endif // Post the close, so that we don't cause crashes // trying to execute code after windows have been // destroyed and classes have been destructed PostMessage( GetMainWnd(), WM_CLOSE, 0, 0L ); return( FALSE ); }
BOOL CProcessMgr::OpenRunInNewTab(LPVOID lpParameter) { CProcessMgr* pMgr = (CProcessMgr*)lpParameter; //启动打开执行页面 CString sExeDir = GetExecDir(); CString sExePath = sExeDir + "\\PeraWebContainer.exe"; //-json {"url" : "www.baidu.com", "user" : "fei", "realusername" : "赵飞", "ticket": "1", "password": "******", "role": "admin"} CString sParam; ////联调先没有拼入票据 sParam.Format("-json {\"url\" : \"%s\", \"ticket\":\"%s\"}", pMgr->m_sRunUrl, theApp.m_LoginData.m_strTicket); //sParam.Format("-json {\"url\" : \"%s\", \"ticket\":\"%s\"}", sUrl, "ticket-proxy=ZzxSJrzPhvKJCElqycem"); //CCxWPENavigate * pData = new CCxWPENavigate(); //pData->m_strUrl = pMgr->m_sRunUrl; //AttachTicket( pData->m_strUrl, theApp.m_LoginData.m_strTicket ); /*CCxWebPageEvent * pEvent = theWebPageMgr.NewEvent( CPeraWebPageMgr::FW_TAB_VIEW , CPeraWebPageMgr::FE_START, pData, TRUE ); delete pData; pData = NULL; if ( pEvent == NULL ) { return FALSE; }*/ //if ( !theWebPageMgr.Require( CPeraWebPageMgr::FW_TAB_VIEW // , CPeraWebPageMgr::FE_START, pData ) ) //{ // //theWebPageMgr.DeleteEvent( pEvent ); return FALSE; //} //delete pData; pData = NULL; if ( g_pawRunProcess != NULL ) { ZTools::WriteZToolsLog( "CProcessMgr::OpenRunInNewTab g_pawRunProcess 值不为空" ); return FALSE; } g_pawRunProcess = new CAttachWindow(); CString sWebContainerPath = GetExecDir() + "\\PeraPDWebContainer.exe"; ZTools::WriteZToolsFormatLog( "CProcessMgr::OpenRunInNewTab webcontainer.exe 路径[%s]", sWebContainerPath ); CAttachWindowExData awExData; awExData.m_sUrl = pMgr->m_sRunUrl; AttachTicket( awExData.m_sUrl, theApp.m_LoginData.m_strTicket ); CString sId = GetNewEventNameWin7(); if ( !g_pawRunProcess->CreateClient( sId, WEBTYPE_RUNPROCESS, CPMSG_AW_PROCESS_ATTACHING, GetCurrentProcessId(), GetMainWnd(), sWebContainerPath, awExData.GetJsonStr() )) { ZTools::WriteZToolsLog( "CProcessMgr::OpenRunInNewTab 启动WebContainer失败" ); delete g_pawRunProcess; g_pawRunProcess = NULL; return FALSE; } ZTools::WriteZToolsLog( "CProcessMgr::OpenRunInNewTab 启动WebContainer完成" ); return TRUE; }
/* WM_COMMAND CallBack */ BOOL TMsgDlg::EvCommand(WORD wNotifyCode, WORD wID, LPARAM hWndCtl) { switch (wID) { case MISC_ACCEL: case HIDE_ACCEL: ::PostMessage(GetMainWnd(), WM_COMMAND, wID, 0); return TRUE; case IDOK: case IDCANCEL: EndDialog(FALSE); ::PostMessage(GetMainWnd(), WM_MSGDLG_EXIT, (WPARAM)0, (LPARAM)this); return TRUE; } return FALSE; }
void CTextureSystem::OnFileChange( const char *pFilename, int context, CTextureSystem::EFileType eFileType ) { // It requires the forward slashes later... char fixedSlashes[MAX_PATH]; V_StrSubst( pFilename, "\\", "/", fixedSlashes, sizeof( fixedSlashes ) ); // Get rid of the extension. if ( V_strlen( fixedSlashes ) < 5 ) { Assert( false ); return; } fixedSlashes[ V_strlen( fixedSlashes ) - 4 ] = 0; // Handle it based on what type of file we've got. if ( eFileType == k_eFileTypeVMT ) { IEditorTexture *pTex = FindActiveTexture( fixedSlashes, NULL, FALSE ); if ( pTex ) { pTex->Reload( true ); } else { EnumMaterial( fixedSlashes, context ); IEditorTexture *pTex = FindActiveTexture( fixedSlashes, NULL, FALSE ); if ( pTex ) { GetMainWnd()->m_TextureBar.NotifyNewMaterial( pTex ); GetMainWnd()->GetFaceEditSheet()->NotifyNewMaterial( pTex ); } } } else if ( eFileType == k_eFileTypeVTF ) { // Whether a VTF was added, removed, or modified, we do the same thing.. refresh it and any materials that reference it. ITexture *pTexture = materials->FindTexture( fixedSlashes, TEXTURE_GROUP_UNACCOUNTED, false ); if ( pTexture ) { pTexture->Download( NULL ); ReloadMaterialsUsingTexture( pTexture ); } } }
CxDocumentExt::CxDocumentExt( void ) { if (theApp.m_pCurViewData != NULL) { if (theApp.m_pCurViewData->m_pDoc == NULL) { theApp.m_pCurViewData->m_pDoc = reinterpret_cast < CDocument * > ( this ); } else { ::MessageBox(GetMainWnd(),"当前 ViewData::pDoc 对象不为空 CxDocumentExt::OnDocumentConstruction", g_lpszAppTitle, MB_OK|MB_ICONINFORMATION); } } else { ::MessageBox(GetMainWnd(),"theApp.m_pCurViewData 对象为空 CxDocumentExt::OnDocumentConstruction", g_lpszAppTitle, MB_OK|MB_ICONINFORMATION); } }
BOOL CTaskClipboard::SetTasks(const CTaskFile& tasks, const CString& sID) { ASSERT(tasks.GetTaskCount()); CString sXML; CString sClipID = (sID.IsEmpty() ? DEF_CLIPID : sID); if (tasks.Export(sXML) && !sXML.IsEmpty()) { sClipID.MakeUpper(); return (Misc::CopyTexttoClipboard(sXML, GetMainWnd(), GetTaskClipFmt()) && Misc::CopyTexttoClipboard(sClipID, GetMainWnd(), GetIDClipFmt(), FALSE)); } // else return FALSE; }
void Game_Editor::Init() { AppFramework_Editor::Init(); SystemLocator::GetInstance()->RegisterSystemContainer(m_systemContainer); //Init Input Handlers m_directInputSystem = new DirectInput(); m_directInputSystem->Init(GetAppInst(), GetMainWnd(), DISCL_NONEXCLUSIVE | DISCL_FOREGROUND, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND); m_systemContainer.AddSystem(GetInputSystem()); HWND window = GetMainWnd(); m_taskManagingSystem = new TaskManager(); m_systemContainer.AddSystem(GetTaskManagerSystem()); m_XCGraphicsSystem = new XC_Graphics(); m_XCGraphicsSystem->InitGraphicsWindow(window, m_clientWidth, m_clientHeight, true); m_systemContainer.AddSystem(GetXCGraphicsSystem()); m_resourceManagingSystem = new ResourceManager(*m_XCGraphicsSystem, *m_taskManagingSystem); m_resourceManagingSystem->Init(); m_systemContainer.AddSystem(GetResourceManagerSystem()); //Initialize Cameras m_cameraManagingSystem = new XC_CameraManager(m_XCGraphicsSystem->GetShaderManagerSystem(), GetInputSystem()); m_cameraManagingSystem->InitializeCameras(m_clientWidth, m_clientHeight); m_cameraManagingSystem->SetCameraType(CAMERATYPE_BASIC); m_systemContainer.AddSystem(GetCameraManagerSystem()); m_gameFSM = new GameFiniteStateMachine(); m_gameFSM->Init(); m_systemContainer.AddSystem(GetGameFSMSystem()); m_gameFSM->SetState("EditorLoadingState", STATE_NONE); m_networkManagingSystem = new NetworkManager(); m_systemContainer.AddSystem(*m_networkManagingSystem); //Initalize the netowrk clients m_liveDriveClient = new LiveDriveVRClient(*this); m_liveDriveClient->init(IP_ADDRESS, DEFAULT_PORT); m_networkManagingSystem->AddNetPeer(m_liveDriveClient); }
void CListenerSocket::OnIncomingMessage(QString msg) { CNotificationItem data(msg); //data.NormalizeIcon(); if(data.Type!=CNotificationItem::EMPTY) { data.DateTime=QDateTime::currentDateTime(); GetMainWnd()->OnNewCall(data); } }
CxChildFrameExt::CxChildFrameExt( void ) { if (theApp.m_pCurViewData != NULL) { if (theApp.m_pCurViewData->m_pChildFrame == NULL) { theApp.m_pCurViewData->m_pChildFrame = reinterpret_cast < CChildFrame * > ( this ); m_pViewData = theApp.m_pCurViewData; } else { ::MessageBox(GetMainWnd(), "当前 ViewData::ChildFrame 对象不为空 CxChildFrameExt::OnChildFrameConstruction", g_lpszAppTitle, MB_OK|MB_ICONINFORMATION); } } else { ::MessageBox(GetMainWnd(), "theApp.m_pCurViewData 对象为空 CxChildFrameExt::OnChildFrameConstruction", g_lpszAppTitle, MB_OK|MB_ICONINFORMATION); } }
void CChildWnd::OnNcRButtonUp(UINT nHitTest, CPoint point) { if ( nHitTest == HTCAPTION ) { CWnd* pWnd = ( Settings.General.GUIMode != GUI_WINDOWED ? this : (CWnd*)GetMainWnd() ); pWnd->PostMessage( WM_CONTEXTMENU, (WPARAM)pWnd->GetSafeHwnd(), MAKELONG( point.x, point.y ) ); return; } CMDIChildWnd::OnNcRButtonUp( nHitTest, point ); }
//----------------------------------------------------------------------------- // Purpose: Handles right mouse button down events in the 3D view. // Input : Per CWnd::OnRButtonDown. // Output : Returns true if the message was handled, false if not. //----------------------------------------------------------------------------- bool CToolMaterial::OnRMouseDown3D(CMapView3D *pView, UINT nFlags, CPoint point) { BOOL bShift = ((GetAsyncKeyState(VK_SHIFT) & 0x8000) != 0); BOOL bEdgeAlign = ((GetAsyncKeyState(VK_MENU) & 0x8000) != 0); ULONG ulFace; CMapClass *pObject = pView->NearestObjectAt(point, ulFace); if (pObject != NULL) { if (pObject->IsMapClass(MAPCLASS_TYPE(CMapSolid))) { CMapSolid *pSolid = (CMapSolid *)pObject; GetHistory()->MarkUndoPosition(NULL, "Apply texture"); GetHistory()->Keep(pSolid); // Setup the flags. int cmdFlags = 0; if(bEdgeAlign) cmdFlags |= CFaceEditSheet::cfEdgeAlign; // If they are holding down the shift key, apply to the entire solid. if (bShift) { int nFaces = pSolid->GetFaceCount(); for(int i = 0; i < nFaces; i++) { GetMainWnd()->m_pFaceEditSheet->ClickFace( pSolid, i, cmdFlags, CFaceEditSheet::ModeApplyAll ); } } // If not, apply to a single face. else { GetMainWnd()->m_pFaceEditSheet->ClickFace( pSolid, ulFace, cmdFlags, CFaceEditSheet::ModeApplyAll ); } } } return true; }
/* 送信終了通知 */ BOOL TRecvDlg::SendFinishNotify(HostSub *hostSub, ULONG packet_no) { if (msg.hostSub.addr == hostSub->addr && msg.hostSub.portNo == hostSub->portNo && packet_no == packetNo) { if (timerID == IPMSG_RECV_TIMER) { ::KillTimer(hWnd, IPMSG_RECV_TIMER); timerID = 0; if (::IsWindowVisible(hWnd) == FALSE) ::PostMessage(GetMainWnd(), WM_RECVDLG_EXIT, 0, (LPARAM)this); } return TRUE; } return FALSE; }
//----------------------------------------------------------------------------- //----------------------------------------------------------------------------- BOOL CFaceEditMaterialPage::OnSetActive( void ) { CMainFrame *pMainFrm = GetMainWnd(); if( !pMainFrm ) return FALSE; ToolManager()->SetTool( TOOL_FACEEDIT_MATERIAL ); // Set the initial face edit tool state. SetMaterialPageTool( MATERIALPAGETOOL_MATERIAL ); return CPropertyPage::OnSetActive(); }
BOOL CChildWnd::IsActive(BOOL bFocused) { CMainWnd* pMainWnd = GetMainWnd(); if ( bFocused && GetForegroundWindow() != pMainWnd ) return FALSE; CChildWnd* pActive = (CChildWnd*)pMainWnd->MDIGetActive(); if ( pActive == this ) return TRUE; if ( bFocused ) return FALSE; return FALSE; }
CxViewExt::CxViewExt() { m_pViewData = NULL; if (theApp.m_pCurViewData != NULL) { if (theApp.m_pCurViewData->m_pView == NULL) { theApp.m_pCurViewData->m_pView = this; m_pViewData = theApp.m_pCurViewData; } else { ::MessageBox(GetMainWnd(), "当前 ViewData::pView 对象不为空 CWsViewExt::OnConstruction" , g_lpszAppTitle, MB_OK|MB_ICONINFORMATION); } } else { ::MessageBox(GetMainWnd(), "theApp.m_pCurViewData 对象为空 CWsViewExt::OnConstruction", g_lpszAppTitle, MB_OK|MB_ICONINFORMATION); } }
//获取字体尺寸,lpszText如果为空,为字符A的尺寸。lpSize返回要获取的尺寸,如果lpSize为空,函数返回字体高度 int andyFont::GetFontSize(LPCTSTR lpszText/*=NULL*/,LPSIZE lpSize/*=NULL*/) { if(m_font) { HDC hDC = GetDC(GetMainWnd()); HFONT hft = (HFONT)SelectObject(hDC,m_font); SIZE s; if(lpszText == NULL) lpszText = _T("A"); if(lpSize == NULL) lpSize = &s; GetTextExtentPoint32(hDC,lpszText,lstrlen(lpszText),lpSize); SelectObject(hDC,hft); ReleaseDC(GetMainWnd(),hDC); return lpSize->cy; } return 0; }
afx_msg void CGDSApp::OnFileOpen() {//@CODE_3665 LPTSTR tExt; CDLLInterface *ri; if (OpenFilter == NULL) { BuildFilterLists(); } Ofn.lpstrFilter = OpenFilter; Ofn.lpstrFile = OpenFileName; Ofn.lpstrTitle = "Open File"; Ofn.hwndOwner = GetMainWnd()->m_hWnd; Ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; if (!GetOpenFileName(&Ofn)) { // cancel selected. return; } // figure out type of resource wanted, by extension // get last . to find start of extension tExt = _tcsrchr(Ofn.lpstrFile, '.'); // if not found, then no extension if ((tExt == NULL) || ((ri = FindExtensionMatch(tExt, TRUE)) == NULL)) { MessageBox(GetMainWnd()->m_hWnd,_T("Unable to match extension to resource type.\n"), _T("Extension Error!"), MB_OK); return; } // Load/Create new resource ri->Load(Ofn.lpstrFile); }//@CODE_3665
BOOL CProcessMgr::CanRunSubProcess() { //调页面方法查询当前流程上层节点是否有效 CCxStructTreeNode * pNodeCur = theApp.m_pBarJianmoTree->m_wndGridTree.GetCurSelNodeData(); if ( pNodeCur == NULL ) return FALSE; if ( !pNodeCur->IsFlowNode() ) return FALSE; if ( !((CCxStructTreeNodeFlow*)pNodeCur)->CanRun() ) { ::MessageBox(GetMainWnd(), "存在未成功运行的上游节点,无法运行", g_lpszAppTitle, MB_OK|MB_ICONERROR); return FALSE; } return TRUE; }
BOOL CChildWnd::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) { if ( m_pCmdMsg == this ) return FALSE; if ( CMDIChildWnd::OnCmdMsg( nID, nCode, pExtra, pHandlerInfo ) ) return TRUE; if ( m_pCmdMsg != NULL ) return FALSE; m_pCmdMsg = this; BOOL bResult = GetMainWnd()->OnCmdMsg( nID, nCode, pExtra, pHandlerInfo ); m_pCmdMsg = NULL; return bResult; }
BOOL CChildWnd::IsActive(BOOL bFocused) { CMainWnd* pMainWnd = GetMainWnd(); if ( bFocused && GetForegroundWindow() != pMainWnd ) return FALSE; CChildWnd* pActive = pMainWnd->m_pWindows.GetActive(); // Was (CChildWnd*)pMainWnd->MDIGetActive() if ( pActive == this ) return TRUE; if ( bFocused ) return FALSE; return ( pActive && m_pGroupParent == pActive ) || ( pActive && pActive->m_pGroupParent == this ); }
BOOL CChildWnd::SetAlert(BOOL bAlert) { if ( m_bAlert == bAlert ) return FALSE; CMainWnd* pMainWnd = GetMainWnd(); if ( bAlert && pMainWnd->m_pWindows.GetActive() == this ) return FALSE; // Was MDIGetActive() m_bAlert = bAlert; pMainWnd->OnUpdateCmdUI(); return TRUE; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void COptions::Init(void) { // // If the we have no registry settings and the "Valve Hammer Editor" registry tree exists, // import settings from there. If that isn't found, try "Worldcraft". // bool bWCSettingsFound = false; bool bVHESettingsFound = false; if (!HammerSettingsFound()) { bVHESettingsFound = ValveHammerEditorSettingsFound(); if (!bVHESettingsFound) { bWCSettingsFound = WorldcraftSettingsFound(); } } if (bVHESettingsFound) { APP()->BeginImportVHESettings(); } else if (bWCSettingsFound) { APP()->BeginImportWCSettings(); } SetDefaults(); Read(); if (bVHESettingsFound || bWCSettingsFound) { APP()->EndImportSettings(); } // // Notify appropriate windows of new settings. // dvs: is all this necessary? // CMainFrame *pMainWnd = GetMainWnd(); if (pMainWnd != NULL) { pMainWnd->SetBrightness(textures.fBrightness); pMainWnd->UpdateAllDocViews(MAPVIEW_UPDATE_2D | MAPVIEW_OPTIONS_CHANGED); pMainWnd->UpdateAllDocViews(MAPVIEW_UPDATE_3D | MAPVIEW_OPTIONS_CHANGED); pMainWnd->GlobalNotify(WM_GAME_CHANGED); } }
void CxResLibImgList::OnDownload() { vector<LPARAM> vParam; if ( GetCurSelParam( vParam ) == 0 ) return; if ( vParam.size() != 1 ) { ::MessageBox(GetMainWnd(), "只能选择一个组件或设计过程下载。", g_lpszAppTitle, MB_OK|MB_ICONINFORMATION); return; } theApp.m_pDlgResLibTree->m_tree.PostMessage(WM_RESLIB_NOTIFY_DOWNLOAD , (WPARAM)vParam[0], (LPARAM)0 ); //::ReleaseCapture(); }
int myprintf(const char * _Format, ...) { char tmpStr[1024]; va_list marker; va_start(marker, _Format); vsnprintf(tmpStr, 1024, _Format, marker); va_end(marker); GetMainWnd()->Log(tmpStr); return 0; }