UINT_PTR CBkSafeMsgBox::ShowPanelMsg( LPCWSTR lpszXml, LPCRECT lpRect , LPCWSTR lpszCaption /*= NULL*/, UINT uType /*= MB_OK*/, BOOL *pbNoNotifyLater /*= NULL*/, HWND hWndParent /*= NULL */ ) { ATLASSERT(lpRect); if (!lpRect || !Load(IDR_BK_MESSAGEBOXEX)) return -1; m_isTextXml = TRUE; m_rcXml = *lpRect; m_uType = uType; SetItemVisible(60016, TRUE); SetItemVisible(IDC_LBL_MSGBOX_TEXT, FALSE); SetPanelXml(60016, CT2CA(lpszXml, CP_UTF8)); if (lpszCaption) { m_strCaption = lpszCaption; SetWindowCaption(m_strCaption); SetItemText(IDC_LBL_MSGBOX_TITLE, lpszCaption); } _InitLayout(pbNoNotifyLater); UINT_PTR nRet = DoModal(hWndParent); if (pbNoNotifyLater) *pbNoNotifyLater = m_bNoNotifyLater; return nRet; }
UINT_PTR CBkSafeMsgBox::ShowMsg( LPCWSTR lpszText, LPCWSTR lpszCaption /*= NULL*/, UINT uType /*= MB_OK*/, BOOL *pbNoNotifyLater /*= NULL*/, HWND hWndParent /*= ::GetActiveWindow()*/) { if (!Load(IDR_BK_MESSAGEBOX)) return -1; m_isTextXml = FALSE; m_strText = lpszText; m_uType = uType; SetItemVisible(60016, FALSE); SetItemVisible(IDC_LBL_MSGBOX_TEXT, TRUE); SetItemText(IDC_LBL_MSGBOX_TEXT, lpszText); if (lpszCaption) { m_strCaption = lpszCaption; SetWindowCaption(m_strCaption); SetItemText(IDC_LBL_MSGBOX_TITLE, lpszCaption); } _InitLayout(pbNoNotifyLater); UINT_PTR nRet = DoModal(hWndParent); if (pbNoNotifyLater) *pbNoNotifyLater = m_bNoNotifyLater; return nRet; }
void ODEDrawer::Draw(char* caption) { SetWindowCaption(caption); // clear the window glClearColor (0.4,0.4,0.4,0); glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // set the light position (for some reason we have to do this in model view. GLfloat light_position[] = { LIGHTX, LIGHTY, 1.0, 0.0 }; glLightfv (GL_LIGHT0, GL_POSITION, light_position); // snapshot camera position double view2_xyz[3]; double view2_hpr[3]; memcpy (view2_xyz,view_xyz,sizeof(double)*3); memcpy (view2_hpr,view_hpr,sizeof(double)*3); // go to GL_MODELVIEW matrix mode and set the camera glMatrixMode (GL_MODELVIEW); glLoadIdentity(); setCamera (view2_xyz[0],view2_xyz[1],view2_xyz[2], view2_hpr[0],view2_hpr[1],view2_hpr[2]); DrawHeightfields(); DrawTriMeshes(); DrawKinematicBodies(); DrawDynamicBodies(); drawGrid(); drawAxes(); DrawText(caption); /*char *pg_info; for(ParticleGenerator *pg: domain->getParticleGenerators()) { pg_info=pg->getInfo(); DrawCaption(pg_info); delete[] pg_info; }*/ m_textLine=DRAW_STRING_NEW_LINE; glutSwapBuffers(); glutMainLoopEvent(); }
UINT_PTR CBkSafeMsgBoxFindUnCompatibleSoftware::ShowMsg( LPCWSTR lpszText, LPCWSTR lpszCaption /*= NULL*/, LPCWSTR lpszCheckCaption /*= NULL*/, UINT uType /*= MB_OK*/, BOOL *pbNoNotifyLater /*= NULL*/, HWND hWndParent /*= NULL*/ ) { if (!Load(IDR_BK_MESSAGEBOX_FIND_UNCOMPATIBLE_SOFTWARE)) return -1; m_isTextXml = FALSE; m_strText = lpszText; m_uType = uType; SetItemVisible(60016, FALSE); //SetItemVisible(IDC_LBL_MSGBOX_TEXT, TRUE); //SetItemText(IDC_LBL_MSGBOX_TEXT, lpszText); if (lpszCaption) { m_strCaption = lpszCaption; SetWindowCaption(m_strCaption); SetItemText(IDC_LBL_MSGBOX_TITLE, lpszCaption); } if ( pbNoNotifyLater != NULL ) { SetItemCheck(IDC_CHK_MSGBOX_NONOTIFYLATER, *pbNoNotifyLater); if ( lpszCheckCaption != NULL ) { SetItemText(IDC_CHK_MSGBOX_NONOTIFYLATER, lpszCheckCaption); } } _InitLayout(pbNoNotifyLater); UINT_PTR nRet = DoModal(hWndParent); if (pbNoNotifyLater) { *pbNoNotifyLater = m_bNoNotifyLater; } return nRet; }
void CAclSub::SetSelectButton(BYTE bSelectButton) { if(m_bSelectedButton == bSelectButton) return; if(m_bSelectedButton != 255) { m_Button[m_bSelectedButton].SetSelect(FALSE); } m_Button[bSelectButton].SetSelect(TRUE); SetWindowCaption(ACL_CAPTION[bSelectButton]); m_bSelectedButton = bSelectButton; m_AclApp.ShowWindow(bSelectButton == ACL_BUTTON_APP ? SW_SHOW : SW_HIDE); m_AclWeb.ShowWindow(bSelectButton == ACL_BUTTON_WEB ? SW_SHOW : SW_HIDE); m_AclNnb.ShowWindow(bSelectButton == ACL_BUTTON_NNB ? SW_SHOW : SW_HIDE); m_AclIcmp.ShowWindow(bSelectButton == ACL_BUTTON_ICMP ? SW_SHOW : SW_HIDE); m_AclTorjan.ShowWindow(bSelectButton == ACL_BUTTON_TORJAN ? SW_SHOW : SW_HIDE); m_AclTime.ShowWindow(bSelectButton == ACL_BUTTON_TIME ? SW_SHOW : SW_HIDE); m_AclNet.ShowWindow(bSelectButton == ACL_BUTTON_NET ? SW_SHOW : SW_HIDE); ShowButtonCase(bSelectButton); EnableButtonCase(bSelectButton); }
void SharedDesktopArea::Validate() { if (IsChecked(IDC_SCREEN)) { m_pMatchWindow->Show(); } else { m_pMatchWindow->Hide(); } LPCSTR info = NULL; if (IsChecked(IDC_FULLSCREEN)) { info = "* full desktop selected *"; } else if (IsChecked(IDC_PRIMARY_DISPLAY_ONLY)) { info = "* primary display selected *"; } else if (IsChecked(IDC_SCREEN)) { info = "* screen area selected *"; } BOOL bWindowShared = IsChecked(IDC_WINDOW); // Enable/disable window cursor Enable(IDC_BMPCURSOR, bWindowShared); // Set proper cursor image HWND bmp_hWnd = GetDlgItem(m_hwnd, IDC_BMPCURSOR); HBITMAP hNewImage = LoadBitmap(hAppInstance, bWindowShared ? MAKEINTRESOURCE(IDB_BITMAP1) : MAKEINTRESOURCE(IDB_BITMAP3)); HBITMAP hOldImage = (HBITMAP)::SendMessage(bmp_hWnd, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hNewImage); DeleteObject(hOldImage); // Set window name if (bWindowShared) { SetWindowCaption(m_hwndShared); } else if (info) { SetText(IDC_NAME_APPLI, info); } Enable(IDC_NAME_APPLI, bWindowShared); }