?
Solved

Maximize & Minimize window and get focus

Posted on 2003-03-11
4
Medium Priority
?
288 Views
Last Modified: 2013-11-20
Hi,
I need to make a Maximize & minimize option for my hierarchy window inside instant bar
the code now is:
if (!m_wndInstantBar.Create(_T("Hierarchy Window"),this,162,TRUE,0,WS_VISIBLE|WS_CAPTION |WS_BORDER|WS_MINIMIZEBOX | WS_MAXIMIZEBOX |CBRS_ALIGN_LEFT|CBRS_GRIPPER))
     {
        TRACE0("Failed to create instant bar\n");
         return -1;          // fail to create
     }
     m_wndInstantBar.SetSCBStyle(m_wndInstantBar.GetSCBStyle() |
          SCBS_SIZECHILD);
     m_HierWin.Create(/*WS_BORDER |*/ TVS_HASBUTTONS | TVS_LINESATROOT | TVS_HASLINES | TVS_SHOWSELALWAYS,
      CRect(HIERWIN_START_X, HIERWIN_START_Y,HIERWIN_WIDTH,rect.bottom - HIERWIN_BOTTOM), &m_wndInstantBar, 1001);
      m_HierWin.ModifyStyleEx(0, WS_EX_CLIENTEDGE);
     
     // bring the tooltips to front

     m_HierWin.ShowWindow(TRUE);
     m_wndInstantBar.SetBarStyle(m_wndInstantBar.GetBarStyle() |
          CBRS_TOOLTIPS | CBRS_FLYBY |CBRS_ALIGN_LEFT| CBRS_SIZE_DYNAMIC);
     m_wndInstantBar.EnableDocking(CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT);
          EnableDocking(CBRS_ALIGN_ANY);
     #ifdef _SCB_REPLACE_MINIFRAME
          m_pFloatingFrameClass = RUNTIME_CLASS(CSCBMiniDockFrameWnd);
     #endif //_SCB_REPLACE_MINIFRAME
     DockControlBar(&m_wndInstantBar, AFX_IDW_DOCKBAR_LEFT);

I tried to use WS_MAXIMIZE & WS_MINIMIZE but it didn't work.


I also have a problem,at the beggining the hierarchy window was in mainframe and when i pushed the
sels in that windows an action was made in the opengl window at the right side.
but now because it is now been craeted as a child of m_wndInstantBar,after pressing the sels
i need to press the left button of the mouse on the opengl window so the action will be activate
and it doesn't goes immediatlly.

Thanks.
0
Comment
Question by:david333
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 12

Expert Comment

by:williamcampbell
ID: 8112891


 You may need to rethink the Min Max options and go with a Show / Hide option instead.

 Include a Menu item / toolbar item to Show Hide your hierarchy window.
 
 When you hide the window destroy the splitter and maximize your opengl window. When you show create the splitter again.


 After you press the 'sels' try

 pOpenGlWindow->SetFocus ();
 pOpenGlWindow->UpdateWindow ();








0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11812482
PAQed - no points refunded (of 35)

modulo
Community Support Moderator
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month9 days, 1 hour left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question