Board index » cppbuilder » bring window to top
Jos van Boheemen
![]() CBuilder Developer |
bring window to top2003-12-15 01:28:46 PM cppbuilder66 I have a MDI application and I want if a file is opened again using FILE-OPEN to activate the already open file window. I have been able to detect that the file is already open but cannot make the open window the active one. I can however change the title of the window (see code below). I have tried the functions shown below. What I am doing wrong? TDocManager *dm = GetDocManager(); TDocument* doc = dm->FindDocument(FileData.FileName); if (doc != 0) { // doc->GetViewList()->GetWindow()->SetFocus(); // doc->GetViewList()->GetWindow()->BringWindowToTop(); doc->GetViewList()->GetWindow()->SetActiveWindow(); // doc->GetViewList()->GetWindow()->Invalidate(); doc->GetViewList()->SetDocTitle("hello",0); // doc->GetViewList()->GetWindow()->Show(SW_SHOWMAXIMIZED); return; } Thanks for your help, Jos |