Subject |
Author |
Date |
|
Brett Cook
|
Oct 23, 2006 - 2:59 PM
|
Dear Tech Support,
I am trying to get a CExtSplitterWnd to show up in a CExtResiableDialog. My setup looks like this:
CCreateContext ccx;
ccx.m_pCurrentFrame = (CMainFrame*)(AfxGetApp()->m_pMainWnd); ccx.m_pCurrentDoc = ccx.m_pCurrentFrame->GetActiveDocument(); ccx.m_pLastView = ccx.m_pCurrentFrame->GetActiveView();
m_wndSplitter.CreateStatic(this, 2, 1);
ccx.m_pNewViewClass = RUNTIME_CLASS(CObjectTypesView); m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CObjectTypesView), CSize(0,200), &ccx); ccx.m_pNewViewClass = RUNTIME_CLASS(CObjectListView); m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CObjectListView), CSize(0,0), &ccx);
Is this correct? When I run the application, the splitter does not show up.
Thanks, -Brett
|
|
Dominik Braendlin
|
Jan 5, 2010 - 8:23 AM
|
Dear Tech Support, I am referring to your “test_splitter_dlg” example from thread “CExtSplitterWnd in a CExtResizableDialog”. I would like to have two splitter windows. A right and a left. The left splitter would be a list ctrl and the right splitter would be a CExtResizableDialog. So far I failed creating the right splitter dialog window. Is it possible to use a dialog in a splitter window at all? If yes could you please give an example. Thanks Adrian
|
|
Technical Support
|
Jan 6, 2010 - 9:22 AM
|
|
|
Technical Support
|
Oct 24, 2006 - 7:07 AM
|
Here is a small project that demonstrates how to create a splitter window in a dialog. A CFrameWnd is created in the dialog as a container for the splitter window. Then two panes with CExtGridWnd objects are added to the splitter window.
|
|
Brett Cook
|
Oct 25, 2006 - 11:51 AM
|
Thank you. This example was very helpful in getting my splitter wnd working.
One last refinement I am trying to add is to have the splitter bar resize to a percentage of what the whole splitter window is being resized to.
Do you know of how to do this?
Thanks -Brett
|
|
Technical Support
|
Oct 26, 2006 - 5:38 AM
|
You can handle the WM_SIZE message and implement the resizing algorithm for the first splitter pane in this way: LRESULT CTest_splitter_dlgDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if( message == WM_SIZE )
{
if( m_wndSplitter.GetSafeHwnd() == NULL )
return CExtResizableDialog::WindowProc(message, wParam, lParam);
CRect rcWnd1;
m_wndSplitter.GetClientRect( &rcWnd1 );
INT cxCur = 0;
INT cxMin = 0;
m_wndSplitter.GetColumnInfo( 0, cxCur, cxMin );
LRESULT lRes = CExtResizableDialog::WindowProc(message, wParam, lParam);
CRect rcWnd2;
m_wndSplitter.GetClientRect( &rcWnd2 );
INT cxCurNew = cxCur + ( ( rcWnd2.Width() - rcWnd1.Width() ) / 2 );
if( cxCurNew < 0 )
cxCurNew = 0;
m_wndSplitter.SetColumnInfo( 0, cxCurNew, cxMin );
m_wndSplitter.RecalcLayout();
return lRes;
}
return CExtResizableDialog::WindowProc(message, wParam, lParam);
|
|
Brett Cook
|
Oct 26, 2006 - 2:59 PM
|
Thank you, this works great.
|
|
Gevork Odabashyan
|
Oct 23, 2006 - 5:26 AM
|
Hellow
I want my dynamic control bars not to appear in all menus in hide mode. To do this, I’v overriden CExtDynamicControlBar::BarStateSet and CExtDynamicControlBar::OnInsertDynamicBarCommandIntoPopupMenu methods of my dynamic control bar class, first for for default Prof-UIS context menu, and second for the pop-up menu with a list of all dynamic control bars of main menu. In floating state all works fine. But if we set two control bars to docking mode, place them in same floating container and then hide the floating container, we could see two problems. First, CExtDynamicControlBar::BarStateSet is not called in this case, so control bars menu items still remain in default Prof-UIS context menu. If we close test sample and then start it again, we can see the second problem - assert in extcontrolbar.cpp at line 4554. The sample dynamic_bar_sample4.rar was sent to support@prof-uis.com.
|
|
Technical Support
|
Oct 23, 2006 - 1:04 PM
|
We received your project and replied by e-mail.
|
|
Gevork Odabashyan
|
Oct 24, 2006 - 7:35 AM
|
I’ve got some problems with this e-mail. Could you send the reply again?
|
|
Technical Support
|
Oct 25, 2006 - 11:26 AM
|
Dear Gevork,
If you know the ftp details, please download the updated source code (Prof-UIS-262.zip) from our ftp site. If you don’t know the details, would you send us some other email address? It seems our replies just are just filtered off.
|
|
Gevork Odabashyan
|
Oct 26, 2006 - 11:32 PM
|
I’ve downloaded version 2.62. The bug described in my post of this topic from Oct 25, 2006 - 11:05 AM is still actual:
The menu problem has gone, but another one has appeared. To see it, please do the following in attached sample: 1) Create dynamic bar 1 2) Create dynamic bar 2 3) Change state both of them to docking 4) Place bars in same floating container 5) Hide floating container 6) Activate dynamic bar 1 (click "Create dynamic bar\Bar 1" again, bar will be activated if it’s already created ) The size of activated bar restores wrong. Attached sample was sent to support@prof-uis.com from new e-mail.
P.S. If we activate dynamic bar 2 after step 6), we’ll see assertion in extdockbar.cpp at line 4488.
|
|
Gevork Odabashyan
|
Oct 26, 2006 - 4:18 AM
|
I’ve lost ftp details. And I’ve changed e-mail in my profile. Please send ftp details to this address.
|
|
Technical Support
|
Oct 24, 2006 - 8:16 AM
|
We sent it to you again (using our gmail account this time).
|
|
Gevork Odabashyan
|
Oct 25, 2006 - 11:05 AM
|
The menu problem has gone, but another one has appeared. To see it, please do the following in attached sample: 1) Create dynamic bar 1 2) Create dynamic bar 2 3) Change state both of them to docking 4) Place bars in same floating container 5) Hide floating container 6) Activate dynamic bar 1 (click "Create dynamic bar\Bar 1" again, bar will be activated if it’s already created ) The size of activated bar restores wrong. Attached sample was sent to support@prof-uis.com from new e-mail.
|
|
Technical Support
|
Oct 27, 2006 - 6:55 AM
|
To fix this problem, which has to do only with dynamic control bars, please update the following method in the ExtControlBar.cpp file:
bool CExtDynamicBarNcAreaButtonClose::OnNcAreaClicked( CPoint point )
{
ASSERT_VALID( this );
if( ! m_rc.PtInRect( point ) )
return false; // continue asking nc-buttons
m_bHover = m_bPushed = false;
CExtControlBar * pExtBar = GetBar();
ASSERT_VALID( pExtBar );
CExtBarNcAreaButtonClose::OnNcAreaClicked( point );
if( pExtBar->NcButtons_HandleClick( this, point, pExtBar, NULL ) )
return true;
CExtDynamicControlBar * pBar = DYNAMIC_DOWNCAST( CExtDynamicControlBar, pExtBar );
if( pBar != NULL )
pBar->BarStateSet( pBar->BarStateGet(), false );
return true;
} Then please replace the line 4488 in the ExtDockBar.cpp file with the following: //ASSERT( nBarMetricRef >= nBarMinMetric );
if( nBarMetricRef < nBarMinMetric )
nBarMetricRef = nBarMinMetric; Finally, we have modified the CMainFrame::CreateMyDynamicBar() method in your project: void CMainFrame::CreateMyDynamicBar(LONG id)
{
CMyControlBarsContainer::iterator bar_it = m_myControlBars.find(id);
if (bar_it == m_myControlBars.end())
{
CExtCmdIcon icon = g_CmdManager->CmdGetIcon(__PROF_UIS_PROJECT_CMD_PROFILE_NAME, ID_FILE_NEW);
CString caption;
caption.Format(_T("Dynamic bar %d"), id);
CMyDynamicBar* bar = dynamic_cast<CMyDynamicBar*>(CExtDynamicBarSite::BarAlloc(caption, icon, 0, RUNTIME_CLASS(CMyDynamicBar), false));
ASSERT(bar);
m_myControlBars.insert(make_pair(id, bar));
bar->m_nMdiMenuResourceID = IDR_foss_dyn2TYPE;
bar->m_nMdiAccelTableResourceID = IDR_MAINFRAME;
UINT nCmdID = (UINT)bar->GetDlgCtrlID();
CExtCmdItem* pCmdItem = g_CmdManager->CmdGetPtr(__PROF_UIS_PROJECT_CMD_PROFILE_NAME, nCmdID);
ASSERT(pCmdItem != NULL);
pCmdItem->StateSetBasic();
CSize sizeDesiredDocked(100, 100);
CSize sizeDesiredFloating(170, 120);
bar->SetInitDesiredSizeHorizontal(sizeDesiredDocked);
bar->SetInitDesiredSizeVertical(sizeDesiredDocked);
bar->SetInitDesiredSizeFloating(sizeDesiredFloating);
bar->m_dealDlg.m_id = id;
bar->BarStateSet(CExtDynamicControlBar::__EDBS_FLOATING, true);
bar->OnRepositionSingleChild();
}
else
{
bar_it->second->BarStateSet(bar_it->second->BarStateGet(), true);
}
}
|
|
Gevork Odabashyan
|
Oct 27, 2006 - 8:41 AM
|
I’m sorry guys, but problem still exists. The method CExtDynamicBarNcAreaButtonClose::OnNcAreaClicked is not invoked at all when I do the steps described earlier. I sent the patched sample to you. By the way, is there a way to srt initial floating position to dynamic control bar? What method and when should I use for it in my method CMainFrame::CreateMyDynamicBar()?
|
|
Technical Support
|
Oct 30, 2006 - 10:48 AM
|
The CExtDynamicBarNcAreaButtonClose::OnNcAreaClicked() is really not invoked when you have multiple control bars inside one floating mini frame window. The "X"-button in the caption is an instance of CExtBarNcAreaButtonClose inside a CExtDynControlBar bar window which is a container for all other bars in the mini frame window. Prof-UIS 2.62 introduces a new simpler way to catch clicks on caption buttons without having to define button classes. The new CExtControlBar::NcButtons_HandleClick() virtual method allows you to get notifications and/or handle any caption button clicks. This method is invoked for all child bars in the floating mini frame window and allows you to determine which bar relates to the click. You can use the CExtControlBar::SetInitDesiredPosFloating() and CExtControlBar::SetInitDesiredSizeFloating() methods to set the desired location of the floating bar. These methods should be invoked before switching bars into the floating state.
|
|
Gevork Odabashyan
|
Oct 30, 2006 - 11:11 AM
|
I’m sorry again, but needn’t to catch clicks on caption buttons. All I need is correct work of dynamic control bars. You gave me three pieces of code I needed to patch. One of them was CExtDynamicBarNcAreaButtonClose::OnNcAreaClicked(). So imho this method must be used to solve the problem. I simply told you that this method is not invoked. And that the size of activating dynamic control bar restores wrong if this bar is in floating container with second bar. Please check again this steps:
The menu problem has gone, but another one has appeared. To see it, please do the following in attached sample: 1) Create dynamic bar 1 2) Create dynamic bar 2 3) Change state both of them to docking 4) Place bars in same floating container 5) Hide floating container 6) Activate dynamic bar 1 (click "Create dynamic bar\Bar 1" again, bar will be activated if it’s already created ) The size of activated bar still restores wrong.
|
|
Gevork Odabashyan
|
Nov 1, 2006 - 12:55 AM
|
I’ve downloaded your last update. It seems the state of dynamic control bars restores well. But I found one problem after this update. If we hide mini frame with several control bars in it by clicking on miniframe’s "X" button, the CExtDynamicControlBar::BarStateSet virtual funtion is not called. Please check this moment.
|
|
Technical Support
|
Nov 1, 2006 - 7:00 AM
|
The problem is caused by an unwanted condition check (pNcAreaButton->OnQueryVisibility() ) in the CExtDynamicControlBar::NcButtons_PostClick() method. You can fix this by updating the source code for this method in the ExtControlBar.cpp file: void CExtDynamicControlBar::NcButtons_PostClick(
CExtBarNcAreaButton * pNcAreaButton,
CPoint point,
CExtControlBar * pBarEventSource,
CExtControlBar * pBarActiveInContainer
)
{
ASSERT_VALID( this );
ASSERT_VALID( pNcAreaButton );
ASSERT_VALID( pBarEventSource );
#if (defined _DEBUG)
if( pBarActiveInContainer != NULL )
{
ASSERT_VALID( pBarActiveInContainer );
}
#endif // (defined _DEBUG)
if( /*
pNcAreaButton->OnQueryVisibility()
&& */
pNcAreaButton->IsKindOf( RUNTIME_CLASS(CExtBarNcAreaButtonClose) )
)
{
bool bIsVisible = false;
CExtDynamicControlBar::eDynamicBarState_t eDBS =
BarStateGet( &bIsVisible );
if( bIsVisible
&& ( eDBS == CExtDynamicControlBar::__EDBS_DOCKED
|| eDBS == CExtDynamicControlBar::__EDBS_FLOATING
)
)
BarStateSet( eDBS, false );
}
CExtControlBar::NcButtons_PostClick(
pNcAreaButton,
point,
pBarEventSource,
pBarActiveInContainer
);
}
|
|
Neville Franks
|
Oct 23, 2006 - 2:40 AM
|
I’ve just upgraded fron V2.54 to 2.61 and all Toolbar and Menu Images are missing.
I had some other problems as you’ve changed the signature for CExtCustomizeSite::OnColorItemGenerateIcon() and CExtPopupMenuWnd::MENUITEMDATA::MeasureItem(). A conflict was also caused because it appears hat you noew include MFC’s occimpl.h I don’t think these issues are related to the missing images.
I can’t find any documentation about these API changes.
It isn’t good that updating to a new version of PROF-UIS breaks existing applications.
|
|
Neville Franks
|
Oct 27, 2006 - 5:49 AM
|
|
|
Neville Franks
|
Oct 25, 2006 - 2:39 PM
|
This is the code I’m using. Both functions use the same RGB(255,0,255) color.
const COLORREF clrBmpTransparent = RGB(255,0,255); VERIFY( g_CmdManager->UpdateFromToolBar( pszUIRegKey, ID_VIEW_STANDARD_BAR, NULL, NULL, FALSE, TRUE, clrBmpTransparent ) );
if ( !m_wndToolBar.Create( NULL, this, ID_VIEW_STANDARD_BAR ) || !m_wndToolBar.LoadToolBar( ID_VIEW_STANDARD_BAR, clrBmpTransparent ) ) { AMLOG_PERROR( "Failed to create main Toolbar." ); return -1; // fail to create }
|
|
Technical Support
|
Oct 27, 2006 - 5:40 AM
|
We have checked all issues with the transparent color and found nothing wrong. Could you send us the bitmap used in you toolbar resources?
|
|
Neville Franks
|
Oct 23, 2006 - 6:43 PM
|
The problem with the missing images appears to be because I’m not using the default: clrBmpTransparent = RGB(192,192,192) color. My Toolbars use RGB(255,0,255). I have one Toolbar that does use the default RGB(192,192,192) and its images are displayed.
This seems like a bug to me and I’m very reluctant to change the background color of all of my toolbars as a work-around.
Neville, http://www.surfulater.com
|
|
Technical Support
|
Oct 25, 2006 - 10:48 AM
|
We cannot confirm that there is a problem with this in the library. The most common way of adding icons to the command manager is be means of CExtCmdManager::UpdateFromToolBar() or CExtToolControlBar::LoadToolBar() . Both methods allow you to specify the transparent color and RGB(192,192,192) is the default parameter value. If you are using the first method with default transparent color and then invoking the second method with a custom color, the second method will fail to add images to the command manager. Please check this.
|
|
Neville Franks
|
Oct 23, 2006 - 4:23 PM
|
I can’t see any errors in the Debugger in CExtCmdProfile::UpdateFromToolBar(). All functions return true and there are no ASSERT’s. My code uses VERIFY() on the calls to g_CmdManager->UpdateFromToolBar(). All Toolbars and Menu commands work, but no images are displayed anywhere, including in Prof-UIS Customize|Commands.
I don’t use any resource id’s in the range 29000...31000.
I call CExtPopupMenuWnd::MENUITEMDATA::MeasureItem() after using SetText() as follows: _md.SetText( sMenuText ); _md.MeasureItem( NULL );
Are you saying this isn’t necessary?
I upgraded from 2.50 to 2.61, not from 2.54. Sorry about that.
Thanks for your help, Neville
|
|
Technical Support
|
Oct 25, 2006 - 10:37 AM
|
The CExtPopupMenuWnd::MENUITEMDATA::MeasureItem() now has a pointer to a paint manager in its parameter because the paint manager can affect menu item’s appearance and multiple paint managers can be used in scope of one application. You may not invoke this method if you construc the menu on-the-fly. We answered the toolbar icon related issues in another message of this thread.
|
|
Technical Support
|
Oct 23, 2006 - 10:47 AM
|
Here is the declaration of the CExtCustomizeSite::OnColorItemGenerateIcon() method both in 2.54 and in 2.61: virtual void OnColorItemGenerateIcon(
CExtBarColorButton * pTBB,
CExtCustomizeCmdTreeNode * pNode,
COLORREF clr,
CExtCmdIcon & icon
); Please open the VersionHistory page and find OnColorItemGenerateIcon. You can see that it was changed in 2.53. This and some other method signatures were changed in 2.53 due to new Windows OS independent bitmap alpha-blending capabilities introduced in Prof-UIS 2.53. The CExtPopupMenuWnd::MENUITEMDATA::MeasureItem() method is internal and it is really rarely needed in customer applications. As for the missing images in toolbars and menus: please let us which of them are missing (all or some of them)? The command manager based image collection is the same as in the first version of Prof-UIS. Would you step in the CExtCmdManager::UpdateFromToolBar() method in the debug mode and let us know if the toolbar resource is loaded successfully in the CExtCmdProfile::UpdateFromToolBar() method. Please also check your resource.h file and ensure there are any identifiers defined in the range of 29000...31000.
|
|
Offer Har
|
Oct 22, 2006 - 3:49 PM
|
Dear Support, I am trying to put a CExtLabel derived control in a status-bar pane. I want the label to have a transparent background, because I’m using Office 2007 R2 skin. Even when setting the following styles: |WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_EX_TRANSPARENT there is no success in making the label transparent.
I tried running status-panes sample, and i see the same result.
Please explain how to make the label transparent.
Regards, Offer
|
|
Technical Support
|
Oct 23, 2006 - 9:43 AM
|
We would recommend you simply use the CStatusBar::SetPaneText() method. If you need some additional features like the text or background color, please let us know.
|
|
Offer Har
|
Oct 23, 2006 - 9:48 AM
|
This is exactly what i need - to set teh text color, font etc.
|
|
Technical Support
|
Oct 23, 2006 - 11:14 AM
|
Please override the OnEraseBackground() virtual method in a the CExtLabel -derived class in the following way: void OnEraseBackground(
CDC & dc,
const CRect & rcClient
)
{
ASSERT_VALID( this );
COLORREF clrBackground = GetBkColor();
bool bTransparent = false;
if( clrBackground == COLORREF(-1L) )
{
CExtStatusControlBar * pWndParent =
DYNAMIC_DOWNCAST( CExtStatusControlBar, GetParent() );
ASSERT( pWndParent != NULL );
CRect rcPaint;
pWndParent->GetWindowRect( &rcPaint );
ScreenToClient( &rcPaint );
CRect _rcClient( rcClient );
ClientToScreen( &_rcClient );
pWndParent->ScreenToClient( &_rcClient );
if( pWndParent->m_bCompleteRepaint )
{
dc.OffsetViewportOrg(
_rcClient.left,
0
);
bool bRet =
PmBridge_GetPM()->StatusBar_EraseBackground(
dc,
rcPaint,
pWndParent
);
dc.OffsetViewportOrg(
-_rcClient.left,
0
);
if( !bRet )
{
bool bTransparent = false;
if( PmBridge_GetPM()->GetCb2DbTransparentMode(pWndParent) )
{
if( PmBridge_GetPM()->PaintDockerBkgnd( true, dc, this ) )
bTransparent = true;
}
if( ! bTransparent )
dc.FillSolidRect(
&rcPaint,
PmBridge_GetPM()->GetColor( CExtPaintManager::CLR_3DFACE_OUT, pWndParent )
);
}
INT nIndex =
pWndParent->CommandToIndex( IDS_PANE_LABEL );
dc.OffsetViewportOrg(
_rcClient.left,
0
);
PmBridge_GetPM()->StatusBar_ErasePaneBackground(
dc,
nIndex,
rcPaint,
pWndParent
);
dc.OffsetViewportOrg(
-_rcClient.left,
0
);
bTransparent = true;
} // if( pWndParent->m_bCompleteRepaint )
}
if( ! bTransparent )
dc.FillSolidRect(
&rcClient,
(clrBackground != COLORREF(-1L))
? clrBackground
: PmBridge_GetPM()->GetColor( CExtPaintManager::CLR_3DFACE_OUT, this )
);
}
|
|
Offer Har
|
Oct 23, 2006 - 3:11 PM
|
Thanks, that solved the problem. Why is this required? Can’t the CExtLabel be transparent on any window?
|
|
Technical Support
|
Oct 24, 2006 - 12:18 PM
|
The CExtLabel control itself draws its background, which is needed for displaying a correct gradient background on dialogs for certain themes. The code we provided draws a solid background when the label is inside a status bar pane.
|
|
Offer Har
|
Oct 29, 2006 - 8:59 AM
|
Dear support,
When loading the black skin(CExtPaintManagerOffice2007_R2_Obsidian), the font color of the CExetLabel in the status bar is black, as opposed to the rest of my controls, or the other standard panes in the status bar.Why is this? how to change it?
Thanks. Offer
|
|
Technical Support
|
Oct 30, 2006 - 12:19 PM
|
We cannot confirm this. We added a pane with CExtLabel in the StatusPanes sample and the label text color is always when the Obsidian theme is used. You may have explicitly specified the label color. Please check this.
|
|
Offer Har
|
Oct 22, 2006 - 8:30 AM
|
Hi,
I need to disable the closing of a specific docking bar for a specific user’s operation. Please note that the bar could be tabbed with other bars, and then i need the tabbed dialog to not be able to be closed.
How do I achieve this behavior?
Thanks Offer
|
|
Technical Support
|
Oct 23, 2006 - 8:29 AM
|
We have an enhanced version of control bars that will be introduced in the next release. This version features exactly what you are looking for. Please contact us via email so we provide you with this update.
|
|
Offer Har
|
Oct 24, 2006 - 7:34 PM
|
Dear support,
I have wrote you by mail, i will also write it here, so that it won’t get lost.
The solution you provided does not solve the problem. My mail concern is that i don’t have a wait to prevent a bug from being closed, or to catch the event when a bar is being closed, and then prevent it.
You solution give me a way to catch the event of the ’X’ being clicked. This is not the only way to close a docking bar. I can close it from the docking bar menu, from the code, when sending WM_COMMAND, and when it is docked in a tabbed group, just to name few methods.
Please provide a method like WM_CLOSE that is fired just before the docking bar is about to be closed.
Best Regards,
Offer
|
|
Technical Support
|
Oct 25, 2006 - 11:29 AM
|
The menu commands cannot be not handled as "X" button clicks. This relates both to the context menu over tabs and to menu bar’s menus. You can handle the bar commands in the main frame window and only perform displaying of the bar(s).
|
|
Offer Har
|
Oct 25, 2006 - 11:43 AM
|
I agree, i need to manage the commands elsewhere. My only concern is the tabbed layout now, that does not fully work in the solution you provided me via mail.
Regards, Offer
|
|
Offer Har
|
Oct 23, 2006 - 9:49 AM
|
I have contacted you, and waiting for the patch... Thanks, Offer
|
|
Emil Pop
|
Oct 21, 2006 - 3:40 PM
|
Hi,
If I set any 2007-theme in the my MDI application and then I move the mouse relatively fast over the title bar of the main frame, the CPU gets 100% busy with my process.
Now, if I decide to move the main frame around the desktop by dragging it with the mouse, the button pressed event is lost seemingly due to the overloaded CPU: the window looks like frozen on the screen. With some patience (i.e., I keep the mouse still on the title bar), the CPU gets under 10% load and then I am able to move the main window.
Once the button pressed event intercepted, the window moves OK.
Is there any possibility of reducing the CPU consumption when the mouse hovers over the title bar?
Thanks,
Emil
PS.
Please note - this is happenning only on 2007 themes and only on the title bar (i.e., hovering the mouse over any toolbar/controlbar occupies the CPU up to 60%). - the CPU utilization on the mouse hovering over the title bar is visible even in the examples sent with Prof-UIS (e.g., ProfStudio-md.exe).
|
|
Emil Pop
|
Oct 24, 2006 - 8:53 AM
|
Hi,
I send this second message only because I don’t want to see this issue falling under your radar.
Thanks,
Emil
|
|
Technical Support
|
Oct 25, 2006 - 10:21 AM
|
We have fixed the performance problem you reported. Please download the latest stable source code from our ftp site. Or contact us via e-mail so we can provide you with the ftp account details.
|
|
Technical Support
|
Oct 24, 2006 - 12:20 PM
|
Thank you for your performance report. We are working on this problem right now. Please give us one more day.
|
|
delu qiu
|
Oct 20, 2006 - 2:42 PM
|
Hi, I am current using Prof-UIS v.2.53 and trying to update to 2.61. and I downloaded "Prof-UIS v.2.61 (21.39Mb) Full installation package " from the download page of ProfUIS but after Integration Wizard finish, I can not find anyone of 2.61 library on the disk. There is no "D:\Program Files\FOSS Software Inc\Prof-UIS\Bin_600\ProfUIS261nd.lib" in my folder, but the library file for version 2.53 still exists.
The following is the log of Integration Wizard.
/*******************************************************************/ REPORT FILE [10-20-2006, 16:32] /*******************************************************************/
Remove Prof-UIS Application Wizard from Visual Studio - Succeeded.
Library build for Visual Studio 98 (Win32 platform) Build "ProfUIS261nd - ANSI/Debug (ProfUISDLL - Win32 ANSI Debug)" - succeeded Output file: "D:\Program Files\FOSS Software Inc\Prof-UIS\Bin_600\ProfUIS261nd.lib" 0 errors, 0 warnings Report file: "D:\Program Files\FOSS Software Inc\Prof-UIS\Bin_600\ANSIDebug\ProfUISDLL\buildlog.htm"
Library build for Visual Studio 98 (Win32 platform) Build "ProfUIS261n - ANSI/Release (ProfUISDLL - Win32 ANSI Release)" - succeeded Output file: "D:\Program Files\FOSS Software Inc\Prof-UIS\Bin_600\ProfUIS261n.lib" 0 errors, 0 warnings Report file: "D:\Program Files\FOSS Software Inc\Prof-UIS\Bin_600\ANSIRelease\ProfUISDLL\buildlog.htm"
Library build for Visual Studio 98 (Win32 platform) Build "ProfUIS261md - MBCS/Debug (ProfUISDLL - Win32 MBCS Debug)" - succeeded Output file: "D:\Program Files\FOSS Software Inc\Prof-UIS\Bin_600\ProfUIS261md.lib" 0 errors, 0 warnings Report file: "D:\Program Files\FOSS Software Inc\Prof-UIS\Bin_600\MBCSDebug\ProfUISDLL\buildlog.htm"
|
|
Technical Support
|
Oct 22, 2006 - 11:18 AM
|
Please clean the contents of the Bin_600 folder and compile 2.61 again. We wonder what will appear in this folder? It is not possible to have two versions of Prof-UIS installed at the same time on one computer. The installer does not support this. The only way to have two Prof-UIS versions at the same time is to install two versions manually.
|
|
Eric Houvenaghel
|
Oct 20, 2006 - 2:22 PM
|
Hello
Basically, I want to use the GridCellSet function to destroy a cell. The function takes row and column number as parameters. I have the corresponding CExtReportGridItem and CExtReportGridColumn in the dataset. How do I obtain the corresponding row and column numbers for the cell at CExtReportGridItem and CExtReportGridColumn postion as viewed on the screen? Also, how do I recreate a cell at that spot and how do I destroy a cell that is hidden?
Thx
|
|
Technical Support
|
Oct 21, 2006 - 11:26 AM
|
We added ReportItemSetCell() methods to the CExtReportGridDataProvider and CExtReportGridWnd classes: //////////////////////////////////////////////////////////////
///// DECLARATION IN SCOPE OF THE CExtReportGridDataProvider CLASS
//////////////////////////////////////////////////////////////
virtual bool ReportItemSetCell(
const CExtReportGridColumn * pRGC,
const CExtReportGridItem * pRGI,
const CExtGridCell * pCellNewValue = NULL, // if NULL - empty existing cell values
bool bReplace = false, // false - assign to existing cell instances or column/row type created cells, true - create new cloned copies of pCellNewValue
CRuntimeClass * pInitRTC = NULL // runtime class for new cell instance (used if bReplace=false)
);
//////////////////////////////////////////////////////////////
///// IMPLEMENTATION
//////////////////////////////////////////////////////////////
bool CExtReportGridDataProvider::ReportItemSetCell(
const CExtReportGridColumn * pRGC,
const CExtReportGridItem * pRGI,
const CExtGridCell * pCellNewValue, // = NULL // if NULL - empty existing cell values
bool bReplace, // = false // false - assign to existing cell instances or column/row type created cells, true - create new cloned copies of pCellNewValue
CRuntimeClass * pInitRTC // = NULL // runtime class for new cell instance (used if bReplace=false)
)
{
ASSERT_VALID( this );
if( pRGC == NULL || pRGI == NULL )
return false;
ASSERT_VALID( pRGC );
ASSERT_VALID( pRGI );
bool bActive = pRGC->ColumnIsActive();
ULONG nColNo = 0;
if( bActive )
{
nColNo = ActiveIndexGet( pRGC );
if( nColNo == ULONG(-1L) )
return NULL;
ULONG nColCountInactive = InactiveColumnCountGet();
nColNo += nColCountInactive;
}
else
{
nColNo = InactiveIndexGet( pRGC );
if( nColNo == ULONG(-1L) )
return NULL;
}
ASSERT( pRGI->TreeNodeGetParent() != NULL );
ULONG nRowNo = pRGI->TreeNodeCalcOffset( false );
CExtGridDataProvider & _DP = _Tree_GetCacheDP();
ULONG nReservedColumnCount = 0, nReservedRowCount = 0;
_DP.CacheReservedCountsGet( &nReservedColumnCount, &nReservedRowCount );
nRowNo += nReservedRowCount;
nColNo += m_nTreeReservedColumns;
return
_DP.CellRangeSet(
nColNo,
nRowNo,
1L,
1L,
pCellNewValue,
bReplace,
pInitRTC,
false,
false
);
}
//////////////////////////////////////////////////////////////
///// DECLARATION IN SCOPE OF THE CExtReportGridWnd CLASS
//////////////////////////////////////////////////////////////
virtual bool ReportItemSetCell(
const CExtReportGridColumn * pRGC,
const CExtReportGridItem * pRGI,
const CExtGridCell * pCellNewValue = NULL, // if NULL - empty existing cell values
bool bReplace = false, // false - assign to existing cell instances or column/row type created cells, true - create new cloned copies of pCellNewValue
CRuntimeClass * pInitRTC = NULL // runtime class for new cell instance (used if bReplace=false)
);
bool ReportItemSetCell(
__EXT_MFC_SAFE_LPCTSTR strColumnName,
__EXT_MFC_SAFE_LPCTSTR strCategoryName,
const CExtReportGridItem * pRGI,
const CExtGridCell * pCellNewValue = NULL, // if NULL - empty existing cell values
bool bReplace = false, // false - assign to existing cell instances or column/row type created cells, true - create new cloned copies of pCellNewValue
CRuntimeClass * pInitRTC = NULL // runtime class for new cell instance (used if bReplace=false)
);
//////////////////////////////////////////////////////////////
///// IMPLEMENTATION
//////////////////////////////////////////////////////////////
bool CExtReportGridWnd::ReportItemSetCell(
const CExtReportGridColumn * pRGC,
const CExtReportGridItem * pRGI,
const CExtGridCell * pCellNewValue, // = NULL // if NULL - empty existing cell values
bool bReplace, // = false // false - assign to existing cell instances or column/row type created cells, true - create new cloned copies of pCellNewValue
CRuntimeClass * pInitRTC // = NULL // runtime class for new cell instance (used if bReplace=false)
)
{
ASSERT_VALID( this );
if( pRGC == NULL || pRGI == NULL )
return false;
ASSERT_VALID( pRGC );
ASSERT_VALID( pRGI );
CExtReportGridDataProvider & _DP = _GetReportData();
bool bRetVal =
_DP.ReportItemSetCell(
pRGC,
pRGI,
pCellNewValue,
bReplace,
pInitRTC
);
return bRetVal;
}
bool CExtReportGridWnd::ReportItemSetCell(
__EXT_MFC_SAFE_LPCTSTR strColumnName,
__EXT_MFC_SAFE_LPCTSTR strCategoryName,
const CExtReportGridItem * pRGI,
const CExtGridCell * pCellNewValue, // = NULL // if NULL - empty existing cell values
bool bReplace, // = false // false - assign to existing cell instances or column/row type created cells, true - create new cloned copies of pCellNewValue
CRuntimeClass * pInitRTC // = NULL // runtime class for new cell instance (used if bReplace=false)
)
{
ASSERT_VALID( this );
CExtReportGridColumn * pRGC = ReportColumnGet( strColumnName, strCategoryName );
bool bRetVal =
ReportItemSetCell(
pRGC,
pRGI,
pCellNewValue,
bReplace,
pInitRTC
);
return bRetVal;
}
|
|
Suhai Gyorgy
|
Oct 20, 2006 - 4:16 PM
|
I’d try calling CExtReportGridWnd::ReportItemGetCell first and then call calling CExtGridCell::OnHitTestInfoAdjust on the resulting cell. But CExtGridCell::OnHitTestInfoAdjust might be private function, I can’t check right now. If it is private... I don’t have any other idea now.
|
|
Offer Har
|
Oct 20, 2006 - 12:44 PM
|
Dear Support,
I read the release notes of version 2.61, and could not find the highly required feature of empty cells. Am I wrong to understand that this feature is not yet introduced in this version?
If it is implemented, what is the API to use?
Regards, Offer
|
|
Technical Support
|
Oct 20, 2006 - 1:07 PM
|
All the features that were initially scheduled for this minor release are completely implemented. We are now working on the feature you requested recently and will provide you with the updated code soon.
|
|
Courtney Smith
|
Oct 19, 2006 - 1:42 PM
|
Is there a way to resize a cextbutton once it has been created?
|
|
Suhai Gyorgy
|
Oct 20, 2006 - 3:54 AM
|
CExtButton is derived from CButton which in turn is derived from CWnd, so regular resizing should work: CRect rc;
int iNewWidth = 50, iNewHeight = 14;
m_button.GetWindowRect(&rc);
m_button.MoveWindow(rc.left, rc.top, iNewWidth, iNewHeight);
Invalidate();
UpdateWindow();
|
|
Gevork Odabashyan
|
Oct 19, 2006 - 7:39 AM
|
Hellow
I want dynamic control bar’s menu item not to appear in all context menus if this bar is in invisible state. In main menu this can be done by usage CExtDynamicControlBar::OnInsertDynamicBarCommandIntoPopupMenu method. But this doesn’t affects the default Prof-UIS context menu. Dynamic bar’s items are always visible in it. Is it real to you to apply CExtDynamicControlBar::OnInsertDynamicBarCommandIntoPopupMenu on this problem? Or what I’ve got to do?
|
|
Suhai Gyorgy
|
Oct 19, 2006 - 8:53 AM
|
You can read more about the customization of built-in context menus here: How to modify or suppress entirely built-in pop-up menus available in Prof-UIS?
I can imagine your handler method like this: LRESULT CMainFrame::OnConstructPopupMenuCB(WPARAM wParam, LPARAM lParam)
{
ASSERT_VALID( this );
CExtControlBar::POPUP_MENU_EVENT_DATA * p_pmed =
CExtControlBar::POPUP_MENU_EVENT_DATA::FromWParam( wParam );
ASSERT( p_pmed != NULL );
ASSERT_VALID( p_pmed->m_pPopupMenuWnd );
if( p_pmed->m_bPostNotification )
{
UINT uPos = p_pmed->m_pPopupMenuWnd->ItemFindPosForCmdID(ID_VIEW_YOUR_BAR);
if ( uPos >= 0 && !(_is_visible(ID_VIEW_YOUR_BAR)) )
VERIFY( p_pmed->m_pPopupMenuWnd->ItemRemove( uPos ));
while (p_pmed->m_pPopupMenuWnd->ItemGetCount() > 0 && p_pmed->m_pPopupMenuWnd->ItemGetCmdID(0) == CExtPopupMenuWnd::TYPE_SEPARATOR)
p_pmed->m_pPopupMenuWnd->ItemRemove(0);
}
return 0;
}
|
|
Gevork Odabashyan
|
Oct 20, 2006 - 3:45 AM
|
Thank you, Gyorgy! It works :)
As for m_bAppearInDockSiteControlBarPopupMenu flag - I don’t know how to use it. I need to set or drop it when dynamic control bar change it’s visibility. But I don’t know any virtual function that is called when the bar change it’s state/visibility.
|
|
Technical Support
|
Oct 19, 2006 - 8:48 AM
|
You can exclude any control bar (toolbar, menu bar, control bar, or panel bar) from the menu with the list of all control bars created in the frame window using this code: m_wndBar.m_bAppearInDockSiteControlBarPopupMenu = false;
|
|
Suhai Gyorgy
|
Oct 19, 2006 - 8:54 AM
|
|
|
Chun Pong Lau
|
Oct 18, 2006 - 8:36 PM
|
Dear support team,
In Office 2007 OBSIDIAN version, the close tab button (a cross), move tabs to left and right buttons (left and right arrows) are in black, which are of little contrast with the dark gray background. I would like to change them to white but I cannot find the corresponding bmps in the res2007 folder.
Can you help me about this? Thanks a lot.
Alan
|
|
Technical Support
|
Oct 19, 2006 - 8:31 AM
|
Thank you for the comment. Actually tab buttons when an Office 2007 theme is applied are not drawn using bitmaps. You can fix this issue by overriding the CExtPaintManager::PaintTabButton() virtual method in the way described below (make this changes directly to Prof-UIS). Add this declaration to the CExtPaintManagerOffice2007_R2_Obsidian class: #if (!defined __EXT_MFC_NO_TAB_CTRL)
virtual void PaintTabButton(
CDC & dc,
CRect & rcButton,
LONG nHitTest,
bool bTopLeft,
bool bHorz,
bool bEnabled,
bool bHover,
bool bPushed,
bool bGroupedMode,
CObject * pHelperSrc,
LPARAM lParam = 0L,
bool bFlat = false
);
#endif // #if (!defined __EXT_MFC_NO_TAB_CTRL) Here is the implementation: void CExtPaintManagerOffice2007_R2_Obsidian::PaintTabButton(
CDC & dc,
CRect & rcButton,
LONG nHitTest,
bool bTopLeft,
bool bHorz,
bool bEnabled,
bool bHover,
bool bPushed,
bool bGroupedMode,
CObject * pHelperSrc,
LPARAM lParam, // = 0L
bool bFlat // = false
)
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
COLORREF clrGlyph =
bEnabled
? RGB(255,255,255)
: RGB(140,142,140);
COLORREF clrTL =
GetColor(
bPushed
? COLOR_3DDKSHADOW
: COLOR_3DHILIGHT
,
pHelperSrc,
lParam
);
COLORREF clrBR =
GetColor(
bPushed
? COLOR_3DHILIGHT
: COLOR_3DDKSHADOW
,
pHelperSrc,
lParam
);
CExtPaintManager::stat_PaintTabButtonImpl(
dc,
rcButton,
nHitTest,
bTopLeft,
bHorz,
bEnabled,
bHover,
bPushed,
bGroupedMode,
clrGlyph,
clrTL,
clrBR,
bFlat
);
}
|
|
Eric Houvenaghel
|
Oct 18, 2006 - 1:18 PM
|
There are a few thing I would like to modify in the CExtReportGridWnd if possible. For the nodes that CONTAIN children: 1. What is the best way to change the width of the node? I would like to make the nodes the same size as the childless ones. 2. I would like to display, in the node itself, the number of children that the node has. 3. I would also like, in some situations, to change the colour of the node.
Thx for your help
|
|
Technical Support
|
Oct 21, 2006 - 11:52 AM
|
The width of group rows in the report grid window is always equal to summary widths of all the active report columns. This is true both when the columns are stretched automatically to fit the available width and when the columns are not stretched automatically and you can make the report grid’s contents enough wide to see the horizontal scroll bar visible. We think the width of the group rows is currently implemented correctly. So, please provide us with more details about how you would like to adjust it? The CExtReportGridWnd::OnReportGridPaintGroupRow() virtual method is invoked to paint the report group row completely. It invokes the CExtReportGridWnd::OnReportGridFormatGroupRowText() virtual method for getting the text displayed in the group row and the CExtReportGridWnd::OnTreeGridPaintExpandButton() virtual method to draw the expand button. You can override any of these methods. By overriding CExtReportGridWnd::OnReportGridFormatGroupRowText() , you can display the number of the child group rows or data rows. For example, you can get the number of child rows in this way: void CExtReportGridWnd::OnReportGridFormatGroupRowText(
const CExtReportGridItem * pRGI,
CExtSafeString & strRowText,
LONG nGroupIndex
) const
{
ASSERT_VALID( this );
ASSERT_VALID( pRGI );
ASSERT( nGroupIndex >= 0 );
nGroupIndex;
strRowText.Empty();
LONG nChildCount = ItemGetChildCount( (HTREEITEM)pRGI );
strRowText.Format( _T("CHILD COUNT = %d"), nChildCount );
} You can change the background of a group row by overriding the CExtReportGridWnd::OnReportGridPaintGroupRow() virtual method. Just copy the original method’s body and change the code that paints the background.
|
|
Eric Houvenaghel
|
Oct 24, 2006 - 2:08 PM
|
Thank you for the reply. Everything works good now excepty for the width problem. I think you’re thinking of the horizontal width. Let me restate the question:
What is the best way to change the vertical width of the node that contain children?
Thanks.
PS: This is the second time I’m posting this reply. I clicked on "post" the first time but my responce didn’t show up in the thread.
|
|
Technical Support
|
Oct 25, 2006 - 11:43 AM
|
The CExtReportGridWnd::OnReportGridQueryItemExtraSpace() method calculates additional heights in pixels above and below the group row. The default method implementation detects whether the report grid uses Outlook XP or Outlook 2003/2007 layout and computes corresponding extra spaces.
|
|
Eric Houvenaghel
|
Oct 25, 2006 - 1:16 PM
|
Thanks. That works great. I have another question. I would like to shift the childless nodes to the right when grouping. Just like the node that have children are shifted to the right.
|
|
Technical Support
|
Oct 26, 2006 - 12:14 PM
|
The indent for all rows is calculated in the CExtTreeGridWnd::OnGbwAdjustRects() virtual method. You can override it and specify your own row indent for grid cells in column 0. You can detect the row type using this code: HTREEITEM hti = ItemGetByVisibleRowIndex( nRowNo );
ASSERT( hti != NULL );
if( ItemGetChildCount( hti ) == 0 )
{
// this row is data row
}
|
|
Suhai Gyorgy
|
Oct 18, 2006 - 6:10 AM
|
Dear Support,
In your FormEditor sample, you have a method called GenCursorFromToolboxIcon. From that code I was trying to figure out how you make the resulted cursor, but I didn’t much succeed. Actually I’m trying to make a cursor from those icons as well, but rather the kind that VS 7.1 uses in its dialog editor. That cursor seems to be 24x24 and has a 10x10 cross over its hotspot and the specified icon in bottom right corner and nothing else. I’d like to achive this somehow. Could you please point me to the right direction or provide a code for that?
Thank you, Chris
|
|
Technical Support
|
Oct 20, 2006 - 1:24 PM
|
We recommend you use 32x32 cursors as it is done in the CFormEditorView::GenCursorFromToolboxIcon() method. This will let you avoid unwanted problems on old Windows OSes. The hotspot position and cross size are controlled by the following local variables in the method mentioned above: const POINT ptHotspot = { 12, 14 };
static const int nCrossMetric = 8; These local variables can be moved into method parameters. The generated 32x32 icon can be split into 4 areas (16x16 pixels each). The top-left, top-right and bottom left areas contain the cross and hot spot. The bottom-right area is completely dedicated to the 16x16 icon passed in the method’s parameter. As you can see the _iiDst.hbmColor and _iiDst.hbmMask bitmaps are created having the size 32x32. But the ::BitBlt() Win32 API is invoked twice in this method and puts the source icon into the bottom-left area only: ::BitBlt(
hIconDC_Dst, 16, 16, 16, 16,
hIconDC_Src, 0, 0, SRCCOPY
);
::BitBlt(
hMaskDC_Dst, 16, 16, 16, 16,
hMaskDC_Src, 0, 0, SRCCOPY
); If the icon handle specified in method’s parameter contains a 24x24 icon, then you may need to change the ptHotspot and nCrossMetric values and you should adjust the parameters of ::BitBlt() Win32 API invocations: ::BitBlt(
hIconDC_Dst, 8, 8, 24, 24,
hIconDC_Src, 0, 0, SRCCOPY
);
::BitBlt(
hMaskDC_Dst, 8, 8, 24, 24,
hMaskDC_Src, 0, 0, SRCCOPY
);
|
|
Suhai Gyorgy
|
Oct 20, 2006 - 3:09 PM
|
Thank you very much, but this much I did understand from the code. My biggest problems with the code are:
- Why changing hotspot position changes width of bottom horizontal and right vertical black lines drawn "behind" icon? When checking CExtCmdIcon::AssignFromHICON code I could see that it calculates size of icon’s "working area" from hotspot position (assuming that hotspot is in the very middle of icon, thus icon size is assumed to be (ptHotspot.x * 2, ptHotspot.y * 2) ) But this time this is not the case (calculated size is 24x28, original size is 16x16).
- Why I can’t see the cross? It is painted with white pen but there’s neither white, nor any kind of cross in the cursor. When I change position of cross, I can see that those pixels where the cross should be are invisible (deleting overlapping pixels of icon). Even if I use black pen to draw the line, black line is only drawn over icon pixels and still invisible any other places.
This might not make any sense if you don’t test the sample with the mentioned changes. In my case I would use 16x16 icon to make 32x32 cursor as you suggested. I guess your intention’s with the sample code were just the kind of cursor I’d like to achieve, but it’s somehow not working right. Could you please check?
|
|
Technical Support
|
Oct 22, 2006 - 10:52 AM
|
We coded a sample project for you. Here is its source and binary code zipped into two files:
test_create_cursor_BIN.zip test_create_cursor_SRC.zip The CTestDlg::stat_CreateTestCursor() method seems to be what you are looking for. We have not encountered any problems described in your message when coding this function.
|
|
Suhai Gyorgy
|
Oct 24, 2006 - 4:24 AM
|
The above sample project works great, thank you! And from that I found out what causes those problems I described: In FormEditor sample you use a global CExtCmdIcon object for this cursor. When the cursor is generated, it is assigned with AssignFromHICON method at the end of GenCursorFromToolboxIcon method. And when we want to use the cursor with SetCursor, the cursor is extracted from that global CExtCmdIcon object with ExtractHICON. Either AssignFromHICON, or ExtractHICON makes some changes to the icon which mess things up. Please, confirm.
I made my application work by eliminating CExtCmdIcon and using HCURSOR global variable instead. Thank you!
|
|
Technical Support
|
Oct 25, 2006 - 11:09 AM
|
We confirm that there may be a potential problem with icons extracted from CExtBitmap objects inside a CExtCmdIcon object. The CExtBitmap class can replace the icon functionality only if it has the 32-bit pixel format (with alpha channel). In the sample, we used an icon based on a color bitmap and a mask bitmap. So the sample may be the solution only if you have color/mask-based icons. We can modify the method that creates icons to provide support for alpha channel based icons and cursors but it will work only correctly only on Windows XP or later. Although the alpha blending supported by Prof-UIS on any Windows OS and Windows 2000 also has alpha blending capabilities, 32-bit bitmaps with alpha channels can be used for creating icons only on Windows XP or later.
|
|
Suhai Gyorgy
|
Oct 26, 2006 - 6:26 AM
|
Actually all I’d like to ask from you is to fix the FormEditor sample to have the correct cursor in it. Thank you.
|
|
Technical Support
|
Oct 27, 2006 - 6:48 AM
|
Although it is completely possible to change the type of cursor in the FormEditor sample, we would prefer to leave it intact so that this can work on OS version older than Windows XP. We could do the same in a sample application for you or improve the CExtBitmap class by adding a method that generates cursors from bitmaps of any pixel format. What do you think about this?
|
|
Suhai Gyorgy
|
Oct 27, 2006 - 7:13 AM
|
Sorry, I wasn’t clear. I understand that FormEditor has to work on any OS. I wasn’t even thinking of asking for fix like that. I was thinking more of a kind of correction that I did: eliminating use of CExtCmdIcon and using HICON instead. Right now FormEditor cursor doesn’t look like as you intended it to look like. If you could just check the code for your GenCursorFromToolboxIcon method, you see would see that you are not using CExtBitmap at all, still, if you run the application, you e.g. can’t see any cross in the cursor. It’s because of use of CExtCmdIcon and its AssignFromHICON method. Could you please check that?
|
|
Technical Support
|
Oct 30, 2006 - 10:34 AM
|
We modified the test project. Now it creates the cursor handle using a CExtBitmap object as an optional right bottom part of the cursor. The following method does what you need: static HCURSOR stat_CreateTestCursor(
INT nHotSpotX,
INT nHotSpotY,
INT nCursorWidth,
INT nCursorHeight,
CExtBitmap * pBmpToDrawAtRightBottom = NULL,
COLORREF clrTransparent = COLORREF(-1L),
INT nCrossMetric = 4,
INT nBoundsMetric = 0
); Please note that the pBmpToDrawAtRightBottom bitmap should have a format with 15 bits per pixel or greater. The clrTransparent parameter set to COLORREF(-1L) means then there are no transparent pixels. If the pBmpToDrawAtRightBottom bitmap has a format with 32 bits per pixel, then the pixels with alpha values less or equal to 127 are regarded as transparent.
|
|
Gevork Odabashyan
|
Oct 18, 2006 - 5:17 AM
|
Hellow
I have a CExtDynamicControlBar and a CExtResizableDialog in it. The dialog doesn’t receve WM_SHOWWINDOW when dynamic control bar is hiding. Is it normal and if it’s so, how can the dialog now that the control bar is hiding?
|
|
Technical Support
|
Oct 20, 2006 - 1:19 PM
|
The child of any control bar typically never becomes hidden. Its is always set to be visible even if its parent control bar window is hidden. That is the presence of the WS_VISIBLE standard window style of the child window does not depend on whether the WS_VISIBLE style is present in its parent control bar window. For a dynamic control bar you can detect if its state is changed easily by overriding the CExtDynamicControlBar::BarStateSet() virtual method.
|
|
Brett Cook
|
Oct 17, 2006 - 4:35 PM
|
Dear Support,
I have a standard SDI app with a frame, doc template, and view. When my app is initialized, the CView draws on the very top left of the main window, overlapping the menu bar and anything else in the top left. I am stumped as to why this is occuring. Any ideas would be greatly appreciated.
|
|
Technical Support
|
Oct 18, 2006 - 7:57 AM
|
Please make sure that you correctly specified the window that is the parent of your view. It should be the main frame window. If the problem persists, please send us a test project so we can quickly find out what’s wrong.
|
|
Brett Cook
|
Oct 23, 2006 - 12:27 PM
|
I was able to solve this problem by removing a second CView that I was creating. Now it works correctly, thank you.
|
|
Andrey Karavashkin
|
Oct 17, 2006 - 1:40 PM
|
CExtTreeGridWnd::ItemGetFirstChild "Returns a handle of the first item in the list of child items with the specified parent." (c) PROF-UIs 2.60 help
But lower level function checks m_pNodeParent variable != NULL before return first child. So Root Item’s childs will never returns.
CExtTreeGridCellNode * CExtTreeGridCellNode::TreeNodeGetFirstChild() { ASSERT_VALID( this ); if( m_pNodeParent == NULL ) return NULL; ASSERT_VALID( m_pNodeParent ); return /*m_pNodeParent->*/ TreeNodeGetChildAt( 0 ); }
as result this code HTREEITEM a_Item = ItemGetRoot(); a_Item = ItemGetFirstChildAt(a_Item); a_Item variable will ALWAYS == NULL, because no parent for Root item.
Workaround: ItemGetChildAt(ItemGetRoot(), 0) works as expected.
|
|
Technical Support
|
Oct 21, 2006 - 11:28 AM
|
Thank you for reporting the bug. It can be fixed by upding the following methods: CExtTreeGridCellNode * CExtTreeGridCellNode::TreeNodeGetFirstChild()
{
ASSERT_VALID( this );
return TreeNodeGetChildAt( 0 );
}
const CExtTreeGridCellNode * CExtTreeGridCellNode::TreeNodeGetFirstChild() const
{
ASSERT_VALID( this );
return TreeNodeGetChildAt( 0 );
}
CExtTreeGridCellNode * CExtTreeGridCellNode::TreeNodeGetLastChild()
{
ASSERT_VALID( this );
return TreeNodeGetChildAt( TreeNodeGetChildCount() - 1 );
}
const CExtTreeGridCellNode * CExtTreeGridCellNode::TreeNodeGetLastChild() const
{
ASSERT_VALID( this );
return TreeNodeGetChildAt( TreeNodeGetChildCount() - 1 );
}
|
|
Hans Peter Miedeck
|
Oct 17, 2006 - 1:59 AM
|
I have created a MDI project. From this project I create a dialog with the following properties: "STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU".
The dialog is a Childwindow from the MDI project.
My problems are:
If I minimise the dialog, I cannot increase it again. (this Problem is only if I use the “Office2007 Luna Blue Style” and if I create the Dialog with CExtNCW)
This dialog has a toolbar but I can not see the entries…
If I create the Dialog with the properties “STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU | WS_POPUP”, I can see the Toolbar Entries, but I can not move the Dialog anymore.
Thanks…
|
|
Technical Support
|
Oct 17, 2006 - 11:30 AM
|
You should not use the CExtNCW template class with child windows and MDI child frames. First, CExtNCW currently supports captions of popup frame and dialog windows only. Second, the CExtNCW template class is not compatible with MDI child frames because the standard Windows MDI interface cannot work with windows which implement the custom non-client area. The custom NC area requires the WS_BORDER|WS_CAPTION styles to be removed from the window to make Windows API unable to overdraw the non-client area. The Windows MDI interface does not work with MDI child frames that do not have the WS_BORDER|WS_CAPTION style. We plan to recode the MDI interface from scratch to solve this problem.
|
|
Nitesh Singh
|
Oct 17, 2006 - 1:07 AM
|
Dear Support,
Is there a method to limit the range of values in the cell? Suppose I want a range of 0 to 10. And now if current value shown is 10 then If I further push the UP button then the value shoud become 0 (not 11, I want the button to be enabled even if the value is 10). Similarily if current value is 0 then after pressing DOWN button the value should become 10.
I found one article "How to set a range for the CExtGridCellUpDown cell?" but I think it does not fullfil my criteria. Thank you.......
|
|
Technical Support
|
Oct 17, 2006 - 11:07 AM
|
You can do this by overriding the CExtGridCellUpDown class. When the user clicks on the up or down part of the spin button or presses the up and down arrow key, the OnValueIncrement or OnValueDecrement virtual methods are called. They are called for incrementing or decrementing the cell value, so you can override them and implement you whatever you want.
|
|
Nitesh Singh
|
Oct 18, 2006 - 3:01 AM
|
Thank you. That helped. But I wanted one more feature. Suppose the range is 1 to 10. Then if anyother value entered should not be taken. And the range can be changed too.
For that I am having two members m_nRangeUpper, m_nRangeLower and a function SetRange(int, int) in the derived class CMyGridCellUpDown: public CExtGridCellUpDown . In the constructor I am setting some values m_nRangeUpper = 1, m_nRangeLower = 100; And function....... HRESULT CMyGridCellUpDown::OnParseText( __EXT_MFC_SAFE_LPCTSTR sText) const { ASSERT_VALID( this ); ASSERT( sText != NULL ); HRESULT hr = CExtGridCellUpDown::OnParseText( sText ); if( hr != S_OK ) return hr; long lVal = _ttol( LPCTSTR(sText) ); if( lVal < m_nRangeLower || lVal > m_nRangeUpper ) return E_INVALIDARG; return S_OK; }
and when I am going to use this class CMyGridCellUpDown. And calling SetRange( 1,5); then it sets the pValue pointer passed in function Apply( pValue); But next time when I am changing the text.. then m_nUpperValue becomes 100 again for the same pointer. Seems like you are creating a new CMyGridCellUpDown and assigning the same pointer... This is not helping me....
Please suggest me something. I have to call SetRange() funtion as the range can vary from object to object. (u have done something in GridCellUpDownColorPart... but there the range is stricty between 0 to 255) thank you..
|
|
Technical Support
|
Oct 18, 2006 - 8:36 AM
|
It seems you are using the property grid. In this case, the following details may be helpful. Each CExtPropertyValue instance keeps two CExtGridCell objects: the active one and the initial one. The later is used for the reset operation. These objects never appear inside tree grids in the property grid control and are stored inside CExtPropertyValue only. Each tree grid window in the property grid control contains cloned copies of active grid cells in property values. That is why you faced different cell copies. When the editing is complete in some tree grid window, the property grid control assigns a new cell value to the active cell in the property value and to the all cells of this property value in other tree grid windows. In case of combined property stores, each property value is a reference to several simple property values and the result of editing is assigned to all the referenced property values. So, if you use your own grid cell class which contains its specific data members, then it is important to override the CExtGridCell::Assign() virtual method like as follows: void CYourCell::Assign( const CExtGridCell & other )
{
ASSERT_VALID( this );
CBaseCell::Assign( other );
CYourCell * pCell =
DYNAMIC_DOWNCAST(
CYourCell,
( const_cast < CExtGridCell * > ( &other ) )
);
if( pCell != NULL )
{
// assign all the specific data members
} // if( pCell != NULL )
else
{
// clear all the specific data members
} // else if( pCell != NULL )
}
|
|
Nitesh Singh
|
Oct 19, 2006 - 5:05 AM
|
|
|
Eric Houvenaghel
|
Oct 16, 2006 - 1:25 PM
|
Hello
Is there a way to clear a cell. Basically having a cell that contians no data (a blank cell). It’s easy to do when the grid is being populated. But if at some other time I wish to set the value to empty, I can’t do it if f the cell is CExtGridCellNumber or CExtGridCellDateTime. Any ideas?
Thx
|
|
Technical Support
|
Oct 17, 2006 - 10:43 AM
|
Unfortunately at the moment there is no convenient and ready-to-use solution for making any cell empty without destroying the cell. It seems we need to implement this feature. So we will add a cell style that indicates that the cell is empty. Please wait a bit.
|
|
Offer Har
|
Oct 16, 2006 - 7:17 PM
|
This is exatly what i need as well....
|