|
Subject |
Author |
Date |
|
|
Luis Alberto Pereira
|
Jan 1, 2010 - 8:00 AM
|
Hi all, I´m using CView class where I put a CExtControlBar. It is working ok when I compile the project um VS2005/Windows XP, but when I compile in VS2008/Windows Vista, the CExtConttrolBar do not work and do not apper in top of the view. One more detail is that I’m using VTK (www.vtk.org) standart for CView/MFC. Is there some difference in code for this two enviromment ? Thanks all, The code is: class CVTKViewAxial : public CView
{
public: // create from serialization only
CVTKViewAxial();
DECLARE_DYNCREATE(CVTKViewAxial)
class CNavigationBar : public CExtToolControlBar
{
public:
CNavigationBar()
{
}
~CNavigationBar()
{
}
public: //Controls
CExtComboBox m_cmbDistances;
CExtComboBox m_cmbPoints;
public: //methods
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if( message == WM_CONTEXTMENU )
return 0L;
if( message == WM_LBUTTONDOWN
|| message == WM_LBUTTONUP
|| message == WM_MBUTTONDOWN
|| message == WM_MBUTTONUP
|| message == WM_RBUTTONDOWN
|| message == WM_RBUTTONUP
)
{
HWND hWndThis = GetSafeHwnd();
ASSERT( hWndThis != NULL );
ASSERT( ::IsWindow( hWndThis ) );
HWND hWndParent = ::GetParent( hWndThis );
ASSERT( hWndParent != NULL );
ASSERT( ::IsWindow( hWndParent ) );
HWND hWndFocus = ::GetFocus();
if( hWndFocus == NULL
|| hWndFocus == hWndThis
|| ::IsChild( hWndThis, hWndFocus )
)
::SetFocus( hWndParent );
else if( ! ::IsChild( hWndParent, hWndFocus ) )
::SetFocus( hWndParent );
}
return CExtToolControlBar::WindowProc(message,wParam,lParam);
}
bool InitNavigationBar()
{
m_bPresubclassDialogMode = true;
LPCTSTR pn = AfxGetApp()->m_pszProfileName;
if( !m_cmbDistances.Create(
WS_CHILD | WS_VISIBLE | CBS_DROPDOWN, CRect( 0, 0, 150, 180 ), this, //&m_wndToolBarMain,
ID_TBAV_CMBDISTANCES)
|| !this->SetButtonCtrl(this->CommandToIndex(m_cmbDistances.GetDlgCtrlID()), &m_cmbDistances))
{
TRACE0("Failed to create help search combobox\n" );
return -1;
}
m_cmbDistances.SetItemHeight( -1, 16 );
m_cmbDistances.SetFont( &g_PaintManager->m_FontNormal );
g_CmdManager->CmdGetPtr(pn, m_cmbDistances.GetDlgCtrlID())->m_sMenuText = _T( "Measures" );
if( !m_cmbPoints.Create(
WS_CHILD | WS_VISIBLE | CBS_DROPDOWN, CRect( 0, 0, 150, 180 ), this, //&m_wndToolBarMain,
ID_TBAV_CMBPOINTS)
|| !this->SetButtonCtrl(this->CommandToIndex(m_cmbPoints.GetDlgCtrlID()), &m_cmbPoints))
{
TRACE0("Failed to create help search combobox\n" );
return -1;
}
m_cmbPoints.SetItemHeight( -1, 16 );
m_cmbPoints.SetFont( &g_PaintManager->m_FontNormal );
g_CmdManager->CmdGetPtr(pn, m_cmbPoints.GetDlgCtrlID())->m_sMenuText = _T( "Points" );
return true;
}
}; // class CNavigationBar
CNavigationBar m_wndToolbar; In the file cpp (code) I create the code: if ((CView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext))==-1)
return false;
this->m_renWin->AddRenderer(this->m_ren);
//this->m_renWin->SetParentId(this->m_hWnd);
this->m_renWin->SetParentId(this->GetSafeHwnd());
this->m_iren->SetRenderWindow(this->m_renWin);
m_wndToolbar.m_bPresubclassDialogMode = true;
if( !m_wndToolbar.Create(_T(""), this, AFX_IDW_DIALOGBAR, WS_CHILD|WS_VISIBLE
|CBRS_ALIGN_TOP|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC))
{
ASSERT( FALSE );
return -1;
}
if( !m_wndToolbar.LoadToolBar(IDR_TOOLBAR_AXIALVIEW) )
{
ASSERT( FALSE );
return -1;
}
if( !m_wndToolbar.InitNavigationBar() )
return -1;
RepositionBars( 0, 0xFFFF, nID );
return true;
}
|
|
|
Technical Support
|
Jan 3, 2010 - 8:53 AM
|
Please take at the end of the code snippet from your .cpp file. The following line is the most interesting:
RepositionBars( 0, 0xFFFF, nID );
The nID variable is the identifier of the window which should occupy the central space which is free of control bars occupying their paces near borders. If the nID variable is set to IDC_STATIC value, then the RepositionBars( 0, 0xFFFF, nID ); code will work well compiled with Visual Studio 2005 or earlier. It will position the central window correctly. But it will not work in Visual Studio 2008 or later. This is specific improvement introduced in Visual Studio 2008. That’s why Prof-UIS uses its own __EXT_MFC_IDC_STATIC value instead of MFC’s IDC_STATIC value.
|
|
|
Timo Stripf
|
Dec 28, 2009 - 7:11 AM
|
|
|
|
|
Technical Support
|
Jan 3, 2010 - 9:48 AM
|
The resizable control bars docked into one column store information about their height in pixels. They do not store any floating point values describing percent of column height occupied by each bar. The same about widths of resizable control bars docked into one row. If the column height is too small for the main frame in restored state, and you have two resizable bars occupying 25 percent and 75 percent of height in maximized state, then restoring main frame and maximizing them again can change 25/75 proportion to something closer to 50/50 proportion. This is design of current control bar positioning algorithm implemented in Prof-UIS. It’s not critical in the most of cases because applications with many bars are usually limiting the minimal size of main frame window via handling the standard WM_GETMINMAXINFO message.
|
|
|
Timo Stripf
|
Dec 28, 2009 - 4:58 PM
|
Thanks for your anwser, but the problem exist and i think other user have the same problem. This is a thread from the support forum has similiar results (50:50) after changes. I have create a small video to demonstrate the problem. The problem is, the state of bars is not saved every time. Sometimes works, sometimes not. You can see it in the video clip. I hope you can now reproduce the problem. Some others infos are. The sample app is 32bit directly loaded from the prof-uis page. I use a windows 7 64bit version and visual studio 2008 with prof-uis 2.88, but this info is not necessary, because it doesnt worked on the sample too. I known, the app is not unpacked in this movie but its the same, when it is. Thanks for your help http://www.youtube.com/watch?v=bfK6SB0t4wI#@lt;/p>
http://www.prof-uis.com/prof-uis/tech-support/support-forum/dont-restoring-control-bars-layout-when-switching-main-frame-state-66451.aspx#@lt;/p>
|
|
|
Technical Support
|
Dec 28, 2009 - 1:12 PM
|
We cannot reproduce this issue using the SDI_DynamicBars sample application and Prof-UIS 2.88. We suspect we should do some specific actions, some specific bar redocking sequence to reproduce it. Please provide us with additional information.
|
|
|
Timo Stripf
|
Dec 28, 2009 - 4:59 PM
|
Thanks for your anwser, but the problem exist and i think other user have the same problem. This is a thread from the support forum has similiar results (50:50) after changes. I have create a small video to demonstrate the problem. The problem is, the state of bars is not saved every time. Sometimes works, sometimes not. You can see it in the video clip. I hope you can now reproduce the problem. Some others infos are. The sample app is 32bit directly loaded from the prof-uis page. I use a windows 7 64bit version and visual studio 2008 with prof-uis 2.88, but this info is not necessary, because it doesnt worked on the sample too. I known, the app is not unpacked in this movie but its the same, when it is. Thanks for your help http://www.youtube.com/watch?v=bfK6SB0t4wI#@lt;/p> http://www.prof-uis.com/prof-uis/tech-support/support-forum/dont-restoring-control-bars-layout-when-switching-main-frame-state-66451.aspx#@lt;/p>
|
|
|
Timo Stripf
|
Dec 30, 2009 - 1:00 PM
|
No support? Why we pay for it :)
|
|
|
chen xinyu
|
Dec 19, 2009 - 11:43 PM
|
Hi: I want to show some news in my Ribbon Bar, just liking CEdit works is ok. How can I do that? Thank you!
|
|
|
Technical Support
|
Dec 22, 2009 - 5:21 AM
|
You should create your CExtBarTextFieldButton-derived class which implements the CExtBarTextFieldButton::RibbonILV_CalcSize() virtual method for computing custom size of text field and the CExtBarTextFieldButton::OnInplaceControlCreate() virtual method for creating the multi-line in-pace editor control (just invoke parent class method and add the ES_MULTILINE style to the created by default editor window). This method can return NULL if you want to make text field non-editable. You should also implement the CExtBarTextFieldButton::PaintCompound() virtual method for painting multi-line text in the text field because by default text fields are single line. Next step is to create your own ribbon node which instantiates the multiline text field button:
class __PROF_UIS_API CYourNewsRibbonNode : public CExtRibbonNode
{
public:
DECLARE_SERIAL( CYourNewsRibbonNode );
CYourNewsRibbonNode(
UINT nCmdIdBasic = 0L,
UINT nCmdIdEffective = 0L,
CExtRibbonNode * pParentNode = NULL,
DWORD dwFlags = 0L,
__EXT_MFC_SAFE_LPCTSTR strTextInToolbar = NULL,
__EXT_MFC_SAFE_LPCTSTR strTextInMenu = NULL,
__EXT_MFC_SAFE_LPCTSTR strTextUser = NULL,
LPARAM lParam = 0L,
CExtCmdIcon * pIconCustomized = NULL
#if (!defined __EXT_MFC_NO_BUILTIN_TEXTFIELD)
,
INT nTextFieldWidth = 100,
INT nDropDownWidth = -2, // (-1) - auto calc, (-2) - same as button area
INT nDropDownHeightMax = 250
#endif // (!defined __EXT_MFC_NO_BUILTIN_TEXTFIELD)
);
virtual ~CYourNewsRibbonNode();
virtual CRuntimeClass * _OnRibbonGetButtonRTC();
}
The _OnRibbonGetButtonRTC() method should simply return the RUNTIME_CLASS of your text field button. Now you can use the CYourNewsRibbonNode class in your ribbon command tree and it will instantiate the multiline text field.
|
|
|
Johannes Wisnewski
|
Dec 16, 2009 - 10:44 AM
|
Hallo, is it possible to define a background color for a whole row in CExtListCtrl, or for one column, or for the current selected row? How can I do it? Thank you for your answer.
|
|
|
Technical Support
|
Dec 18, 2009 - 11:12 AM
|
The CExtListCtrl control implements the extended version of the CListCtrl standard list view common control. It adds support for the themed scroll bars and provides the themed header control with additional features in the report mode (header item buttons, sorting). The CExtListCtrl control does not affect to the list view items displayed in its client area. This means, if you want to change look of list view items of the CExtListCtrl control, then you should implement the custom painting and work with the CExtListCtrl control like with the CListCtrl control. It’s not difficult and here is what you need:
http://www.codeproject.com/KB/list/lvcustomdraw.aspx?msg=261967 http://msdn.microsoft.com/en-us/library/ms364048(VS.80).aspx
|
|
|
Borremans Pierre
|
Dec 16, 2009 - 6:36 AM
|
How to align to the right the text in a CExtComboBox ?
|
|
|
Technical Support
|
Dec 16, 2009 - 10:37 AM
|
The editor window is the edit common control which is the single child of the combo box window. I.e. ::GetWindow( hWndComboBox, GW_CHILD ) code returns the HWND handle of the edit control and you can apply the ES_RIGHT style to it.
|
|
|
Technical Support
|
Dec 16, 2009 - 8:26 AM
|
You should use the owner draw combo box. Please override the CExtComboBoxBase::DrawItem() virtual method, copy the source code from the original method and modify the text painting code snippet.
|
|
|
Borremans Pierre
|
Dec 16, 2009 - 9:02 AM
|
ok but I want to align the text in the Cedit of the cextcombobox not the text in the menu.
|
|
|
Borremans Pierre
|
Dec 15, 2009 - 8:20 AM
|
In my dynamic window I use a CExtHyperLinkButton. After moving the CExtHyperLinkButton, a line is drawn instead of text. How to resolve my problem ? The size of my CExtHyperLinkButton doesn’t change only the position.
|
|
|
Technical Support
|
Dec 16, 2009 - 10:37 AM
|
Then please check the CExtHyperLinkButton window has the WS_CLIPSIBLINGS style. But the hyperlink buttons are rarely inserted into page navigator control. They are inserted into child dialogs and child dialogs are created inside page navigator. In any case, please reproduce the problem in the PageNavigator sample project and send it to us.
|
|
|
Borremans Pierre
|
Dec 17, 2009 - 3:24 AM
|
the CExtHyperLinkButton is in a child window which is contains by a page navigator. If I add the WS_CLIPSIBLINGS style to the CExtHyperLinkButton. I can’t reproduce my problem in your pagenavigator sample
|
|
|
Technical Support
|
Dec 17, 2009 - 11:48 AM
|
May be you can send us a stripped version of your real project containing UI code only?
|
|
|
Borremans Pierre
|
Dec 16, 2009 - 9:45 AM
|
My dynamic window is in a CExtPageNavigatorWnd and when I activate WS_CLIPSIBLINGS | WS_CLIPCHILDREN styles nothing is visible on my window. Any other solution ?
|
|
|
Technical Support
|
Dec 16, 2009 - 8:24 AM
|
Please check whether your dynamic window has the WS_CLIPSIBLINGS | WS_CLIPCHILDREN styles set on.
|
|
|
Ed Nafziger
|
Dec 14, 2009 - 7:04 PM
|
I have an MDI frame window with multiple dynamic bars docked on the sides.
I want to show/hide of all the dynamic bars with a single hot-key, and when made visible, they are all at their original size/position.
The problem is, hiding them one at a time, the remainder bars will automatically resize to fill the available space, so that when those remainder bars are hidden they are profiled at the wrong size/position.
I haven’t found a way to show/hide them all at the same time, so that all go back to their original size/position.
I haven’t found a container that allows multiple dynamic bars to be docked into it, so I can just show/hide the container. All the control bars I see in the help file say " designed for holding a single window". And I haven’t seen any samples with multiple dynamic bars inside another bar.
Is there a way to show/hide multiple dynamic bars, or is there a container capable of multiple dynamic bars, so I can show/hide them and retain all their original positions?
Thanks.
|
|
|
Technical Support
|
Dec 15, 2009 - 1:46 PM
|
The FullScreenState sample application implements approximately what you need. It supports two bar states: normal state and full screen state. All the bars are initially visible in the normal state and most of bars are initially hidden in the full screen state. In simple words, your application should save the bar state before hiding all the bars and restore bar state instead of remembering list of bars to show back.
|
|
|
Ed Nafziger
|
Dec 15, 2009 - 12:04 PM
|
I found what I was looking for in the MDI_DynamicBars sample, and finally got it working.
CMainFrame::OnPersistenceLoadFromFile_Resizable() CMainFrame::OnPersistenceSaveToFile_Resizable()
The problem was the bars were already profiled with the incorrect positions. I had to delete the registry entry: HKEY_CURRENT_USER/Software/[CompanyName]/[ProductName]
|
|
|
Johannes Wisnewski
|
Dec 14, 2009 - 8:02 AM
|
Hi, I try to get the Wizard class of my Application skinned. It does almost work, but my Wizard page has a Move Bar at the Top, and can be moved: Pic1: Not yet moved, but there should not be a Border around the Inner Dialog 
Pic 2: I even can move the inner Dialog 
Both Dialogs are declared as CExtNCW < CExtResizableDialog >. The Outer Dialog has a function which can add several pages to it, which are all derived from a Bass Class derived from CExtNCW < CExtResizableDialog >. Those Pages are then positioned with pPage->SetWindowPos(NULL, rect.left, rect.top, 0, 0,
SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE ); What are the right parameters to have the inner DIalog fixed and withour the border?
|
|
|
Technical Support
|
Dec 14, 2009 - 1:46 PM
|
The child dialog pages should use the CExtResizableDialog class type as is.
|
|
|
Technical Support
|
Dec 14, 2009 - 9:33 AM
|
Please check the following two things:
1) The CExtNCW template class is applied for popup windows floating on the desktop. This template class should not be applied to child windows like property sheet pages.
2) The dialog template resources of your wizard pages are marked as Child dialog type and Visible options.
|
|
|
Johannes Wisnewski
|
Dec 14, 2009 - 10:42 AM
|
1) Ok, what class do I have to use instead? 2) Yes they are..
|
|
|
Borremans Pierre
|
Dec 12, 2009 - 11:10 PM
|
In my application i everride the CExtPaintManagerOffice2003. How to have CExtProgressWnd with office 2007 style ?
|
|
|
Technical Support
|
Dec 14, 2009 - 9:29 AM
|
You should override the CExtPaintManager::PaintProgress() virtual method and copy the source code from the CExtPaintManagerOffice2007_Impl::PaintProgress() method. You will also need to add the following properties into your paint manager class:
CExtBitmapCache
m_bmpProgressMainH, m_bmpProgressMainV,
m_bmpProgressBorderH, m_bmpProgressBorderV;
CRect
m_rcProgressBarPartH,
m_rcProgressBarPartV,
m_rcProgressBackgroundPartH,
m_rcProgressBackgroundPartV,
m_rcProgressBarPaddingH,
m_rcProgressBarPaddingV,
m_rcProgressBackgroundPaddingH,
m_rcProgressBackgroundPaddingV,
m_rcProgressBorderPaddingH,
m_rcProgressBorderPaddingV;
The rectangles should be initialized in constructor: , m_rcProgressBarPartH( 0, 0, 92, 8 )
, m_rcProgressBarPartV( 0, 92, 8, 182 )
, m_rcProgressBackgroundPartH( 92, 0, 182, 8 )
, m_rcProgressBackgroundPartV( 0, 0, 8, 92 )
, m_rcProgressBarPaddingH( 1, 1, 10, 1 )
, m_rcProgressBarPaddingV( 1, 10, 1, 1 )
, m_rcProgressBackgroundPaddingH( 0, 0, 0, 0 )
, m_rcProgressBackgroundPaddingV( 0, 0, 0, 0 )
, m_rcProgressBorderPaddingH( 2, 2, 2, 2 )
, m_rcProgressBorderPaddingV( 2, 2, 2, 2 )
The bitmaps also can be initialized in constructor: VERIFY(
m_bmpProgressMainH.LoadBMP_Resource(
MAKEINTRESOURCE( IDB_EXT_2007_PROGRESS_MAIN )
)
);
VERIFY(
m_bmpProgressMainV.CreateRotated9xStack(
m_bmpProgressMainH,
270,
1,
m_bmpProgressMainH.GetSize().cx,
m_bmpProgressMainH.GetSize().cy,
true,
true
)
);
VERIFY(
m_bmpProgressBorderH.LoadBMP_Resource(
MAKEINTRESOURCE( IDB_EXT_2007_PROGRESS_BORDER )
)
);
VERIFY(
m_bmpProgressBorderV.CreateRotated9xStack(
m_bmpProgressBorderH,
270,
1,
m_bmpProgressBorderH.GetSize().cx,
m_bmpProgressBorderH.GetSize().cy,
true,
true
)
);
|
|
|
Borremans Pierre
|
Dec 14, 2009 - 6:41 AM
|
I found a solution : override the function PaintProgress and it works.
|
|
|
Damien Castelltort
|
Dec 10, 2009 - 7:53 AM
|
Hi, I recently updated from 2.83 to 2.87 and I noticed that the look of the buttons has changed (Studio 2005 Theme) as you can see bellow : http://img707.imageshack.us/i/profuis.png/ (2.83 above, no other changes in the application). After some investigation, I found a new boolean in CExtButton::_RenderImpl : _bTransparentBk (line 2203). But in the CExtPaintManager::PAINTPUSHBUTTONDATA structure declared line 2247, the last parameter is bTransparent like in the 2.83 version and not _bTransparentBk as I suppose it should be. I changed this boolean in the structure and now my buttons are ok, but I prefere to have your opinion about this ;) Thanks, Aurelien Loizeau
|
|
|
Technical Support
|
Dec 10, 2009 - 2:07 PM
|
We improved Visual Studio 2005 and Visual Studio 2008 themes for the next release version 2.88. If you have an active subscription, then you can drop us an e-mail and we will provide you with the source code update.
|
|
|
Borremans Pierre
|
Dec 9, 2009 - 12:57 AM
|
I use the CExtPaintManagerOffice2003 in my application. But I need to redraw the separator in all menu (mainframe menu, CExtPopupMenuWnd) which function I must override and how to redraw the separator ?
|
|
|
Technical Support
|
Dec 9, 2009 - 1:28 PM
|
|
|
|
|
Borremans Pierre
|
Dec 14, 2009 - 3:17 AM
|
ok thanks I find the solution with your information
|
|
|
Ed Nafziger
|
Dec 8, 2009 - 5:22 PM
|
I am trying to add menu item icons from bitmap resources.
I have the following code in a function being called from CMainFrame::OnCreate, but no images are displayed in the menu.
[code] CExtBitmap bmp; if( bmp.LoadBMP_Resource( MAKEINTRESOURCE( nBitmapID ) ) ) { bool result = g_CmdManager->CmdSetIcon( g_CmdManager->ProfileNameFromWnd( GetSafeHwnd() ), nCmd, bmp ); } [/code]
nCmd is the menu command ID nBitmapID is the bitmap resource ID
|
|
|
Ed Nafziger
|
Dec 11, 2009 - 7:38 PM
|
Thank you for your prompt reply. I had forgot my overload of OnDrawPopupMenuItem was set to not paint icons.
|
|
|
Technical Support
|
Dec 9, 2009 - 1:30 PM
|
First of all, please check the command identifier is correct. Second, if your project have some toolbar resource which contains an icon for the same command identifier, then the code snippet in your message should be invoked after the code which loads the toolbar resource. Third, if your project uses customizable toolbar and menus, then you should reset the toolbars and menus containing the command which you assigned the bitmap icon. Or you can simply remove the registry state data for your app.
|
|
|
Johannes Schwenk
|
Dec 8, 2009 - 12:24 PM
|
I have a Dialog with the following declaration: class CSelectCourier : public CExtNCW < CExtResizableDialog > This dialog is always Shown with the Current selected Skin of my Application (In my Case Office 2007). How can i get the same Skin for a CExtShellDialogFile class Dialog?
|
|
|
Technical Support
|
Dec 10, 2009 - 2:07 PM
|
This is hardly possible. Please run the ProfUIS_Controls sample application which does the same and contains several dialogs. Please check how the shell file dialog looks in it.
|
|
|
Technical Support
|
Dec 9, 2009 - 1:27 PM
|
The file dialog should be skinned using theme 2007 and it should look like your main dialog. The shell file dialog uses the same global paint manager. But the shell file dialog on your screen shot uses some old theme like Office XP. If both main and file dialog are invoked from the same Prof-UIS based app, then they must use the same theme. But if your main dialog is part of some exe and file dialog is invoked from some MFC regular DLL, then these windows are using different copies of Prof-UIS and may use different UI themes.
|
|
|
Johannes Wisnewski
|
Dec 10, 2009 - 7:29 AM
|
Ok, the Skinned Dialog is Declared in my App and is derived by CExtResizableDialog, the CExtFileDialog is Declared direct. I tried to show the dialog in one function: CExtShellDialogFile dlgFile(this, CExtShellDialogFile::__EFDT_SAVE);
dlgFile.DoModal();
CSelectCourier dlgTest(this);
dlgTest.Initialize(30, "Title");
dlgTest.DoModal(); CSelectCourier is Skinned, CExtShellDialog is not. What is the solution? Do i have to declare a CExtShellDialogFile derived class in my App and use this instead of CExtShellDialogFile?
|
|
|
Technical Support
|
Dec 8, 2009 - 12:53 PM
|
You should use the CExtShellDialogFile class as is. It’s fully themed by the currently installed paint manager. It’s already based on the CExtNCW template class if you are using any Visual Studio version but Visual Studio .NET 2002 (7.0). This is very specific issue. The Visual Studio .NET 2002 (7.0) is the worst C++ compiler ever released by Microsoft. The Visual C++ 6.0 release in 1998 (i.e. 4 years before 2002) is even much powerful C++ compiler. The Visual Studio .NET 2002 (7.0) has worst possible support of C++ templates. We simply was unable to compile the CExtNCW based version of the CExtShellDialogFile class with it. Probably we know why the next Visual Studio version was released very soon - only one year later. The Visual Studio .NET 2002 (7.0) is extremely rarely used now. If you are using any other Visual C++ version, then you should simply use the CExtShellDialogFile class as is.
|
|
|
Johannes Schwenk
|
Dec 9, 2009 - 3:02 AM
|
My Version is Visual Studio 2005. I`m using it as it is, but is is not skinned: My CExtNCW Dialog: 
And the CExtShellDialog File 
In my MainFrame there are the following functions:
void CMainFrame::OnViewLikeOffice2007_R1()
{
VERIFY(
g_PaintManager.InstallPaintManager( new CExtPaintManagerOffice2007_R1 )
);
RecalcLayout();
RedrawWindow(
NULL,
NULL,
RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE
| RDW_FRAME | RDW_ALLCHILDREN
);
CExtControlBar::stat_RedrawFloatingFrames( this );
CExtControlBar::stat_RecalcBarMetrics( this );
} void CMainFrame::OnUpdateViewLikeOffice2007_R1(CCmdUI* pCmdUI)
{
pCmdUI->Enable();
if (g_PaintManager->IsKindOf( RUNTIME_CLASS(CExtPaintManagerOffice2007_R1) ) ) {
pCmdUI->SetRadio(true);
}
else {
pCmdUI->SetRadio(false);
}
} What am I do wrong?
|
|
|
chen xinyu
|
Dec 8, 2009 - 12:00 AM
|
Hi, I am using Prof-UIS 2.82 on Windows 7. But when I run my application, the Windows 7 will automatically change to Windows 7 Basic theme. I am confused with that. I want to know does this problem relate with Prof-UIS? Thank you!
|
|
|
Technical Support
|
Dec 15, 2009 - 1:46 PM
|
Please try to comment the source code parts in your project and find a configuration when the desktop glass does not disappear.
|
|
|
Technical Support
|
Dec 8, 2009 - 12:14 PM
|
Please let us know whether the glass window area disappears in your application only or it disappears on all the windows on the desktop?
|
|
|
chen xinyu
|
Dec 14, 2009 - 10:01 PM
|
It disappears on all windows on the desktop.
|
|
|
Borremans Pierre
|
Dec 5, 2009 - 10:10 PM
|
Is it possible to add a control (a comboboc and a button) in the title of a CExtResizableDialog ? (the same thing like word 2007)
|
|
|
Technical Support
|
Dec 9, 2009 - 1:29 PM
|
This is possible for UI themes which support skinned window non-client areas. This is a trick and the CExtRibbonBar control does not support such mode. You will need to create the CExtRibbonBar-derived class and override the following virtual methods:
INT CExtRibbonPage::RibbonLayout_GetTabIntersectionHeight() const
INT CExtRibbonPage::RibbonLayout_GetTabLineHeight() const
INT CExtRibbonPage::RibbonLayout_GetBottomLineHeight() const
INT CExtRibbonPage::RibbonQuickAccessBar_GetBottomHeight() const
INT CExtRibbonPage::RibbonLayout_GetGroupHeight(
CExtRibbonButtonGroup * pGroupTBB
) const
INT CExtRibbonPage::RibbonLayout_GroupCaptionGetHeight(
const CExtRibbonButtonGroup * pGroupTBB
) const
All these methods should return zero value. If you are going to create ribbon in dialog, then your dialog should be based on the CExtNCW template class and it should invoke the CWnd::RepositionBars( 0, 0xFFFF, 0 ); both at the end of the OnInitDialog() virtual method and in the WM_SIZE message handler if the resizing event type is not SIZE_MINIMIZED. But even in this case the combo boxes of ribbon bar are not the combo box common controls. They are non- HWND UI elements. The CExtCustomizeSite class and based on it ribbon classes support the built-in text fields and combo fields inside toolbars, menus and ribbons. So, the combo boxes you can see in the RibbonBar and StyleEditor sample applications and not combo box windows - they are text/combo fields which can appear even inside popup menus and ribbon bar’s quick access toolbar embedded into window caption.
|
|
|
Borremans Pierre
|
Dec 10, 2009 - 2:57 AM
|
OK I will use the ribbon solution but my ribbonbar is for a CExtControlBar not for the mainframe window. How to add a ribbonbar on a CExtControlBar ? I search in your sample but I don’t find how to.
|
|
|
Technical Support
|
Dec 11, 2009 - 3:18 PM
|
The ribbon bar control should be created as a child of desktop window. It cannot be created inside the windows based on the WS_CHILD standard window style. It cannot be created inside control bar. Could you please provide us with any screen shots or URLs painting to any software with combo boxes inside window captions? We will try to find and/or code a ready-to-use solution for you.
|
|
|
Borremans Pierre
|
Dec 14, 2009 - 2:23 AM
|
I have no sample of any software with combo boxes inside window captions. We are searching for a solution for having in a dockable window a combo boxe. If we had this combo boxes in the window we loose a lot a place and the best solution is to had this combo boxes in the caption. If it’s not possible to add a ribbonbar in a CExtControlBaror or in a dockable CExtResizableDialog. I think that the only solution is to redraw the window’s caption, insert and draw the combobox. Have you another idea ? thanks for your help
|
|
|
Technical Support
|
Dec 14, 2009 - 9:29 AM
|
|
|
|
|
Technical Support
|
Dec 9, 2009 - 1:28 PM
|
The caption of the CExtControlBar window is part of its non-client area. It’s not possible to create any window inside non-client area of other window. The classic approach is to create some toolbar near the caption of resizable bar and insert combo box into it. You can find a lot of examples of such design in Visual Studio .NET / 2005 / 2008 / 2010, in the <span class="newgreen">ProfStudio</spa> and <span class="newgreen">GLViews</spa> sample applications provided with Prof-UIS.
|
|
|
Borremans Pierre
|
Dec 9, 2009 - 2:28 AM
|
If I use a CExtControlBar is it possible to add a combobox in the caption bar ?
|
|
|
Technical Support
|
Dec 7, 2009 - 4:38 AM
|
It’s not possible to insert controls into the window’s non-client area. The default window non-client area consist of the caption and borders. The caption contains the [_][O][X] buttons but they are custom painted elements - they are not a push button controls. The Office 2007 and Office 2010 applications use the ribbon bar control which uses the skinned caption containing quick access toolbar where buttons, text fields and combo boxes can appear. But this caption is not a window caption. The ribbon bar control removes caption and top window border and replaces them with caption like looking area which is really part of ribbon bar. The RibbonBar sample application provided with Prof-UIS does the same.
|
|
|
Borremans Pierre
|
Dec 8, 2009 - 6:05 AM
|
Is it possible to use the ribbon bar in a CExtResizableDialog with only the caption ? Do I must resize the ribbonbar ? Is it possible to insert combobox in the caption ribbonbar ?
|
|
|
Padraig Beirne
|
Dec 5, 2009 - 8:51 AM
|
Is there an equivalent of GetSel/SetSel for CExtGridWnd. I want to detect the space bar within the 1st 6 Char typed. Can I do this?
|
|
|
Technical Support
|
Dec 10, 2009 - 2:07 PM
|
The CExtGridCell::OnKey() virtual method is invoked for the focused grid cell only and when there is no in-place editor window activated. You can override the CExtGridCell::OnInplaceControlWindowProc() and/or CExtGridWnd::OnGridCellInplaceControlWindowProc() virtual methods to catch the WM_CHAR, WM_CUT, WM_PASTE and EM_REPLACESEL messages sent to the in-pace activated cell editor window. These messages perform the text changing in the edit control.
|
|
|
Padraig Beirne
|
Dec 10, 2009 - 12:23 PM
|
Thanks for your response to this query. Sorry I got dragged away for a few days.
I had investigated OnInplaceControlTextInputVerify and also OnInplaceControlTextInputComplete but the only way I could find a particular Char was to search sTextNew for it. Example: if sTextNew = "Unit4 York Ave" I want use the 1st space(between "Unit4" & "York") to seperate sTextNew into strSite="Unit4" & strRoad="York Ave". I can use OnInplaceControlTextInputComplete to search sTextNew on exiting the cell. If I were to use a function like
CExtGridCell::OnKey() I could chk for nChar=32 but this func doesn’t respond during InPlaceEdit. Or does it? I hope this will clarify.
|
|
|
Technical Support
|
Dec 5, 2009 - 1:26 PM
|
Please provide us with more details about your task. If you want to trace the in-place cell text editing, then you should override the CExtGridCell::OnInplaceControlTextInputVerify() virtual method in your grid cell class or the CExtGridWnd::OnGridCellInplaceControlTextInputVerify() virtual method in your grid control class.
|
|
|
Padraig Beirne
|
Dec 11, 2009 - 1:41 AM
|
|
|
|
|
shan vaz
|
Dec 4, 2009 - 9:16 AM
|
Hi, I am using profui CEXTSliderWnd in my application. I have added the control of type "CExtSliderWnd" in my form. I have created a sliderbar class inherited from CExtSliderWnd. i.e CSliderControl::CExtSliderWnd And I have used the following virtual method to set the slider bar position.
virtual
Due to some resason the above method setting the slider bar position to backward value than the new set value.I couldn’t able to find the problem/root cause for this.
Please let me know what could be the problem here. Is their is any other way that I can set slider bar position instaed of using this function.
Shan bool OnSliderDrawThumb(CDC &dc,const CRect &rcThumb,UINT uItemState
|
|
|
Technical Support
|
Dec 5, 2009 - 1:31 PM
|
The OnSliderDrawThumb() virtual method is invoked for painting the thumb button. It’s not a good idea to change the slider’s position when handling its painting events. Please describe us details about your task and we will help you.
|
|
|
shan vaz
|
Dec 4, 2009 - 9:08 AM
|
Hi , I have created the sliderbar class which is inherited from the CExtSliderWnd. I need to capture the left mouse click action of Slider bar to do some validation in my appliaction. Please let meknow how to capture left mouse click/down event. Shan
|
|
|
Technical Support
|
Dec 5, 2009 - 7:22 AM
|
You can create a CExtSliderWnd-derived class and handle the WM_RBUTTONDOWN message in it.
|
|
|
Borremans Pierre
|
Dec 3, 2009 - 3:24 AM
|
I use in my CTreeCtrl your CExtPopupMenuWnd. But when I use the parameters TPMX_DO_MESSAGE_LOOP in the trackpopupmenu, after doing a right click on a none selected item if i click on another item in my CTreeCtrl, the new item loose the focus. How to resolve my problem ?
|
|
|
Technical Support
|
Dec 7, 2009 - 4:39 AM
|
The CExtShellTreeCtrl::RefreshShellRoot() method allows you to specify any shell folder as root folder displayed in the CExtShellTreeCtrl control. It that what you need?
|
|
|
Technical Support
|
Dec 7, 2009 - 4:39 AM
|
The tree view common control is specific. It does not send the standard WM_CONTEXTMENU message in all the cases. You should handle both the right mouse button click and context menu key pressing to display the context menu over the tree view common control. But the CExtTreeCtrl control fixes this and you should simply handle the standard WM_CONTEXTMENU message in your CExtTreeCtrl-derived class.
|
|
|
Borremans Pierre
|
Dec 5, 2009 - 10:11 PM
|
The context menu is only invoke by using the mouse click on ctreectl’s items. If I use your ctreectl how to overdrive the context menu ? I try in your sample but without success ?
|
|
|
Borremans Pierre
|
Dec 6, 2009 - 12:01 AM
|
ok it works on your sample but is it possible to use your CExtShellTreeCtrl not to display file on computer but for showing a personnal explorer where we create all items ?
|
|
|
Technical Support
|
Dec 3, 2009 - 7:19 AM
|
If the menu is invoked by some mouse click, then it should appear without any menu item selected. If the menu is invoked using keyboard, then the first item from the top should be selected. This is the good style. We cannot confirm the TPMX_DO_MESSAGE_LOOP flag affects to the initial menu selection. The TPMX_SELECT_ANY flag is for that.
|
|
|
Seung Cheol Lee
|
Dec 2, 2009 - 7:26 PM
|
I found that the style of studio2008 was different between 2.85 and 2.87. Could you check the style problem. Ex.) g_PaintManager.InstallPaintManager ( RUNTIME_CLASS( CExtPaintManagerStudio2008 ) );
|
|
|
Technical Support
|
Dec 3, 2009 - 7:19 AM
|
We implemented several important changes in Office XP / 2003 and Studio 2005 / 2008 styles according to user requests. The Office 2003 style is blue when running on Vista / 7. All these styles now draw buttons with better recognizable colors. The combo boxes now used thin single pixel borders which allows to recognize them better. Please describe us in details what’s wrong with the improved themes?
|
|
|
Seung Cheol Lee
|
Dec 6, 2009 - 7:19 PM
|
The Prof-UIS 2.87 has different color tone at the viaul studio 2008 style. I sent the e-mail attached the document with captured image to you ( support@prof-uis.com ) Could you check the e-mail.
|
|
|
Technical Support
|
Dec 10, 2009 - 5:00 AM
|
Thank you for the screenshots. We emailed you a download link to the updated code.
|