Update dialog bar window
Dean Henkel -- Dean_Henkel@mixcom.com Wednesday, September 11, 1996 Environment: VC++ 4.2, NT 4.0 Beta Hello, I am having a problem with a DialogBar being redrawn. What I want to do is have 2 resources that a single CDialogBar class manages. When my application starts the myDialogBar.Create(ID1) method is called. When it is time to use the other resource I call myDialogBar.DestroyWindow() then myDialogBar.Create(ID2). (These are done from the Main Frame, MDI Application) My problem is that after the myDialogBar.Create(ID2) the window is not updated until either I Alt-Tab to another window and back or click on the view. I've tried Invalidate(), UpdateWindow(), SetRedraw() and I am stuck. Can anyone help??? Thanks. A code snippet follows: void CMainFrame::OnOptionsPreferences() { CConfigFile aConfigFile; BOOL access = aConfigFile.WSC_Access(); // TODO: Add your command handler code here CPreferencesSheet().DoModal(); // If access has changed, switch to ID2 dialog bar if(aConfigFile.WSC_Access() != access){ m_PatientListDlgBar.DestroyWindow(); // Create ID2 List dialog bar if (!m_PatientListDlgBar.Create(this, ID2, CBRS_LEFT | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_HIDE_INPLACE, ID2)) TRACE0("Failed to create dialog bar m_PatientInfoDlgBar\n"); m_PatientListDlgBar.UpdateWindow(); } }
Greg D. Tighe -- gdt@eng.aisinc.com Friday, September 13, 1996 > Environment: VC++ 4.2, NT 4.0 Beta > > Hello, > > I am having a problem with a DialogBar being redrawn. > > ... I've tried Invalidate(), UpdateWindow(), > SetRedraw() and I am stuck. Can anyone help??? > Try CFrameWnd::RecalcLayout(). -Greg Tighe Applied Intelligent Systems, Inc. Ann Arbor, MI gdt@aisinc.com
| Вернуться в корень Архива |