Subject |
Author |
Date |
|
Chun Pong Lau
|
Oct 3, 2006 - 1:16 AM
|
Dear support team,
How can I change the icon in CExtDynamicControlBar dynamically after its initialization by CExtDynamicBarSite::BarAlloc? I tried SetIcon but failed.
Thanks in advance, Alan
|
|
Chun Pong Lau
|
Oct 3, 2006 - 7:00 AM
|
Thanks for your response but after I added the code, I still cannot change the icon (please note that I am using dynamic control bar under tab document mode, CExtDynamicControlBar::__EDBS_DOCUMENT, the icon to be changed is on top of the document, inside the clickable tab).
I’ve also tried to use some method like GetParentFrame()->RecalcLayout(), Invalidate(), UpdateWindow() but it still doesn’t work.
Thanks in advance again. Alan
|
|
Technical Support
|
Oct 4, 2006 - 8:31 AM
|
We are sorry for the inconvenience. Please replace LONG nItemCount = _BT::ItemGetCount(); with LONG nItemCount = CExtTWPC < CExtTabWnd > :: ItemGetCount();
|
|
Technical Support
|
Oct 3, 2006 - 2:40 AM
|
All the control bars use icons stored in the command manager: CExtControlBar * pBar = . . . // or CExtDynamicControlBar
UINT nCmdID = UINT( pBar->GetDlgCtrlID() );
LPCTSTR strCmdProfileName = g_CmdManager->ProfileNameFromWnd( pBar->m_hWnd );
g_CmdManager->CmdSetIcon( strCmdProfileName, nCmdID, . . . );
|
|
Chun Pong Lau
|
Oct 3, 2006 - 7:18 AM
|
After I added the code, I still cannot change the icon (please note that I am using dynamic control bar under tab document mode, CExtDynamicControlBar::__EDBS_DOCUMENT, the icon to be changed is on top of the document, inside the clickable tab).
I’ve also tried to use some method like GetParentFrame()->RecalcLayout(), Invalidate(), UpdateWindow() but it still doesn’t work.
Best regards, Alan
|
|
Technical Support
|
Oct 4, 2006 - 9:20 AM
|
We modified the SDI_DynamicBars to demonstrate how to change the bar icons on-the-fly. You can download it from our website. The menu bar in this sample application contains two command items at the top level: SetIcon1 and SetIcon2. These commands allow you to change the icons of all the dynamic bars. These commands are handled in the CMainFrame::OnSetIcon1() and CMainFrame::OnSetIcon2() methods. These simple methods invoke the CMainFrame::_SetIconToAllDynamicBars() method which replaces icons of all the dynamic control bars with the specified icon. The CMainFrame::_SetIconToOneDynamicBar() method is used to change the icon of one particular dynamic control bar.
|
|
Chun Pong Lau
|
Oct 5, 2006 - 1:34 AM
|
Thank you. It works perfectly!
Alan
|
|
Gevork Odabashyan
|
Oct 2, 2006 - 9:44 AM
|
I wrote simple sample that uses dynamic bars. To illustrate my problem, please do the following: 1. Open new dynamic bar ("Create dynamic bar\Bar 1") 2. Set it’s state to "Tabbed document". 3. Switch UI profile to Profile 2 ("Switch Profile\To Profile 2") 4. Switch UI profile to Profile 1 ("Switch Profile\To Profile 1") There will be no dynamic bar in tabbed state! The sapmple dynamic_bar_sample.rar was sent to support@prof-uis.com
|
|
Technical Support
|
Oct 3, 2006 - 10:59 AM
|
There were two problems. The first was that you forgot to invoke the parent class method in your project: void CMyDynamicBar::OnSerializeDynamicProps(CArchive& ar) {
CExtDynamicControlBar::OnSerializeDynamicProps(ar); // YOU FORGOT THIS
if ( ar.IsStoring() )
{
ar << m_dealDlg.m_id;
}
else
{
ar >> m_dealDlg.m_id;
}
} The second was caused by a typo in Prof-UIS. Please update the source code for the following method: CExtDynamicControlBar * CExtDynamicBarSite::BarAlloc(
__EXT_MFC_SAFE_LPCTSTR strCaptionText,
const CExtCmdIcon & icon,
UINT nDesiredCmdID, // = 0
CRuntimeClass * pDesiredRTC, // = NULL
bool bPersistentBar // = false
)
{
ASSERT( this != NULL );
CFrameWnd * pDockSite = DockSiteGet();
if( pDockSite->GetSafeHwnd() == NULL )
return NULL;
ASSERT_VALID( pDockSite );
ASSERT(
pDockSite->GetSafeHwnd() != NULL
&& ::IsWindow( pDockSite->GetSafeHwnd() )
);
UINT nCmdID =
OnDbsAllocNewBarCommandID(
strCaptionText,
icon,
nDesiredCmdID
);
if( nCmdID == 0 )
return NULL;
CExtDynamicControlBar * pBar =
( pDesiredRTC != NULL )
? ( (CExtDynamicControlBar *) pDesiredRTC->CreateObject() )
: OnDbsCreateNewBarInstance()
;
pBar->m_bPersistentBar = bPersistentBar;
if( pBar == NULL )
{
OnDbsFreeBarCommandID( nCmdID );
return NULL;
}
ASSERT_VALID( pBar );
ASSERT_KINDOF( CExtDynamicControlBar, pBar );
if( ! pBar->Create(
( strCaptionText == NULL )
? _T("") : strCaptionText,
pDockSite,
nCmdID,
WS_CHILD //|WS_VISIBLE
|WS_CLIPCHILDREN|WS_CLIPSIBLINGS
|CBRS_TOP|CBRS_GRIPPER|CBRS_TOOLTIPS
|CBRS_FLYBY|CBRS_SIZE_DYNAMIC
|CBRS_HIDE_INPLACE
)
)
{
OnDbsFreeBarCommandID( nCmdID );
delete pBar;
return NULL;
}
pBar->m_strCaptionText =
( strCaptionText == NULL )
? _T("") : strCaptionText;
pBar->m_icon = icon;
m_mapBars.SetAt( pBar, NULL );
pBar->EnableDocking( CBRS_ALIGN_ANY );
VERIFY(
pBar->DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_LEFT,
true,
pDockSite,
false
)
);
pDockSite->ShowControlBar( pBar, FALSE, TRUE );
return pBar;
}
|
|
Chun Pong Lau
|
Oct 1, 2006 - 6:09 PM
|
Hello dear support team,
When I right click on the gripper of a CExtDyanmicControlBar, there will be a popup (context) menu showing up.
1) How can I disable this feature?
2) How can I customize the items of this popup menu? In other words, instead of "floating", "dockable", "tabbed document", "auto-hide" and "hide", how can I use some other items, e.g. "move left", "move right" and "close"?
Thanks in advance, Alan
|
|
Technical Support
|
Oct 2, 2006 - 11:25 AM
|
You should use a CExtDynamicControlBar -derived class and override the CExtDynamicControlBar::OnInitDbsMenu() virtual method in it. Invoke the parent class’s method and modify the menu created by default. you can also create your own custom menu from scratch.
|
|
Chun Pong Lau
|
Oct 2, 2006 - 6:50 PM
|
Thank you for your response. After I tried to follow your instructions and disabled the popup the by the overiding the following method:
bool CMyExtDynamicControlBar::OnInitDbsMenu(CExtPopupMenuWnd * pPopup, HWND hWndTrack, CObject * pHelperSrc, LPARAM lParamHelper){ return true; }
When I right-click the program, the popup menu does not appear (thank you) but when I close the program, it crashed at, according to the debug mode,
!CExtHookSink::HookChains_t::HookChainsWindowProc() + 0x6d bytes C++ !CExtHookSink::HookChains_t::g_HookWndProc() + 0x67 bytes C++
Is there any method to avoid this annoying shutdown crashing problem?
Thanks in advance, Alan
|
|
Technical Support
|
Oct 3, 2006 - 2:37 AM
|
This leak typically occurs only if you terminate your application with PostQuitMessage() or ExitThread(). It does not occur in our sample projects even if we override the CMyExtDynamicControlBar::OnInitDbsMenu() virtual method as you do it. We can look at your project and find out what’s wrong.
|
|
Chun Pong Lau
|
Oct 1, 2006 - 7:46 AM
|
Hello dear support team,
When I have only 1 single tabbed document (__EDBS_DOCUMENT), can I hide the panel with the 1 tab and also the left and right and close button above the document (the same behaviour with FireFox) for simplicity?
Thanks in advance, Alan
|
|
Technical Support
|
Oct 2, 2006 - 11:04 AM
|
The solution to what you are looking for is as follows.
1. Create a CExtMenuControlBar -derived class and override its CExtMenuControlBar::IsDisplayDocumentButtons() virtual method. Leave this method empty but simply return false in it.
2. Create a CExtTabMdiWnd -derived class and implement the following virtual method in it: virtual void OnTabWndSyncVisibility()
{
LONG nItemCount = ItemGetCount();
DWORD dwWndStyle = GetStyle();
if( nItemCount > 1
&& (!( CExtControlBar::FindPrintPreviewMode(
STATIC_DOWNCAST( CFrameWnd, GetParent() )
)
|| CExtControlBar::IsOleIpObjActive(
STATIC_DOWNCAST( CFrameWnd, GetParent() )
)
) )
)
{
if( (dwWndStyle & WS_VISIBLE) == 0 )
{
::SetWindowPos(
m_hWnd,
NULL, 0, 0, 0, 0,
SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER
|SWP_FRAMECHANGED
|SWP_SHOWWINDOW
);
HWND hWndMdiArea = _GetHwndMdiArea();
if( hWndMdiArea != NULL )
::SetWindowPos(
hWndMdiArea,
NULL, 0, 0, 0, 0,
SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER
|SWP_FRAMECHANGED
);
}
}
else
{
if( (dwWndStyle & WS_VISIBLE) != 0 )
::SetWindowPos(
m_hWnd,
NULL, 0, 0, 0, 0,
SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER
|SWP_NOSENDCHANGING
|SWP_HIDEWINDOW
);
}
dwWndStyle = GetStyle();
if( (dwWndStyle & WS_VISIBLE) == 0 )
m_nIndexVisFirst = m_nIndexVisLast = -1;
}
|
|
Chun Pong Lau
|
Oct 2, 2006 - 7:49 PM
|
Dear support team,
1. It seems that there is only CExtMenuControlBar::IsDisplayMdiDocumentButtons() but no CExtMenuControlBar::IsDisplayDocumentButtons().
2. I have made CExtMenuControlBar::IsDisplayMdiDocumentButtons() returning false and implemented the given CExtTabMdiWnd::OnTabWndSyncVisibility() but it seems this function is never executed even the tab selection panel is appeared on the UI.
3. I am using SDI. Does it matter?
Regards, Alan
|
|
Technical Support
|
Oct 3, 2006 - 2:40 AM
|
We provided the solution only for MDI projects. SDI projects with dynamic control bars are based on the CExtTabPageContainerWnd window as the main view window. This window contains one CExtTabWnd control and a set of page windows. So, you need to implement both CExtTabWnd -derived and CExtTabPageContainerWnd -derived classes. The latter should be used in your project. class CYourTabWnd : public CExtTWPC < CExtTabWnd >
{
public:
void OnTabWndSyncVisibility()
{
LONG nItemCount = _BT::ItemGetCount();
DWORD dwWndStyle = GetStyle();
if( nItemCount > 1 )
{
if( (dwWndStyle & WS_VISIBLE) == 0 )
{
::SetWindowPos(
m_hWnd,
NULL, 0, 0, 0, 0,
SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER
|SWP_FRAMECHANGED
|SWP_SHOWWINDOW
);
}
}
else
{
if( (dwWndStyle & WS_VISIBLE) != 0 )
::SetWindowPos(
m_hWnd,
NULL, 0, 0, 0, 0,
SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER
|SWP_HIDEWINDOW
);
}
}
};
class CYourTabPageContainerWnd : public CExtTabPageContainerWnd
{
public:
virtual CExtTabWnd * OnTabWndGetTabImpl()
{
return new CYourTabWnd;
}
};
|
|
Chun Pong Lau
|
Oct 3, 2006 - 10:29 AM
|
Where and how should I use the class CYourTabPageContainerWnd?
|
|
Technical Support
|
Oct 3, 2006 - 12:38 PM
|
The CMainFrame class in your project should have the property of CExtTabPageContainerWnd type (or CExtTabPageContainerOneNoteWnd , or CExtTabPageContainerFlatWnd , or CExtTabPageContainerWhidbeyWnd , or CExtTabPageContainerButtonsWnd ). You should use the CYourTabPageContainerOneNoteWnd type there instead.
|
|
Chun Pong Lau
|
Oct 3, 2006 - 1:28 PM
|
Thank you very much. It works perfectly except the line:
LONG nItemCount = _BT::ItemGetCount();
will have a compiling error, "error C2653: ’_BT’ : is not a class or namespace name." I tried to change it to
LONG nItemCount = ItemGetCount();
and it seems it is ok now.
Please keep up the good job! You have given me a very good impression on your post technical support.
Thumbs up!
Alan
|
|
Timothy Anderson
|
Sep 29, 2006 - 2:51 PM
|
I can’t seem to find anything on how to allow the menu bar to dock but not to float off of the application.
It would be nice to figure out how to set up your forum search to do keyword AND searches, not keyword OR searches also.
|
|
Technical Support
|
Oct 2, 2006 - 10:58 AM
|
You should use the following menu bar class: class CMyMenuBar : public CExtMenuControlBar
{
public:
virtual void FloatControlBar(
CPoint ptFloat,
DWORD dwStyle = CBRS_ALIGN_TOP
)
{
ptFloat;
dwStyle;
}
}; As for the better search, we agree with you. We would have added the AND search long ago if our hosting provider had had the full text search option turned on on their SQL server. We are sorry for this inconvenience and would like to assure you that this issue will be resolved.
|
|
Darren Oliver
|
Sep 28, 2006 - 9:25 AM
|
I have made a dialog with the resource editor in Visual Studio and changed the button control from a CButton to a CExtButton. I wanted to keep the same 3-D look of the MFC control but Iaˆ™m now left with a flat button which changes to blue when the mouse cursor passes over.
I have tried changing the styles without success. Here is an example of how Iaˆ™m trying to change the style. The following code snipit is inside OnInitDialog(). okBtn.SetButtonStyle(WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,true);
Iaˆ™m running prof-ui version 2.54.
Any suggestions or tips are greatly appreciated. Thanks!
|
|
Technical Support
|
Sep 28, 2006 - 11:23 AM
|
We coded a test project. There is a CCustomPaintManagerHolder template decorator class in it, which can be applied to button controls and many other controls. This template class keeps a pointer to an externally instantiated paint manager and makes Prof-UIS controls use this paint manager. The several buttons on the main dialog window are drawn by the Office 2000 paint manager and look like old classic Windows buttons. At the same time some other buttons are painted by the currently installed Prof-UIS paint manager.
|
|
Damien Castelltort
|
Sep 28, 2006 - 9:16 AM
|
Hi,
I have a problem using CExtPropertyGridCtrl component. We are using the version 2.54. I overloaded this class (let s call it PROPERTY_EDITOR) to allow me to instanciate my overloads of the CExtPropertyValue class (let s call it PROPERTY_VALUE).
I added two methods in the PROPERTY_EDITOR class :
SynchronizeFromObject() :
This method synchronizes the cell values from my object values. In this method, I make a call to the PropertyStoreSynchronize() method to update the cell content.
SynchronizeFromGUI() :
This method synchronizes my object values from the cell values. At the end of this method, I call the SynchronizeFromObject() method to refresh all the properties because some of my object values can be related to each other, it means that if I can edit properties A , B , C in the grid, changing value of property A can alter the values of the B and C properties. This method is called in the PROPERTY_VALUE :: Apply() method.
Let s take the example of a CExtGridVariantCell. The issue is that each time i modify the value of the cell using the spinbuttons, the SynchronizeFromGUI method is called, that calls to the SynchronizeFromObject method that performs a PropertyStoreSynchronize() method call. Thus i loose the focus on the edited cell.
Do you have a solution to Update the cells content without using the PropertyStoreSynchronize method
Best Regards
|
|
Technical Support
|
Sep 28, 2006 - 11:16 AM
|
You can get the array of tree grid windows in the property grid control and find grid cells of a particular property value in all the grids: CExtPropertyValue * pPropertyValue = . . .
CExtPropertyGridCtrl & _PGC = . . .
CTypedPtrArray < CPtrArray, CExtPropertyGridWnd * > arrGrids;
_PGC.OnPgcQueryGrids( arrGrids );
INT nGridIdx = 0, nGridCount = INT( arrGrids.GetSize() );
for( ; nGridIdx < nGridCount; nGridIdx ++ )
{
CExtPropertyGridWnd * pGrid = arrGrids[ nGridIdx ];
ASSERT_VALID( pGrid );
HTREEITEM hTreeItem = pGrid->PropertyItemToTreeItem( pPropertyValue );
if( hTreeItem == NULL )
continue;
CExtGridCell * pGridCell = pGrid->ItemGetCell( hTreeItem, 1 );
if( pGridCell == NULL )
continue;
ASSERT_VALID( pGridCell );
//
// modify pGridCell here and then redraw it if it is visible:
//
LONG nRowNo = pGrid->ItemGetVisibleIndexOf( hTreeItem );
if( nRowNo < 0 )
continue;
CRect rc;
if( pGrid->GridCellRectsGet( 1, nRowNo, 0, 0, NULL, &rc ) )
{
CRect rcClient;
pGrid->GetClientRect( &rcClient );
rc.left = rcClient.left;
rc.right = rcClient.right;
pGrid->InvalidateRect( &rc );
}
}
|
|
marc uchida
|
Sep 27, 2006 - 2:07 PM
|
I have a grid with various cells types. Most cell’s contents I can left align with ModifyStyle(__EGCS_TA_HORZ_LEFT), but this doesn’t have the same affect on my CExtGridCellUpDown cells. It appears __EGCS_TA_HORZ_LEFT has the same affect as __EGCS_TA_HORZ_CENTER. The default is right alignment, and that certainly works. I do not desire the buttons to be left aligned, but only the number value. Is this a bug? thanks
|
|
marc uchida
|
Sep 27, 2006 - 2:13 PM
|
Never mind me, just found the answer myself. Using ModifyStyle( 0, __EGCS_TA_HORZ_MASK ) before calling ModifyStyle( __EGCS_TA_HORZ_LEFT ) does the trick.
|
|
Anthony Spring
|
Sep 27, 2006 - 12:50 PM
|
Hello,
I just recently upgraded to Prof UIS 2.60 and have a problem with my CExtTabPageContainerWhidbeyWnd set up.
What is happening is when I click on my tabs, everything switches and loads the correct data fine. The thing is when I click on the exact same tab again, the screen goes completely grey. I have a refresh button that refreshes the data on the screen which will not bring the display back. Everything worked fine with Prof UIS 2.53 and I’m just wondering what would have changed with Tabs in the new update.
ANY suggestions on where to start digging around in the code in order to resolve this issue is greatly appreciated!
Thanks
|
|
Technical Support
|
Sep 28, 2006 - 11:04 AM
|
It would be very helpful to take a look at the screenshot demonstrating the problem. Would you reproduce the problem by putting your code into the SimpleGrids sample?
|
|
Ed Grochowski
|
Sep 25, 2006 - 6:58 PM
|
We are interested in make some of our dialogs transparent so you can see the underlying view data (to a certain degree). Ideally we’d like to specify alpha blending and opacity factors to control the degree of transparency.
Can you indicate how this can be achieved using the CExtResizeable dialogs?
|
|
jb lee
|
Sep 25, 2006 - 11:20 PM
|
|
|
Technical Support
|
Sep 27, 2006 - 11:48 AM
|
The layered windows are avialable in Windows 2000 or later only. Prof-UIS allows you to detect this. If g_PaintManager.m_bIsWin2000orLater is true , you can use layered windows. In this case the g_PaintManager.m_pfnSetLayeredWindowAttributes and g_PaintManager.m_pfnUpdateLayeredWindow variables are pointers to the SetLayeredWindowAttributes() and UpdateLayeredWindow() Win32 APIs available in Windows 2000 or later. So, if g_PaintManager.m_bIsWin2000orLater is true , you can create your dialog with the WS_EX_LAYERED extended window style (0x00080000) and invoke the g_PaintManager.m_pfnSetLayeredWindowAttributes(...) code to set the transparency level of the dialog. Please do not specify the WS_EX_LAYERED extended window style when creating windows on older Windows versions to avoid a crash of your application.
|
|
Luc Dion
|
Sep 25, 2006 - 8:40 AM
|
Hi, Iaˆ™m using Prof-UIS 2.60, and when the application is maximized it covers the entire screen, including the Windows Taskbar. The problem can be reproduced using the AviFrames-u.exe samples.
Steps: 1- Maximize the window. 2- Minimize the window. 3- Restore the window using the taskbar. 4- Now the application is covering the entire screen (including the taskbar).
Note: This behaviour is only present for application using Office 2007 themes, for example, this cannot be reproduced with the ResizableChildSheet.exe sample.
Thanks for your help, Luc Dion
|
|
Paul Cowan
|
Jul 12, 2007 - 2:22 PM
|
This is still happening in v2.70 of the library.
|
|
Luc Dion
|
Jul 13, 2007 - 6:38 AM
|
Thanks, now it works fine!
|
|
Technical Support
|
Sep 27, 2006 - 11:54 AM
|
Thank you for reporting the bug. Please update the source code of the CExtNcFrameImpl::NcFrameImpl_PostWindowProc() method to fix this bug: void CExtNcFrameImpl::NcFrameImpl_PostWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )
{
lResult;
wParam;
lParam;
switch( message )
{
case WM_NCLBUTTONDBLCLK:
if( m_bNcFrameImpl_RestoreBorder )
{
m_bNcFrameImpl_RestoreBorder = false;
CWnd * pWndFrameImpl = NcFrameImpl_GetFrameWindow();
pWndFrameImpl->ModifyStyle( WS_BORDER, 0 );
}
break;
case WM_WINDOWPOSCHANGING:
{
LPWINDOWPOS lpWindowPos =
reinterpret_cast < LPWINDOWPOS > (lParam);
ASSERT( lpWindowPos != NULL );
m_bNcFrameImpl_DelatayedFrameRecalc =
( ( lpWindowPos->flags & SWP_FRAMECHANGED ) == 0 )
? true : false;
NcFrameImpl_SetupRgn( (WINDOWPOS *)lParam );
}
break;
case WM_WINDOWPOSCHANGED:
m_bNcFrameImpl_DelatayedFrameRecalc = false;
break;
case WM_GETMINMAXINFO:
if( NcFrameImpl_IsSupported() )
{
CWnd * pWndFrameImpl = (CWnd *)NcFrameImpl_GetFrameWindow();
ASSERT_VALID( pWndFrameImpl );
CExtPaintManager::monitor_parms_t _mp;
CExtPaintManager::stat_GetMonitorParms( _mp, pWndFrameImpl );
LPMINMAXINFO pMMI = (LPMINMAXINFO)lParam;
CSize _maxSize = _mp.m_rcWorkArea.Size();
if( _mp.m_rcMonitor == _mp.m_rcWorkArea )
{
if( pMMI->ptMaxPosition.x < _mp.m_rcWorkArea.left )
pMMI->ptMaxPosition.x = _mp.m_rcWorkArea.left;
if( pMMI->ptMaxPosition.y < _mp.m_rcWorkArea.top )
pMMI->ptMaxPosition.y = _mp.m_rcWorkArea.top;
_maxSize.cy -= 1;
}
if( NcFrameImpl_IsForceEmpty() )
{
if( ! NcFrameImpl_IsForceEmptyNcBorderEmpty() )
{
CRect rc = NcFrameImpl_GetForceEmptyNcBorder();
_maxSize.cx += rc.left + rc.right;
_maxSize.cy += rc.top + rc.bottom;
}
}
else
{
CRect rcNcBorders, rcThemePadding;
NcFrameImpl_GetPM()->NcFrame_GetMetrics(
rcNcBorders,
rcThemePadding,
pWndFrameImpl
);
_maxSize.cx += rcNcBorders.left + rcNcBorders.right;
_maxSize.cy += rcNcBorders.top + rcNcBorders.bottom;
}
if( pMMI->ptMaxSize.x > _maxSize.cx )
pMMI->ptMaxSize.x = _maxSize.cx;
if( pMMI->ptMaxSize.y > _maxSize.cy )
pMMI->ptMaxSize.y = _maxSize.cy;
}
break;
}
}
|
|
Christan HIRIGOYEN
|
Sep 25, 2006 - 4:57 AM
|
There is an exception in m_wndMenuBar.Create(NULL, this, ID_VIEW_MENUBAR) when in OLE Object insertion.
When I try to insert my OLE Document in word, I have problem.
It is difficult to trace the problem, but it seems to be in:
int CExtMenuControlBarXD::OnCreate(LPCREATESTRUCT lpCreateStruct) { …. …. …. // pass message loop for smooth MDI client area update reasons CExtPopupMenuWnd::PassMsgLoop( CExtControlBar::g_bEnableOnIdleCalls ); return 0; }
If I call CExtPopupMenuWnd::PassMsgLoop( CExtControlBar::g_bEnableOnIdleCalls ) I have the problem If I comment the line, I don’t have the problem.
My analyse is that PassMsgLoop dispatch pending OLE message to create Document… But CMainFrame is not yet created, AfxGetThread()->m_pMainWnd is still NULL.
Does someone experience that? Could someone help me?
There is a suspect message 0x400? WM_USER or DM_GETDEFID ?
My work around is:
AfxGetThread()->m_pMainWnd = this; if(!m_wndMenuBar.Create(NULL, this, ID_VIEW_MENUBAR)) ...
|
|
Technical Support
|
Sep 26, 2006 - 11:46 AM
|
The problem may be with the InitInstance() virtual method of the CWinApp -derived class in your project. Here is the best design of how this method should create the main frame window: CMainFrame* pFrame = new CMainFrame;
m_pMainWnd = pFrame;
if( ! pFrame->LoadFrame( . . . ) )
{
m_pMainWnd = NULL;
return FALSE;
} Here is the variant of how it looks in MFC applications, which is not the best: CMainFrame* pFrame = new CMainFrame;
if( ! pFrame->LoadFrame( . . . ) )
return FALSE;
m_pMainWnd = pFrame;
|
|
jb lee
|
Sep 25, 2006 - 12:48 AM
|
Hi,
In making a dialog, where 3 groups of radio buttons. So, I made each first button’s attribute as GROUP. On the test dialog(VC 6 IDE-> Tools->Test ), the buttons works well. But, after I add control variable for each Grouped buttons(CExtRadioButton), the resulting dialog(at run time) is not that I wanted. : 1st, the last item in the group is not displayed correctly(Not CExtRadioButton, but, CButton is applied). : 2nd, the first and the last item in each group are selected both.
I’m using VC6 and the library version is 2.54.
Best regards,
jb.
|
|
Technical Support
|
Sep 26, 2006 - 3:29 AM
|
Please use the corresponding Prof-UIS classes: CExtCheckBox for check boxes, CExtRadioButton for radio buttons, CExtGroupBox for group boxes, and CExtLabel for static text controls. Unlike those available in MFC, these classes are fully consistent with the Office 2003 and VS 2005 themes and include some additional features. Please also note if you put controls, including group boxes, onto a dialog template, make sure they are assigned the proper tab order. Since the Prof-UIS group box has a non-transparent background, the tab order is essential. Windows paints controls on the dialog step by step starting from the control with the highest tab order number to the control with the lowest number. So, ensure your group box is assigned the highest tab order number.
|
|
Nitesh Singh
|
Sep 23, 2006 - 12:06 AM
|
Hi......
I have created the same topic in General forum too. You asked me to send some screenshots of the problem.. I have mailed you the screenshots.. And still waiting for your response.. Do reply please.. the problem I am facing is
1. while resizing 2. while switching some other item in the CExtComboboxbar 3. while moving mouse on the buttons of the ToolBar on the top....
|
|
Technical Support
|
Sep 26, 2006 - 12:38 PM
|
Thank you for the screenshots. Unfortunately this was of little help. We cannot say where the problem hides exactly. Most probably the problem has to do with incorrect creation of the property grid, but we need to check this. Please send us a test project, so that we can proceed with this issue.
|
|
Nitesh Singh
|
Sep 27, 2006 - 12:03 AM
|
Sir,.. I have mailed you the sample project. thank you
|
|
Technical Support
|
Sep 27, 2006 - 3:18 AM
|
We are sorry but we have not received it. Please make sure its size is small enough to send though e-mail. You can reduce its size by removing unnecessary files like .ncb.
|
|
Nitesh Singh
|
Oct 10, 2006 - 12:49 AM
|
oh....
the file size is just 60kb. I have sent it again.. please check it out.
|
|
David Skok
|
Sep 21, 2006 - 1:43 PM
|
The data I fill the grid with always contains more rows than fit on the window.
The very first time I fill the grid with data the scrollbar shows. When I clear the grid then fill it with a new set of data the scrollbar does not show. At that point if I select an item and press up or down arrow the scrollbar appears. How can I fix this?
|
|
Suhai Gyorgy
|
Sep 22, 2006 - 2:05 AM
|
In sample ReportGrid, at the very end of some style-changing command-handler methods, there is the following code-snippet to update window: OnSwRecalcLayout( true );
OnSwUpdateScrollBars();
OnSwDoRedraw();
This might help for you, too.
|
|
Eric Houvenaghel
|
Sep 21, 2006 - 11:30 AM
|
Is there a way to make CExtReportGridWnd in virtual mode? CExtReportGridWnd is very slow with a large amount a data and I need the grouping functionality. The problem is that the date provider of CExtReportGridWnd does not derive from CExtGridDataProviderRecordset which contains all the functionality for virtual mode.
|
|
Technical Support
|
Sep 22, 2006 - 12:37 PM
|
The report grid differs from the plain grid in two key features: inactive columns and row grouping. The virtual mode means data rows are provided from some external sub system like a database recordset. The database APIs like that of ADO does not provide the feature of row grouping. We are aware of only one API that provides row grouping in the virtual mode for entire row range: it is a set of COM interfaces provided by MAPI for browsing folder content (used in MS Outlook). It is hardly possible to have both row grouping and virtual mode. The Elegant Grid for .NET and other grids that support row grouping build trees manually in a similar way as it is done Prof-UIS. So, we recommend you use the plain grid for fast access to a large number of data rows.
|
|
Andrey Karavashkin
|
Sep 21, 2006 - 9:20 AM
|
Is it possible to change looking style of CExtEdit’s scroll bars if Prof-UIS library used application? Standards gray scroll bars looks very different from Luna-Blue color cheme.
I tryed to use CExtScrollBar by overriding GetScrollBarCtrl function, but it never calling for CExtEdit or CListBox. (by the way - why CExtListBox class does not exists in library? you have nothing to add to CListBox? ;)
Prof-UIS 2.54
|
|
Technical Support
|
Oct 6, 2006 - 11:18 AM
|
Yes, you can use this class for skinning scrollbars in the CExtEdit control. Anyway we plan to add this feature later.
|
|
Technical Support
|
Sep 22, 2006 - 11:51 AM
|
The following article explains approach of how to use scroll bar common controls with other common controls instead of built-in scroll bar like non-client areas. This test project implements the approch described in the article (with regard to CExtScrollBar windows).
|
|
Andrey Karavashkin
|
Sep 27, 2006 - 1:38 AM
|
The solution you recomended works perfectly with standard windows controls (pure MFC). But Prof-UIS extended contrils has some behavior that doesn’t works correctly with "ScrollBar skining".
For example: CExtEdit has very special border behavior. Border draws over text and scrol bars, and change color when mouse move over CExtEdit control. With this solution, original control is reduced. So no border draws after scrollbars, and mouse moving over scrollbars doesn’t handle by CExtEdit.
May be this problems may be solved by drawing border from CSkinScrollWnd (Skin window - see test project), but it required implementation border-draw logic for each CExt* Prof-UIS control in CSkinScrollWnd, IMHO.
Any ideas for scinned scrollbars in CExtEdit?
|
|
Technical Support
|
Sep 29, 2006 - 2:02 AM
|
The skinned scrollbars in the standard control is in out TO-DO list and only the CSkinScrollWnd class can be helpful now.
|
|
Andrey Karavashkin
|
Oct 4, 2006 - 3:03 AM
|
You means that CSkinScrollWnd can be used for skining scrollbar in CExtEdit, isn’t it?
|
|
Massimo Germi
|
Sep 21, 2006 - 6:33 AM
|
What’s about printing framework in CExtReportGrid?
TX
|
|
Technical Support
|
Sep 22, 2006 - 11:54 AM
|
We are working on this feature to make it available later this year.
|
|
Eric Houvenaghel
|
Nov 24, 2006 - 12:20 PM
|
Can you give me an update on this feature? When do you expect to have it available? Thank you.
|
|
Technical Support
|
Nov 27, 2006 - 1:33 PM
|
We had to delay the release of this feature due to implementing some features relating to compatibility with Windows Vista. Most probably we will add this feature in the minor release which goes after 2.62.
|
|
delu qiu
|
Sep 20, 2006 - 3:06 PM
|
Hi,
I disabled the system button on the titlebar of my frame window. but the window minimized when doubleclick its titlebar. How can I disable the doubleclick event?
Thanks. This is my code: class CMainFrame : public CExtNCW < CMDIFrameWnd > { .. }
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( ! CExtNCW < CMDIFrameWnd > :: PreCreateWindow( cs ) ) return FALSE;
cs.lpszClass = AfxRegisterWndClass(0); if(cs.hMenu!=NULL) { ::DestroyMenu(cs.hMenu); // delete menu if loaded cs.hMenu = NULL; // no menu for this window
} cs.style &= ~WS_MAXIMIZEBOX ;// this makes it not have maximize button cs.style &= ~WS_SYSMENU ;// this makes it not have maximize button
cs.style &= ~WS_THICKFRAME;// this makes it not resizeable
return CFrameWnd::PreCreateWindow(cs); }
|
|
Technical Support
|
Sep 21, 2006 - 6:02 AM
|
If you want to prevent the caption double click event on the current version of the skinable frame window, then you should override the WindowProc() method and handle the WM_NCLBUTTONDBLCLK standard Windows message. Your method should not invoke the parent class method for this message.
|
|
Christophe Guibert
|
Sep 20, 2006 - 2:28 PM
|
Hello, Sorry to bother you again, but this may interest you anyway.
When I submitted the font problem with Office2007 themes (other themes work well), I also had a systematic problem with some dialogs derived from the CExtResizableDialog : the paint manager asserted before the OnInitDialog() method was called.
I was investigating why some dialogs would fail while others would work well, with no clues : some dialogs were extremely simple but would fail anyway. This problem appeared only with the new Office2007 themes (Luna Blue and others). It appeared in prof-UIS 2.54 and 2.60 as well. In debug mode, there was an assertion, in release mode, the dialog was not displayed and the application ran normally except the dialog display.
I have inserted the patch for the CExtLabel you suggested, recompiled the prof-UIS library, linked it statically with my application, and the CExtResizableDialog problem has disappeared ! All dialogs work well now and I can use your nice Luna Bleu theme.
This behavior reminds me of a bounds-check problem, if I can suggest.
Best Regards,
Christophe Guibert
|
|
Christophe Guibert
|
Sep 21, 2006 - 3:11 AM
|
Hello, Following previous message, I executed the same build on another machine (Windows 2000), and it fails again to display some simple dialogs while others are correctly treated : assertion failed in the DoModal_implementation of CExtResizableDialog in debug mode (** not in the paint manager : that’s to be corrected in the previous message, sorry **), nothing displayed in release mode.
This remain specific of new Office2007 paint manager classes : works well with others.
So I temporarily revert to VisualStudio2005 paint manager, hoping you’ll find something in the Luna Blue paint manager, because it is really nice.
Best Regards,
Christophe Guibert
|
|
Technical Support
|
Sep 21, 2006 - 6:22 AM
|
Could you create a simple dialog-based project and port your dialog resource and source code to reproduce the problem with 2007 themes and send this project to us?
|
|
Christophe Guibert
|
Sep 21, 2006 - 3:58 PM
|
Hello,
The situation gets more and more complex : I’ve created a simple dialog based project and port both resource and code from a dialog which would not work, and it works in the sample project... So it won’t help you.
I tried additional diagnosis...
My application initially displays a progress status window showing a multiline text that is repeatedly updated as initialisation is done. This is a working dialog with a CExtLabel object. The application will fail later on other dialogs. If the initial dialog is not shown the application will fail differently, and much later.
So keeping the initial progress dialog, I’ve done additional tests, using the CExtPaintManagerOffice2003 paint manager : 1. Removed the patch you proposed on CExtLabel::WindowProc() [adding lpszText[ wParam - 1 ] = _T(’\0’);] and rebuilt the Prof-UIS library (ProfUIS260sud.lib) 1.1 Compiled / linked statically the application with Unicode support, debug mode. 1.2 --> The application now fails on standard dialogs while getting CString text (GetWindowText()) from standard CStatic objects with un-terminated strings !
2. Patched again the CExtLabel::WindowProc() as you proposed and rebuilt the Prof-UIS library (ProfUIS260sud.lib). 2.1 Compiled / linked statically the application with Unicode support, debug mode. 2.2 --> The application runs properly in every aspects.
3. Kept the patch and revert to CExtPaintManagerOffice2007_R2_LunaBlue paint manager 3.1 Compiled / linked statically the application with Unicode support, debug mode. 3.2 --> The application runs properly in every aspects on my WindowsXP machine, and fails on some dialogs (always the same) on the Windows2000 machine.
4. Reverted to Prof-UIS 2.54 (so, without the CExtLabel::WindowProc() patch), kept the CExtPaintManagerOffice2007_R2_LunaBlue paint manager 4.1 Rebuilt my application (static Unicode Debug) 4.2 --> It seems to work properly, including the dialogs that would fail with prof-UIS 2.60 in the same conditions.
I do not understand, it seems to me that something is broken or overwriten in memory when using the prof-UIS 2.60, but I have no clues.
I will stay with prof-UIS 2.54 release and CExtPaintManagerOffice2007_R2_LunaBlue paint manager, and further investigate.
Hope this will be of any help...
Best Regards,
Christophe Guibert
|
|
Technical Support
|
Sep 22, 2006 - 9:16 AM
|
Would you send us asserttion failure message boxes, call stacks, screenshots and any other debug information that can help us figure out what is wrong?
|