Subject |
Author |
Date |
|
Rado Manzela
|
Sep 9, 2008 - 8:16 AM
|
I think you should not thow exception when deserializong font structure (for CExtGridCellFont) and last items are missing. It is causing problems when upgrading prof-uis version and users have older serialized font settings stored in the registgry for example. Any news whether (and when) you would add new feature I’ve wrote some months ago? I mean moving of focus in the (tree) grid column while typing to implement quick search feature like in ICQ on read-only cells in grid? There is also bug in print preview of tree grid - sometimes last column on the page is print only partially (does not fit) when more than one page is needed to print full width of the grid. Thank you.
|
|
Robert Webb
|
Sep 8, 2008 - 8:12 PM
|
Hi, Is it possible to use advanced tooltips, like those available for ribbon bars, on normal toolbars or tabbed toolbars? If so, how? Thanks, Rob.
|
|
Technical Support
|
Sep 9, 2008 - 12:04 PM
|
The toolbar tooltip currently can have only text. The ribbon bar tip has a caption, paragraph text and an icon. We plan to add support for the ribbon tooltip everywhere. At the moment you can display any window instead of built-in Prof-UIS tooltip windows (CExtPopupMenuTipWnd ) over toolbar buttons or menu items. The HelpNotes sample application demonstrates how to display rich text control acting like a tooltip by handling the CExtPopupMenuWnd::g_nMsgItemCoveringNotification registered message.
|
|
Krustys Donuts
|
Sep 8, 2008 - 7:25 PM
|
In one particular CExtPropertyGridCtrl I have, I don’t want to allow the user to sort it. I want to display only the Categorized view. I would like to either: (A) Remove the categorized/sorting toolbar buttons entirely; (B) Gray out the Alphabetical sort button (or both buttons); or (C) Have the Alphabetical sort button do nothing. I remember reading in another Support thread that the CExtPropertyGridCtrl by default creates two CExtPropertyGridWnd’s: One for Categorized, and one for Sorted. Would the solution to my dilemma be having it create only the CExtPropertyGridWnd for the Categorized view, and not create the CExtPropertyGridWnd for the Sorted view at all? If so, how do I accomplish this feat?
|
|
Technical Support
|
Sep 9, 2008 - 12:05 PM
|
The CExtPropertyGridCtrl::OnPgcCreateGrids() virtual method is called for creating tree grid windows (CExtPropertyGridWnd</code-derived) inside a <code>CExtPropertyGridCtrl property grid control. By default this method creates two tree grid windows: CExtPropertyGridWndCategorized and CExtPropertyGridWndSorted . You should override this virtual method and its body should be similar to the original one but create only the CExtPropertyGridWndCategorized tree grid window. Appropriate commands in toolbar inside property grid control will be handled/updated automatically. But if you need only a categorized tree grid, then, we guess, you don’t need a toolbar at all.
The CExtPropertyGridCtrl::OnPgcCreateBars() virtual method is invoked to create all the other windows inside a property grid control. These windows are called bars because they are located outside the active/selected tree grid window and automatically docked to the borders of the property grid control. You can also override this virtual method, copy source code from original method and comment creation of bars which you don’t want to see inside your property grid control. Please note, the CExtPropertyGridCtrl property grid control requires only at least one tree grid window created inside it. All the other windows can be removed.
|
|
Offer Har
|
Sep 8, 2008 - 3:31 PM
|
Again, as I have to do almost every week, I need to check what of my bug reported you partially ignored, which ones you completly ignored, and nudge you again and again... Wouldn’t it be easier for all of us if you just reply to bug reports, and fix them?
|
|
Technical Support
|
Sep 9, 2008 - 2:18 PM
|
We are here Ron and continuing answering your questions. Nothing is lost.
|
|
Offer Har
|
Sep 9, 2008 - 3:16 PM
|
|
|
Offer Har
|
Sep 8, 2008 - 3:21 PM
|
Hi, It seems that two rows of pixels at the top of menus are not drawn properly, looks like ther are missing:
|
|
Technical Support
|
Sep 9, 2008 - 2:16 PM
|
The MS Office menus can have different look on different Windows versions or after different updates. We suspect this is a result of some system parameters change or simply a new feature of MS Office software update. Could you please also show us a second screen shot demonstrating how menu should look like? Do we need only move the menu item one pixel upper and closer to menu bar’s button?
|
|
Offer Har
|
Sep 9, 2008 - 3:07 PM
|
This is not exactly the same, because Office 2007 is ribbon based, but as you can see, the menu have full frame on the top side, so it does not look like something is missing. You can do that, or take the blue fill if the menu name one row down, and the gray of the icon column one row up. The way it is now, looks like a drawing error...
|
|
Chun Pong Lau
|
Sep 8, 2008 - 12:26 PM
|
Dear support team,
e.g. 3 control bars are grouped together. I can know any one of them by CExtControlBar::IsFloating() method. But do I know if they are grouped together like below?
| . . . . . . . | | . . . . . . . | -------------- | 1 | 2 | 3 | --------------
Thanks a lot.
Regards, Chun Pong
|
|
Technical Support
|
Sep 9, 2008 - 12:08 PM
|
The CExtControlBar::IsFloating() method returns true if the control bar is in the floating state and it’s a single control bar inside its mini frame palette window. This method should be used with control bars like CExtToolControlBar or CExtMenuControlBar which does not support tabbed containers.
The CExtControlBar::_GetNearestTabbedContainer() method returns NOT-NULL if the control bar is inside a tabbed group of control bars. A tabbed group can contain only one visible control bar. Such tabbed group contains a hidden tab control and looks like a standalone control bar, but it’s still a tabbed group of bars.
The ( pExtControlBar->GetParentFrame()->IsKindOf( RUNTIME_CLASS( CMiniFrameWnd ) ) ? true : false ) returns true if the control bar is inside the floating mini frame palette window. This control bar can be either stand alone floating bar or part of complex floating layout of resizable control bars with or without tabbed groups.
|
|
howard liu
|
Sep 8, 2008 - 10:25 AM
|
Hi, CExtControlBar::g_bLockAllBars = true; locks all control bars in my application. How do i pin or fix individual control bars or make selectively some of the tool bars (or controls bars) non dockable and some of them dockable, Some times when i make the non-dockable by CExtControlBar::g_bLockAllBars = true; even the title bar in the dialog become non dockable in the sense the cross button (close button on top right corner ) also vanishes to make the dialog non-dockable. Thanks, Ranga
|
|
Technical Support
|
Sep 9, 2008 - 12:09 PM
|
You should create and use a custom CExtControlBar -derived class which implements the CExtControlBar::_DraggingIsEnabled() virtual method. This virtual method should return a flag which indicates whether toolbar is not locked.
|
|
Eun Hyang Im
|
Sep 7, 2008 - 5:21 AM
|
I want to paint custum background graphics or image in CExtResiablePropertySheet, CExtResiablePropertyPage and CExtResiableDialog. I tried to do this at draw OnPaint , OnEraseBackground and OnCtlColor....etc... But my paint method did not show, Only I can view CExt.... Theme background.... How to do this ? please help me
|
|
Technical Support
|
Sep 8, 2008 - 7:04 AM
|
Prof-UIS supports painting of inherited background and custom drawn background of dialog can automatically appear in dialog controls like static labels. This feature is demonstrated in the TabbedBars sample application where you can see gradient like custom painted background on dialog pages inside One Note tab page container with colored tabs and you can also turn on painting of hurricane like background for entire main frame window. But this feature is turned off by default. To turn it on you should invoke the g_PaintManager->m_bCustomBackgroundInheritanceEnabled = true; code both at startup and after each paint manager changing. You should also handle the CExtPaintManager::g_nMsgPaintInheritedBackground registered message in your dialog class and/or property page class for painting their custom backgrounds. Your message handlers will be invoked both for painting background of dialog window and for all its child controls including created at deep nested levels (child controls of child controls ...). You can take a look at how this registered message is handed in the TabbedBars sample application.
|
|
howard liu
|
Sep 5, 2008 - 9:35 AM
|
Hi I have implemented prof-ui advanced tool bar for the user interface of my application. There are atleast 2 tool bars within each of the interface. I had actually wanted to fix (non-dockable type) the tool bars and have done so by using following line of code CExtControlBar::g_bLockAllBars = true; When i am logged in as administrator in my system the application’s user interface has these two tool bars fixed as expected by the above line of code.It also does not permit the user to rearrange the toolbars (as expected). When i am logged in as the normal user in the system the two tool bars move up and down whenever I click on the interface. Though I am not able to move/dock physically the two tool bars using the grippers, the two tool bars move up and down of its own whenever i click on the user interface The tool bar docking behaves differently when loged in administrator mode and normal user mode in the system . Regards, Howard
|
|
howard liu
|
Sep 8, 2008 - 10:09 AM
|
Our further testing shows the same behaviour in administartor or normal user mode. Sorry for the confusion on this condition (admin/normal user) The behaviour is I have two seperate tool bars in a user interface (primary tool bar appears on the top and secondary appears below in the second row - this requirement). After applying CExtControlBar::g_bLockAllBars = true; the tool bars are physically non-dockable by the user as expected but when i close and open the user interface the primary and seconday tool bars appear in the same row. The primary tool bar is for the text and the secondary tool bar is for the graphix. When i click on the graphix pane within the user interface the secondary tool bar (that of graphix) comes back to the second row below the primary tool bar. So the behaviour is on opening the interface the primary and secondary tool bar appears on the same row and when clicked inside the interface the secondary tool bar moves down. However the tool bars are physically non dockable by the user Thanks
|
|
Technical Support
|
Sep 9, 2008 - 12:10 PM
|
We guess you should lock all the bars using the CExtControlBar::g_bLockAllBars = true; code but you should invoke it earlier initialization step. Please note Prof-UIS does not save/restore the CExtControlBar::g_bLockAllBars flag value. If you are able to change control bar position using mouse, then this flag is false .
|
|
Technical Support
|
Sep 6, 2008 - 1:18 PM
|
Please give us more info about toolbars behavior when you are not logged in as the administrator. These toolbars can change their positions only if they are enabled for redocking and the user drag-n-drops them or when the frame window size has changed.
|
|
tera tera
|
Sep 5, 2008 - 4:02 AM
|
Hello. I want to change a title of CExtControlBar.
Please teach a command.
|
|
Technical Support
|
Sep 5, 2008 - 10:35 AM
|
You should override the CExtControlBar::OnGetBarCaptionText() virtual method:
virtual void OnGetBarCaptionText(
e_bar_caption_text_t eBCT,
CExtSafeString & strCaptionText
) const; The e_bar_caption_text_t enumeration is defined in scope of the CExtControlBar class and defined which text should be saved in the strCaptionText parameter:
enum e_bar_caption_text_t
{
__EBCT_SINGLE_CAPTION_DOCKED = 0,
__EBCT_SINGLE_CAPTION_FLOATING = 1,
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
__EBCT_TAB_GROUP_CAPTION_DOCKED = 2,
__EBCT_TAB_GROUP_CAPTION_FLOATING = 3,
__EBCT_TAB_ITEM_CAPTION = 4,
__EBCT_AUTOHIDE_ITEM_CAPTION = 5,
__EBCT_AUTOHIDE_SLIDER_CAPTION = 6,
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
#if (!defined __EXT_MFC_NO_DYNAMIC_BAR_SITE)
__EBCT_DOCUMENT_CONTAINER_CAPTION = 7
#endif // (!defined __EXT_MFC_NO_DYNAMIC_BAR_SITE)
};
|
|
Bjorn Lindahl
|
Sep 5, 2008 - 3:18 AM
|
Trying to compile ProfUISDLL, MBCS Debug I get the following compiler error: ExtTabbedToolControlBar.cpp
..\Include\ExtCmdIcon.h(580) : error C2177: constant too big i.e the line it complains about is: double percentH = 0.0,
|
|
Bjorn Lindahl
|
Sep 5, 2008 - 3:18 AM
|
In VS 2005 that is. Haven’t verified the same problem with other VS-versions. Also I’m talking about ProfUIS 2.83.
|
|
Bjorn Lindahl
|
Sep 5, 2008 - 3:28 AM
|
Forget it, it seem to have been temporary. My bad
|
|
Offer Har
|
Sep 4, 2008 - 1:05 PM
|
Hi, I would like to display an edit button in a grid cell only when the cell is hovered - is this possible? Thanks
Ron.
|
|
Technical Support
|
Sep 24, 2008 - 5:02 AM
|
|
|
Technical Support
|
Sep 5, 2008 - 1:53 PM
|
You can find a number of grids with hovered buttons in the SimpleGrids sample. Please let us know if there is any that you are looking for?
|
|
Offer Har
|
Sep 5, 2008 - 5:06 PM
|
Dear Support, I tried to get into the code there, but it’s very hard to understand what is going on there... Can you please give me some guidelines as to how to do the following: I have a cell, that when hovered I want to display a button in it, when not hovered, it should not display that button. Thanks,
Ron.
|
|
Offer Har
|
Sep 5, 2008 - 3:20 PM
|
OK - great - saw it in the simple grids. Will try it out.
|
|
Offer Har
|
Sep 5, 2008 - 2:29 PM
|
What I mean is that the button is displayed only when hovered over the cell. Is this possible?
|
|
Technical Support
|
Sep 6, 2008 - 1:21 PM
|
There is a set of __EGWS_BSE_BUTTONS_IN_*** styles which should be used with CExtGridWnd::BseModifyStyle() / CExtGridWnd::BseGetStyle() methods. You should apply only the __EGWS_BSE_BUTTONS_IN_HOVERED_CELL style.
|
|
Offer Har
|
Sep 24, 2008 - 8:58 AM
|
Dear Support, After comparing with your test application, I found I was missing a lot of stuff.., for the futrue users, this is what you need to add to the grid/tree objects:
m_tree.BseModifyStyle(__EGWS_BSE_BUTTONS_IN_HOVERED_CELL, __EGWS_BSE_BUTTONS_PERSISTENT);
m_tree.HoverEventsSet();
m_tree.HoverHighlightSet( true, false, false, false, false, false ); And then it will work... Thanks for you rhelp.
|
|
Offer Har
|
Sep 6, 2008 - 7:15 PM
|
I added this line:
BseModifyStyle(__EGWS_BSE_BUTTONS_IN_HOVERED_CELL);
And added :
ModifyStyle(__EGCS_BUTTON_ELLIPSIS); To my cells. But the ellipsis buttons appear all the time, regardless if the cell is hovered or not. I would like to add that my grid is actually a tree grid. What is wrong? Is this supported in tree grids? Is there a bug? Thanks,
Ron.
|
|
tera tera
|
Sep 3, 2008 - 9:01 PM
|
Hello. I made a ribbon node with __ECTN_TBB_SEPARATED_DROPDOWN and a big button.
The indication point of the line is displayed than a title in the upper part.
In this case I think that it should be displayed in the bottom of the title.
|
|
tera tera
|
Sep 5, 2008 - 4:04 AM
|
Hello. I ask for your answer.
|
|
Technical Support
|
Sep 5, 2008 - 10:35 AM
|
The text can be only part of the drop-down button both in Prof-UIS and MS Office applications when the ribbon button is in the large state. If the text was part of the main part of the split button, the drop down button would be very small and not usable.
|
|
tera tera
|
Sep 3, 2008 - 8:48 PM
|
Hello. I made a tool menu with __ECTN_TBB_SEPARATED_DROPDOWN. The application does Assert of a menu in the following conditions when I touch it.
1, I choose tool menu.
2, I touch it in MenuA.
3, The application does Assert.
|
|
Technical Support
|
Sep 22, 2008 - 12:12 PM
|
Thank you for reporting this issue. To fix it, please update the source code for the following method: LRESULT CALLBACK CExtPopupMenuSite::_HookMouseProc(
int nCode, // hook code
WPARAM wParam, // message identifier
LPARAM lParam // mouse coordinates
)
{
__PROF_UIS_MANAGE_STATE;
if( nCode != HC_ACTION )
return ::CallNextHookEx( g_DefPopupMenuSite.m_hMouseHook, nCode, wParam, lParam );
MOUSEHOOKSTRUCT * lpMS = (MOUSEHOOKSTRUCT*)lParam;
ASSERT( lpMS != NULL );
if( CExtPopupMenuWnd::TEAROFFNOTIFICATON::g_pCurrentTEAROFFNOTIFICATON != NULL )
{
switch( wParam )
{
case WM_MOUSEMOVE:
{
CPoint pt( lpMS->pt );
if( CExtPopupMenuWnd::TEAROFFNOTIFICATON::g_pCurrentTEAROFFNOTIFICATON->_OnMouseMove( (UINT)wParam, pt ) )
return 1;
}
break;
case WM_MOUSEWHEEL:
{
if( CExtPopupMenuWnd::TEAROFFNOTIFICATON::g_pCurrentTEAROFFNOTIFICATON->_OnMouseWheel( wParam, lParam ) )
return 1;
}
break;
case WM_NCLBUTTONDOWN:
case WM_NCRBUTTONDOWN:
case WM_NCMBUTTONDOWN:
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_NCLBUTTONUP:
case WM_NCRBUTTONUP:
case WM_NCMBUTTONUP:
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
{
CPoint ptSrc( lpMS->pt );
if( CExtPopupMenuWnd::TEAROFFNOTIFICATON::g_pCurrentTEAROFFNOTIFICATON->_OnMouseClick( (UINT)wParam, ptSrc ) )
return 1;
}
break;
}
}
if( nCode == HC_ACTION && (! g_DefPopupMenuSite.IsEmpty() ) && (! g_DefPopupMenuSite.IsShutdownMode() ) )
{
CExtPopupMenuWnd * pWndCapture = g_DefPopupMenuSite.GetCapture();
if( pWndCapture != NULL && ::IsWindow( pWndCapture->GetSafeHwnd() ) )
{
ASSERT_VALID( pWndCapture );
switch( wParam )
{
case WM_MOUSEMOVE:
{
CPoint pt( lpMS->pt );
pWndCapture->ScreenToClient( &pt );
bool bNoEat = false;
if( pWndCapture->_OnMouseMove( (UINT)wParam, pt, bNoEat ) )
{
HWND hWnd = ::WindowFromPoint( lpMS->pt );
if( hWnd != NULL && ::GetWindowThreadProcessId( hWnd, NULL ) == ::GetCurrentThreadId() )
{
INT nHT = (INT)::SendMessage( hWnd, WM_NCHITTEST, 0L, MAKELPARAM(lpMS->pt.x,lpMS->pt.y) );
INT nMM = WM_MOUSEMOVE;
if( nHT != HTCLIENT && nHT != HTMINBUTTON && nHT != HTMAXBUTTON
&& nHT != HTHELP && nHT != HTCLOSE && nHT != HTNOWHERE
)
nMM = WM_NCMOUSEMOVE;
else
nHT = HTCLIENT;
::SendMessage( hWnd, WM_SETCURSOR, (WPARAM)hWnd, MAKELPARAM(nHT,nMM) );
}
return 1;
}
if( bNoEat )
return ::CallNextHookEx( g_DefPopupMenuSite.m_hMouseHook, nCode, wParam, lParam );
}
break;
case WM_MOUSEWHEEL:
{
bool bNoEat = false;
if( pWndCapture->_OnMouseWheel( wParam, lParam, bNoEat ) )
return 1;
if( bNoEat )
return ::CallNextHookEx( g_DefPopupMenuSite.m_hMouseHook, nCode, wParam, lParam );
return 1;
}
break;
case WM_NCLBUTTONDBLCLK:
case WM_NCRBUTTONDBLCLK:
case WM_NCMBUTTONDBLCLK:
case WM_LBUTTONDBLCLK:
case WM_RBUTTONDBLCLK:
case WM_MBUTTONDBLCLK:
CExtBarButton::g_pTrackingMenuTBB = NULL;
// continue ...
case WM_NCLBUTTONDOWN:
case WM_NCRBUTTONDOWN:
case WM_NCMBUTTONDOWN:
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_NCLBUTTONUP:
case WM_NCRBUTTONUP:
case WM_NCMBUTTONUP:
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
{
HWND hWndFromPoint = WindowFromPoint( lpMS->pt );
if( hWndFromPoint != NULL )
{
LRESULT nHT = ::SendMessage( hWndFromPoint, WM_NCHITTEST, 0L, MAKELPARAM( lpMS->pt.x, lpMS->pt.y ) );
if( ( nHT == HTSYSMENU || nHT == HTCAPTION )
&& wParam != WM_NCLBUTTONUP
&& ( ! g_PaintManager.m_DWM.IsCompositionEnabled() )
)
{
CWnd * pWndFromPointPermanent = CWnd::FromHandlePermanent( hWndFromPoint );
if( pWndFromPointPermanent == NULL
|| (! pWndFromPointPermanent->IsKindOf( RUNTIME_CLASS(CMiniFrameWnd) ) )
)
{
pWndCapture->TrackFlagsSet( pWndCapture->TrackFlagsGet() | TPMX_NO_FADE_OUT_ANIMATION );
CExtToolControlBar::_CloseTrackingMenus();
CExtPopupMenuWnd::CancelMenuTracking();
return ::CallNextHookEx( g_DefPopupMenuSite.m_hMouseHook, nCode, wParam, lParam );
}
}
}
CPoint ptSrc( lpMS->pt );
pWndCapture->ScreenToClient( &ptSrc );
bool bNoEat = false;
HWND hWndCapture = pWndCapture->GetSafeHwnd();
ASSERT( hWndCapture != NULL && ::IsWindow(hWndCapture) );
if( pWndCapture->_OnMouseClick( (UINT)wParam, ptSrc, bNoEat ) )
return 1;
if( bNoEat )
return ::CallNextHookEx( g_DefPopupMenuSite.m_hMouseHook, nCode, wParam, lParam );
if( ! (::IsWindow(hWndCapture)) )
return 1;
CPoint pt( lpMS->pt );
HWND hWndPT = ::WindowFromPoint( pt );
if( hWndPT != NULL )
{
CWnd * pWndPermanentPT = CWnd::FromHandlePermanent( hWndPT );
CExtPopupMenuWnd * pPopup = pWndCapture;
for( ; pPopup != NULL; pPopup = pPopup->m_pWndParentMenu )
{
CPoint ptClient( pt );
pPopup->ScreenToClient( &ptClient );
if( pPopup->_PtInWndArea(ptClient) )
return 1;
CExtPopupMenuTipWnd & _tipWnd = pPopup->GetTip();
HWND hWndTest = _tipWnd.GetSafeHwnd();
if( hWndTest != NULL )
{
if( hWndTest == hWndPT || ::IsChild( hWndTest, hWndPT ) )
return 1;
}
if( pWndPermanentPT != NULL
&& ::IsChild( pPopup->m_hWnd, hWndPT )
&& pWndPermanentPT->IsKindOf( RUNTIME_CLASS(CScrollBar) )
)
return 1;
}
}
CExtPopupMenuWnd * pPopup = CExtPopupMenuSite::g_DefPopupMenuSite.GetInstance();
if( pPopup != NULL )
{
ASSERT_VALID( pPopup );
ASSERT( ::IsWindow(pPopup->GetSafeHwnd()) );
pPopup->_CancelingSet();
pPopup->_OnCancelMode();
bool bEatEvent = false;
if( wParam != WM_LBUTTONDOWN && wParam != WM_RBUTTONDOWN && wParam != WM_MBUTTONDOWN )
bEatEvent = true;
if( ! bEatEvent )
{
if( ! ::IsWindow( hWndPT ) )
bEatEvent = true;
}
if( bEatEvent )
{
if( CExtPopupMenuWnd::g_bEatNcAreaClicks )
return 1;
}
}
}
break;
}
}
else
return 1;
}
return ::CallNextHookEx( g_DefPopupMenuSite.m_hMouseHook, nCode, wParam, lParam );
}
|
|
tera tera
|
Sep 8, 2008 - 5:54 PM
|
Hello. I ask for your answer.
|
|
Technical Support
|
Sep 9, 2008 - 2:16 PM
|
How to reproduce this issue in our RibbonBar sample project? We suspect this issue depends on very specific menu initialization steps.
|
|
tera tera
|
Sep 22, 2008 - 2:55 AM
|
|
|
David Skok
|
Sep 3, 2008 - 9:58 AM
|
How can I set the background color of button cells in grids? Thanks, Dave
|
|
Technical Support
|
Sep 4, 2008 - 5:16 AM
|
You can do that only by overriding the CExtGridCellButton::OnPaintButton virtual method.
|
|
melcaun shin
|
Sep 2, 2008 - 7:40 PM
|
|
|
Technical Support
|
Sep 4, 2008 - 12:52 PM
|
|
|
melcaun shin
|
Sep 9, 2008 - 12:43 AM
|
|
|
Offer Har
|
Sep 2, 2008 - 11:05 AM
|
I would like to add a context menu for my tab container when the user right click on the tab control, and to know on which tab index he clicked. Please advise. Thanks,
Ron
|
|
Technical Support
|
Sep 24, 2008 - 5:03 AM
|
This the simple dialog based project with the tab page container control created inside the main dialog window. It demonstrates how to handle right mouse clicks on the tab items of the tab control inside tab page container window. These right clicks can be optionally handled in the tab page container class, in the main dialog class (used as parent window of the tab page container window) or even in both classes including up and down left mouse button events. You can simply display context menu instead of message box displayed in our test project. The ::GetCursorPos() Win32 API should be used for retrieving mouse cursor position which is needed in parameters of the CExtPopupMenuWnd::TrackPopupMenu() method.
|
|
Technical Support
|
Sep 4, 2008 - 5:33 AM
|
|
|
Offer Har
|
Sep 4, 2008 - 6:17 AM
|
Can you please highlight what needs to be done? This thread is very messy, and not chonologically ordered. I tried override OnTabWndClickedItem , but it is never called - what am I missing? Thanks,
Ron.
|
|
Offer Har
|
Sep 2, 2008 - 10:44 AM
|
Hi, I added the following line to my CExtTabPageContainerWnd object so that it will have close buttons on all tabs: m_tab.GetSafeTabWindow()->ModifyTabWndStyleEx(0, __ETWS_EX_CLOSE_ON_TABS);
This worked, and each tab have a close button, but clicking the close button does nothing... Please fix, or give an alternative to activate this feature, Thanks
Ron.
|
|
Offer Har
|
Sep 17, 2008 - 1:41 PM
|
|
|
Technical Support
|
Sep 17, 2008 - 12:25 PM
|
Yes, the close buttons do nothing in the case of a tab page container. This control does not know whether it should destroy tab pages or just hide them on "X" button click. You can override the CExtTabPageContainerWnd::OnTabWndClickedItemCloseButton() virtual method, optionally show any required message boxes and do what you need with the tab page.
|
|
Offer Har
|
Sep 2, 2008 - 10:20 AM
|
Hi, I want to add a page at the end of a tab control, and to set a tooltip to it using PageTooltipTextSet . The problem is that PageInsert does not return the index of the new added page, and none of the PageInsert function accept the tooltip string. Can you please do one of the two: 1) Return the index of the page added instead of BOOL or: 2) Add the tooltip parameter to the PageInsert function Thanks,
Ron.
|
|
Technical Support
|
Sep 17, 2008 - 12:25 PM
|
There are no problems with design and declaration of the CExtTabPageContainerWnd::PageInsert() method. If you specify a greater or zero value in the nPos parameter, then it’s the result index of inserted page. If you specify a negative value, the inserted page is the last page and you can get its index because you can get total count of pages by invoking the CExtTabPageContainerWnd::PageGetCount() method.
|
|
Offer Har
|
Sep 2, 2008 - 9:57 AM
|
Hi, I have a tree grid that if a cell is clicked I do operation X, and if the cell is double-clicked, I do operation Y. The problem is that if I double click the cell, I first get a call to the function OnGbwAnalyzeCellMouseClickEvent with nRepCnt==1 and then another call with nRepCnt==2 , so there is no way for me to handle this simple task. Is there another way to distniguish between single & double click in grids? Thanks, Ron.
|
|
Technical Support
|
Sep 4, 2008 - 12:55 PM
|
This is a common task. You should handle double-clicking as is. I.e. you should invoke your default double-clicking handling code directly from the OnGbwAnalyzeCellMouseClickEvent() method. The single click notification received by this method should be handled with a delay. So, if your method has received the single click event, then it should invoke the SetTimer( SOME_TIMER_ID, ::GetDoubleClickTime() + 1 , NULL ); code. Of course, you should handle the SOME_TIMER_ID timer event for handling single click event. Please do not forget to invoke the KillTimer( SOME_TIMER_ID ); code in the very beginning of both single and double click handling code.
|
|
Offer Har
|
Sep 4, 2008 - 1:04 PM
|
Why is this so complicated? When you do the same for a normal control, you have two separate function that do not cross ON_WM_LBUTTONDBLCLK and ON_WM_LBUTTONDOWN/UP.
|
|
Technical Support
|
Sep 6, 2008 - 8:59 AM
|
We do not agree with you:
1) Any window which has a window class registered using the CS_DBLCLICKS class style receives a WM_LBUTTONDOWN message first and only then receives a WM_LBUTTONDBLCLK message. So, the solution we described should be used in any window which supports double clicking events.
2) The solution we described is not complicated. It’s simplest possible.
|