-
August 2nd, 2007, 03:54 AM
#1
Non Client area in CToolBar's Titlebar
Hi,
Is Title bar / caption bar of an Undocked Toolbar is Non Client area or not?
If we undock a Toolbar, created by my own class CMyToolBar dervied from CToolBar. And handle the OnNcLButtonDown, now on doing LButton Down on the Toolbar's caption/title bar will not get handled in OnNcLButtonDown.
Is the Title Bar/ Caption bar of an Undocked Toolbar is Non Client area?
thanks
Intellectuals solve problems; geniuses prevent them.--Albert Einstein.
Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute.THAT'S Relativity --Albert Einstein
-
August 2nd, 2007, 05:31 AM
#2
Re: Non Client area in CToolBar's Titlebar
Any Comments on this....
-thanks
Intellectuals solve problems; geniuses prevent them.--Albert Einstein.
Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute.THAT'S Relativity --Albert Einstein
-
August 2nd, 2007, 11:46 AM
#3
Re: Non Client area in CToolBar's Titlebar
You will not. Reason being, the title bar you see when it is undocked actually belongs to a MiniDockFrameWnd class. This class is a framewindow with a toolwindow type style and it is this framewindow that hosts the toolbar control. So, since you are clicking on some other window, the toolbar window doesn't even get those messages.
What exactly are you trying to achieve ? Why the interest in the non-client messages ?
-
August 3rd, 2007, 12:19 AM
#4
Re: Non Client area in CToolBar's Titlebar
Originally Posted by kirants
So, since you are clicking on some other window, the toolbar window doesn't even get those messages.
So here you mean to say that the MiniFrameWnd is acting like a container to the Toolbar window (MiniFrameWnd hosts the Toolbar Ctrl).
Originally Posted by kirants
What exactly are you trying to achieve ? Why the interest in the non-client messages ?
Here I am trying to handle the Mouse Lbutton down on the Toolbar Title, to see if the Toolbar is getting dragged by keeping the mouse LButton down. And my application is like it creates 2 Toolbars (TBar1 & TBar2) based on the Viewports (View1 & View2). Imagine I had opened ChildWindows having 2 different views (View1 & View2) and each view will have its own Toolbar respectively TBar1 & TBar2. Now keeping the View2 active i shld not allow the user to click on the TBar1. I am able to handle this by handling OnMouseActivate for the toolbar. Now imagine the TOolbarss are undocked and its some where on the View. In this scenario I should be able to allow the user to atleast drag / drag and dock, the Toolbar not belonging to that view.
This is the use case.
-thanks
Intellectuals solve problems; geniuses prevent them.--Albert Einstein.
Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute.THAT'S Relativity --Albert Einstein
-
August 6th, 2007, 12:27 AM
#5
Re: Non Client area in CToolBar's Titlebar
Intellectuals solve problems; geniuses prevent them.--Albert Einstein.
Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute.THAT'S Relativity --Albert Einstein
-
August 6th, 2007, 11:41 AM
#6
Re: Non Client area in CToolBar's Titlebar
hm.. I don't know yet what the requirements, but, if say toolbar1 represents view1 functionality and toolbar2 represents view2 functionality ( assuming they are different toolbar commands ), can you not simply disable the toolbar1 buttons when view2 is activre and viceversa ?
-
August 6th, 2007, 11:56 PM
#7
Re: Non Client area in CToolBar's Titlebar
Hi
I can disable the buttons on the toolbar if it doesnt belong to the current active view. But the requirement is i shld not disable the toolbar buttons and shouldnot allow the user to click on the Toolbar buttons and should allow the user to drag and drop the Toolbar aside if it doesnt belong to the current active view.
-thanks
Intellectuals solve problems; geniuses prevent them.--Albert Einstein.
Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute.THAT'S Relativity --Albert Einstein
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|