Subject |
Author |
Date |
|
Neville Franks
|
Jan 22, 2006 - 6:24 PM
|
The behaviour of CExtPopupMenuWnd::LoadMenu() has changed between V2.30 to 2.50 and this is causing me a problem as folows: The text I set for the PopUp Menu items in the .RC file is ignored and the text from the main menu is used instead. ie. Where I’m using the same command ID on both menus. I don’t want to create different ID’s etc. for the popup menu, just so I can get the correct text. Setting bNoRefToCmdMngr = true doesn’t fix this and disables most menu items. On a related issue, how do I enable an accelerator key on a Popup menu item. I’ve added the key to the Accelerator resource, but it doesn’t work. I also created a new ACCELERATORS resource for the Popup menu but that didn’t work either. If the menu item is in the main menu then the accelerator is displayed, but in this case it is only on the popup menu.
|
|
Technical Support
|
Jan 25, 2006 - 4:20 AM
|
The general behavior of the CExtPopupMenuWnd class method has not changed. The LoadMenu() method can additionally create popup menus without any reference to the command manager but this should be used only for the menus which work like standalone selectors for some set of items, i.e. popup menus which work like replacement for popup list boxes with a dynamic number of items. Both in case of Prof-UIS 2.30 and 2.50 we recommend to use two different command identifiers for two menu items if you want to see different text/icons in menus for them. It is not difficult to connect one command handler or updater method for both commands. The first is generated by the Visual Studio wizard and appears automatically in your code. The second will appear when you add the additional line to the message map manually. The newly created accelerator may not be visible only if you use customizable toolbars in menus in your application where the CExtCustomizeSite::Serialize() method restores the accelerator table at startup. You can reset the newly created accelerators in the Customize dialog or remove your app settings manually in the registry.
|
|
Sungsoo Yoon
|
Jan 22, 2006 - 7:37 AM
|
Dear Prof-UIS. I always receive your help. Thanks a lot. But I can’t see any word about CExtPaintManager in your help file. Could you tell me where to get that. In fact I would like to have g_paintmanager to paint the specified window area that is scrolled. I got the code that enable the print preview from Cformview. That code works well with Prof-UIS when the CFormview is small and don’t need to have any scrollbar. But It has some trouble if the CFormview is larger than screen and some parts are scrolled. Fortunately my application has the fixed size of formview and I decided to use the fixed size CRect in making bitmap instead of GetClientRect(). but g_paintmanager still use GetClientRect in the PaintDockerBkgnd(). So the scrolled area has black color. How can I overcome it? I am going to send the sample code to you by email. Thanks void CMyFormView::OnFilePrintPreview() { CRect rect(0,0,851,679); // this->GetClientRect( rect ); CDC memDC; CClientDC dc( this ); memDC.CreateCompatibleDC( &dc ); CBitmap bitmap; bitmap.CreateCompatibleBitmap( &dc, rect.Width(), rect.Height() ); { LocalGDI local( &memDC, &bitmap ); this->Print( &memDC, PRF_CLIENT|PRF_CHILDREN|PRF_ERASEBKGND ); } m_dib.Attach( GDIUtil::DDBToDIB( bitmap ) );
CExtWS< CExtAFV< CFormView > >::OnFilePrintPreview( ); } LRESULT CMyFormView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { LRESULT IResult = CExtWS< CExtAFV< CFormView > >::WindowProc(message, wParam, lParam); if (message == WM_INITDIALOG) OnInitialUpdate(); if( message == WM_PRINTCLIENT ) { ASSERT_VALID( this ); CDC* pDC = CDC::FromHandle((HDC)wParam); //the specified device context CRect rcClient(0,0,851,679); // GetClientRect( &rcClient ); CExtMemoryDC dc( pDC, &rcClient ); bool bTransparent = false; if( g_PaintManager->GetCb2DbTransparentMode( this ) ) { CExtPaintManager::stat_ExcludeChildAreas(dc.GetSafeHdc(), GetSafeHwnd(), CExtPaintManager::stat_DefExcludeChildAreaCallback); if( g_PaintManager->PaintDockerBkgnd( true, dc, this ) ) bTransparent = true; }// if( g_PaintManager->GetCb2DbTransparentMode( this ) ) if( ! bTransparent ) dc.FillSolidRect(&rcClient, g_PaintManager->GetColor(CExtPaintManager::CLR_3DFACE_OUT, this)); /////////////////////////////////////////////////// //////// DRAW YOUR RECTANGLES ON dc HERE //////// /////////////////////////////////////////////////// return 0; } // if( message == WM_PAINT ) return IResult; }
|
|
Technical Support
|
Jan 22, 2006 - 9:24 AM
|
Paint managers are conceived to be internal parts of Prof-UIS. Typically you don’t need to know anything about them but just one thing: how to install this or that paint manager. The CExtPaintManager::PaintDockerBkgnd() virtual method paints a themed background which is based on a solid color in 2000/XP themes, a gradient in 2003/2005 themes and PNG images with different kinds of drawing effects in the skinned version of the paint manager. This means you have to redraw the entire content of the scrollable form view window when it is scrolled horizontally and/or vertically. Would you provide us with a test project which shows painting problems in your form view?
|
|
Sungsoo Yoon
|
Jan 22, 2006 - 10:26 AM
|
Dear Prof-UIS Thanks for your quick answer. But I have already sent you my test project named "sample.zip". Couldn’t you see it? I am sending it again. This test project is your MDI sample code that I modified to explain my problem. You can compile and run it then see one docked formview and print preview menu on the menubar. Thanks
|
|
Technical Support
|
Jan 25, 2006 - 4:26 AM
|
We received your e-mail and sent you a modified project. It now has an improved version of the scrollable form view with a consistent background.
|
|
Luis Palacios
|
Jan 20, 2006 - 4:26 PM
|
The zip file containing registered version 2.52 is corrupted. please upload it again.
Thank You,
Luis Palacios
|
|
Technical Support
|
Jan 21, 2006 - 10:54 AM
|
We confirm that that zip file was corrupted and uploaded profuis252.zip again (the file size is 16,974,849 bytes). We are sorry for this inconvenience.
|
|
Stan Miasnikov
|
Jan 20, 2006 - 11:27 AM
|
Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p> I just purchased the library for the first time and downloaded version 2.51. I used UI libraries from the different vendor before, but it did not support some features that you have. The problem is that when I launched the build Wizard none of the libraries built in VS2005. So, when wizard finished, Iāve launched the VS and found out that all original include and library directories for C++ projects have been removed from the registry and only directories for the Prof-UIS were added. Obviously, the built failed because C++ compiler was unable to find any standard header files and libs. Now I have to restore my VS2005 configuration manually. This would take sometime before I can try to compile the libraries again. Is this a known issue? <o:p> </o:p> Anyway, being a new user, I find this first experience with this software quite disappointing! <o:p> </o:p> Stan <o:p> </o:p>
|
|
Technical Support
|
Jan 20, 2006 - 2:19 PM
|
This issue is known. This is reproduced in the way when you run the Prof-UIS 2.50 Integration Wizard without running Visual Studio 2005 at least once before. We even discussed this issue with a specialist from the Visual Studio 2005 development team. In fact, Visual Studio 2005 does not get completely installed until you run it at least once. The include folders list of the Visual Studio 2005 is stored in the VCComponents.dat file that is typically located in the following folder: C:\Documents and Settings\***WindowsUserName***\Local Settings\Application Data\Microsoft\VisualStudio\8.0\VCComponents.dat
The VCComponents.dat file is a UNICODE file which has the format of INI file. We can send you the initial version of this file.
We will fix this issue in the next major version.
|
|
Stan Miasnikov
|
Jan 20, 2006 - 12:47 PM
|
While I’ve tried to unsuccessfully compile version 2.51, you’ve released 2.52. :) But I am afraid to install it now because I don’t want to restore my VS config again... Was this issue fixed in the new release?
|
|
Technical Support
|
Jan 20, 2006 - 2:25 PM
|
2.51 and 2.52 are minor releases. They are distributed as ZIP files which should be extracted into the folder where the latest major release (2.50) are installed. You can also use the source code from minor releases on a clean machine. Each minor release does not bring any new bugs into the support tools of the last released major version. We would like to ask you to provide us with all the details of the building problems in conjunction with information about all the installed libraries/MS Platform SDKs on your machine. This will let us help you more efficiently and let you avoid the problems.
|
|
Nick Torkos
|
Jan 19, 2006 - 10:52 PM
|
I have 4 CExtControlBars and one CMainFrame, no ChildViews. How do I make the controlbars dock and take up the whole CMainFrame rather than parts of it? Essentially I want to have several rendering windows as in the OpenGL example, but without the background window (the main ChildView). NT
|
|
Technical Support
|
Jan 21, 2006 - 11:27 AM
|
There are two types of control bars: fixed sized control bars in the outer areas of the main frame window and resizable control bars docked in any possible complex layouts in the inner areas of the main frame window or auto-hidden. Both control bars can be floating. But it is not possible to cover the entire area of the main frame window with any kind of dockable window. The dockable windows are designed to be docked to the sides of the main frame window that is technically called the dock site. The main frame window actually works as the site, as the place or location, where the control bars of any kind can be docked to the frame borders. The real solution can be provided with dynamic resizable control bars demonstrated in the sample applications like SDI_DynamicBars or MDI_DynamicBars. The dynamic resizable bars can become an MDI child frame window in MDI applications which may even do not have any classic MFC child frame/view windows not depending on whether the doc/view architecture is used. The dynamic resizable bars are able to become tab pages in the Prof-UIS tab page container window that is used as the main view window of the SDI application. In other words, the dynamic resizable bars allow you to code the application in which all the windows are Prof-UIS control bars. You only need to choose at least one of them as the control bar, which is initially located in the tab page of the SDI application or as the MDI frame in the MDI application. Of course, the latter is optional and not a really necessary restriction. This design simply assumes you have only the resizable control bar windows in your application, most of them are docked at the main frame’s borders and one of them, typically it is the most important, is used to cover the rest central part of the main frame window.
|
|
Thomas Roeder
|
Jan 19, 2006 - 7:15 AM
|
Hi, I’ve tryed to compile Prof-UIS ver. 2.50 on 64-bit platform(Visual Studio 2005), and figured the source code seems not fixed for this. Do you have a library’s source code fixed for 64-bit? Thanks.
|
|
Technical Support
|
Jan 20, 2006 - 11:15 AM
|
The 64-bit Windows platform is supported starting from Prof-UIS 2.52. The download, which includes x64 projects, is available on our website.
|
|
Andrew Harding
|
Jan 18, 2006 - 9:20 AM
|
This is the second time I’m tyring to post this so sorry if there are duplicates, the message board seems to be experiencing some difficulty. How do I programmatically dock one window a specified direction relative to another docking bar. IE: When dragging a docking bar using the CExtPaintManagerStudio2005 you see 2 sets of targets appear, the inner one docks a window relative to the window you’re hovering over and the outer targets dock relative to the docking frame. I’ve figured out how to dock relative to the CFrameWnd but I’m not sure how to programmatically reproduce the effect generated by the inner target set. I would like to be able to detect how a CExtControlBar is docked whether it be relative to the frame or to another docking bar, and what direction it is docked IE: AFX_IDW_DOCKBAR_LEFT. I have tried docking windows and then querying them using the following functions to see if I could do this on my own but it appeared that the functions were either not working or I was misinterpreting them, only the IsDocked or IsFloating functions seemed to give me believable results. bool IsDocked() const; bool IsFloating() const; bool IsDockedAtTop() const; bool IsDockedAtBottom() const; bool IsDockedAtLeft() const; bool IsDockedAtRight() const; bool IsDockedHorizontally() const; bool IsDockedVertically() const; I need to be able to do this both with docking bars that are already docked and bars that are docked for the first time, if it makes a difference in how it’s done then I’ll also need to know how to detect which case I’m dealing with.
|
|
Technical Support
|
Jan 18, 2006 - 12:33 PM
|
The following method of the of the CExtControlBar class docks the resizable control bar relative to the sides of the main frame window:
virtual bool DockControlBarInnerOuter(
UINT nDockBarID,
bool bInner,
CFrameWnd * pDockSite = NULL, // can be NULL only if bar already was at least once docked
bool bRecalcLayout = true
); The newly docked bar will occupy the entire row/column at the side of the main frame window specified by the nDockBarID parameter which can be AFX_IDW_DOCKBAR_TOP , AFX_IDW_DOCKBAR_BOTTOM , AFX_IDW_DOCKBAR_LEFT , or AFX_IDW_DOCKBAR_RIGHT . The bInner flag indicates where the newly docked resizable control bar should appear relative to the already docked bars. The pDockSite parameter is a pointer to the main frame window. The following two methods of the of the CExtControlBar class dock the resizable control bar relative to an already docked bar: bool DockControlBarLTRB(
CExtControlBar * pBarTarget,
UINT nDockBarID = AFX_IDW_DOCKBAR_BOTTOM,
bool bRecalcLayout = true
);
virtual bool DockControlBarLTRB(
int nPercentToOccupy, // greater then zero and less than one hundred
CExtControlBar * pBarTarget,
UINT nDockBarID = AFX_IDW_DOCKBAR_BOTTOM,
bool bRecalcLayout = true
); The nDockBarID parameter specifies the side of the already docked bar to occupy by the bar being docked (values are the same as described above). The nPercentToOccupy value specifies the percent of space to occupy. The first method assumes 50%. You can also detect the exact location of any bar. This is based on analyzing the run-time classes of the windows in the chain of resizable bar’s parents up to the main frame window or floating mini frame window. There are two types of compound bar containers: tabbed groups (the CExtDynTabControlBar window with the CExtDockDynTabBar container for other bars inside) and linear groups (the CExtDynControlBar window with the CExtDockDynBar container for other bars inside) for organizing columns of bars inside rows of bars and vice versa. The main rule for re-dockable bars is: the parent of the CControlBar window is the CDockBar window. The main frame window contains an array of the CExtDockBar dock bars which are containers for all the Prof-UIS bars. Four outer CExtDockOuterBar dock bars are designed especially for toolbars and other fixed size bars. All the other inner dock bar circles with four CExtDockBar dock bars in each are created dynamically and used for resizable control bars only. The CExtDockBar contains a set of the CExtControlBar windows. Some of the CExtControlBar windows can be the CExtDynTabControlBar windows if they are tab groups or the CExtDynControlBar windows if they are linear containers. Both tabbed and linear container are used as a parent window for one inner dock bar window that is parent for nested CExtControlBar windows and so on. Each dock bar window has the m_arrBars array of child control bars. This array allows you to detect the order and location of each bar.
|
|
Andrew Harding
|
Jan 23, 2006 - 9:51 AM
|
Thank you. If I want to determine which direction a window is docked relative to it’s parent is there a function I can call or do I need to try to guess based on the windows extents? As I had mentioned I had tried playing around with the bool IsDockedAtTop() const; bool IsDockedAtBottom() const; bool IsDockedAtLeft() const; bool IsDockedAtRight() const; bool IsDockedHorizontally() const; bool IsDockedVertically() const; functions but they didn’t seem to work.
|
|
Technical Support
|
Jan 26, 2006 - 10:53 AM
|
The listed methods of the CExtControlBar class do not relate to what you are doing. The first four methods detect the side of the main frame window where the bar is located. The last two methods detect the type of the next linear container bar container which can be a column of bars or a row of bars. That is very close to your questions but the bars can be organized into a row of bars inside a column of bars and vice versa.
As we mentioned before, you need to get pointers to the bar’s parent windows and analyze their MFC’s run time type information. At present, this is the single way to find out exactly where the bar is. Unfortunately we have no ready to use API for this task. It is possible to code methods for detecting mutual positions of two bars relatively to each other. But the number of possible combinations can large enough and your app users will not need to think about the bar’s mutual locations and detailed description of the docked states.
|
|
Thomas Aust
|
Jan 18, 2006 - 8:05 AM
|
Hi,
i derived a class from CExtGridCellStringDM (used in a CExtTreeGridWnd) and implement the virtual method OnQueryCellFont like this:
class CHeaderCell : public CExtGCC<CExtGridCellStringDM><CEXTGRIDCELLSTRINGDM>
{
public:
DECLARE_DYNCREATE(CHeaderCell);
IMPLEMENT_ExtGridCell_Clone(CHeaderCell, CExtGridCellStringDM);
CHeaderCell(CExtGridDataProvider * pDP=NULL);
virtual HFONT OnQueryCellFont(const CExtGridWnd & wndGrid,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
DWORD dwAreaFlags) const
{
return (HFONT)g_PaintManager->m_FontBold;
}
};
but the function is never called. What’s wrong ? Thanks for your help, Thomas
|
|
Technical Support
|
Jan 18, 2006 - 9:15 AM
|
The declaration of OnQueryCellFont() looks like as follows: virtual HFONT OnQueryCellFont(
const CExtGridWnd & wndGrid,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
DWORD dwAreaFlags,
DWORD dwHelperPaintFlags = 0
) const; You missed the last parameter dwHelperPaintFlags .
|
|
Thomas Aust
|
Jan 18, 2006 - 3:43 AM
|
Hello Support, when i use your library in a project the msdev often crashes when i try to compile. I user Win200 SP4 with 512MB memory and Visual C++ SP6. Any Ideas... Thanks Thomas
|
|
Technical Support
|
Jan 18, 2006 - 6:28 AM
|
Do you have any extension of Visual C++ 6.0 IDE installed? We mean any extension which tracks source code editing, colorizes C++ code, modifies the class tree and etc.
|
|
Eli Kaczer
|
Jan 13, 2006 - 12:32 PM
|
I would like to display a custom control derived from CWnd in a grid cell, if possible. thanks, Eli
|
|
Technical Support
|
Jan 14, 2006 - 8:38 AM
|
Please note that the grid cells are not HWND -based. You can use your custom CWnd -based control as the inplace active edit control. If is created and displayed only when you are editing cells. Is this is what are you going to implement?
|
|
ki okju
|
Jan 12, 2006 - 8:28 PM
|
I can see in RDE compile option in VS.NET. What is RDE compile option? ex) ’ANSI Debug RDE’ configuration...
|
|
Technical Support
|
Jan 13, 2006 - 12:10 PM
|
RDE stands for Regular DLL Extension. There are two types of MFC DLL extensions: EXE extensions and Regular DLL Extension. You can use Prof-UIS both in your MFC based EXE projects and in Regular DLL projects. The most often created MFC based regular DLL projects are MFC ActiveX projects. Unfortunately, it is not possible to code one MFC extension DLL for using both in EXE and in regular DLL. That is why we have to support a set of RDE configurations. If you decide to use Prof-UIS in your project, then you need to simply include the Prof-UIS.h file into your StdAfx.h file. This should be done both in an EXE project and in a regular DLL project. So, just having included the Prof-UIS.h file, to completely integrate Prof-UIS with your EXE project. But in regular DLL you need to do two things more: 1) Define the __PROF_UIS_FOR_REGULAR_DLL preprocessor symbol in the settings of your regular DLL project. 2) Invoke the following code in the InitInstance() method of the CWinApp-derived class: CExt_ProfUIS_ModuleState::InitExtension(
AfxGetStaticModuleState()
); If your regular DLL uses the RDE configuration of the ProfAuto library, then you should also invoke: CExt_ProfAuto_ModuleState::InitExtension(
AfxGetStaticModuleState()
);
|
|
Mike Van Duzee
|
Jan 12, 2006 - 6:21 AM
|
I have a grid cell with the CExtGridCellComboBox inserted and enum mode set to true. If the grid cell is empty (no value has been selected) and I call TextSet() with an invalid string (one not added to the combo box) the text in that cell will be changed, even though it is not a valid choice. But if the grid cell already has a value selected and I call TextSet() with an invalid string the cell is reset to be empty.
It would be nice if TextSet() worked the same in both cases.
|
|
Technical Support
|
Jan 12, 2006 - 8:36 AM
|
Thank you for reporting this problem. Please add the lines marked with red to the CExtGridCellComboBox::TextSet() method and recompile the library: void CExtGridCellComboBox::TextSet(
__EXT_MFC_SAFE_LPCTSTR str, // = __EXT_MFC_SAFE_LPCTSTR(NULL) // empty text
bool bAllowChangeDataType // = false
)
{
ASSERT_VALID( this );
CExtGridCellString::TextSet( str, bAllowChangeDataType );
if( ! GetEnumMode() )
return;
LONG nNewCurSel =
FindStringExact( str );
if( nNewCurSel < 0 )
{
if( _tcscmp( str, _T("") ) != 0 )
SetCurSel( -1, true );
return;
}
LONG nOldCurSel =
GetCurSel();
if( nNewCurSel == nOldCurSel )
return;
SetCurSel( nNewCurSel );
} This will fix the issue.
|
|
Mike Van Duzee
|
Jan 12, 2006 - 5:47 AM
|
I am trying to create a custom grid control but have run into a small problem. I want my control to work like the CExtGridCellDateTime but instead of popping up the calendar control, I want a small dialog resource to be displayed. I have the dialog being displayed when the cell’s drop-down button is pressed, but I can’t seem to get it to go away when it should. With the CExtGridCellDateTime, it will go away when the mouse is clicked off of the control, but my dialog control requires me to click 2 or 3 times before it will go away.
I am using the CExtPopupControlMenuWnd to display my dialog from my custom control.
Do you have any idea what may cause this?
|
|
Technical Support
|
Jan 12, 2006 - 1:34 PM
|
Your task is really interesting. We have never tried to create a dialog window inside a popup menu and make it working like a color picker popup or like a list box popup. We guess there is something wrong with the message delivery when the compound popup is displayed. We need to debug your project to find out what’s wrong. Otherwise we will have to make an unreasonable number of guesses.
|
|
hesch hesch
|
Jan 12, 2006 - 4:44 AM
|
Hi,
I’m having problem with the CExtPropertyGridCtrl. I’m using the OnIdle function to refresh an OpenGL view. On a CExtControlBar i’ve a CExtPropertyGridCtrl. Each time i want to change a value on this grid, the program freeze.
Have you an idea about that ? Thanks in advance.
|
|
hesch hesch
|
Jan 12, 2006 - 4:51 AM
|
In fact, the application freeze each time an item in the CExtPropertyGridCtrl is activated. It’s really problematic, so if you have a quick answer, i will be very happy :).
Best regards.
|
|
Technical Support
|
Jan 12, 2006 - 8:06 AM
|
Thank you for the bug report. The problem is caused by the grid control in which we manually invoke the OnIdle method in some cases. Please open the ExtGridWnd.cpp file, find the following code (four occurrences) for( nIdleCounter = 0L;
::AfxGetThread()->OnIdle(nIdleCounter);
nIdleCounter ++
); and just comment it:
// for( nIdleCounter = 0L;
// ::AfxGetThread()->OnIdle(nIdleCounter);
// nIdleCounter ++
// ); This will fix the problem.
|
|
Olaf Reusch
|
Jan 11, 2006 - 12:35 PM
|
I have some toolbars with comboboxes, but the controls are disabled and not changable.
See here a picture http://web.hlsw.org/other/combobox.jpg
What is wrong?
if(!m_wndServerListBar.Create(_T( "Resizable bar name" ), this, IDR_SERVERLIST )|| !m_wndServerListBar.LoadToolBar(IDR_SERVERLIST) ) { TRACE0("Failed to create ServerListBar\n"); return -1; }
if( !m_ServerListComboBox.Create( WS_CHILD | WS_VISIBLE |CBS_HASSTRINGS | CBS_DROPDOWN, CRect( 0, 0, 400, 480 ), &m_wndServerListBar, ID_SERVERLIST_COMBO ) || !m_wndServerListBar.SetButtonCtrl( m_wndServerListBar.CommandToIndex( m_ServerListComboBox.GetDlgCtrlID() ), &m_ServerListComboBox ) ) { TRACE0("Failed to create help search combobox\n" ); return -1; }
m_wndServerListBar.EnableDocking(CBRS_ALIGN_ANY);
if( !CExtControlBar::FrameEnableDocking(this) ) { ASSERT( FALSE ); return -1; }
DockControlBar(&m_wndServerListBar);
RecalcLayout();
|
|
Technical Support
|
Jan 12, 2006 - 2:55 AM
|
The CExtToolControlBar window manages a set of its buttons using MFC’s command update mechanism. The enabled/disabled state of a command button (which looks and acts like an ordinary push button) in a toolbar, is updated absolutely like the enabled/disabled state of the toolbar button with a combo box window attached. So, if you create a combo box window in a toolbar and attach it to the button specified by the ID_SERVERLIST_COMBO command identifier, then the enabled/disabled state of this button is updated absolutely like if this button were an ordinary push button in the toolbar. This button is enabled if the command handler for ID_SERVERLIST_COMBO is available in the main frame window or the command updating handler is added and it enables the command by invoking the pCmdUI->Enable() code. So, simply add the command handler method for the ID_SERVERLIST_COMBO command and leave this method body empty.
|
|
Andrew Harding
|
Jan 11, 2006 - 9:20 AM
|
Say that I have 2 CExtControlBar’s which are docked on a CFrameWnd. I then drag one of the docked windows onto the other so that they both take up 100% of the CFrameWnd’s client area. The user can click a tab to bring that window to the foreground, essentially it has turned the windows into a tab pane. See diagram below: ----------------- | | | | | | | | | | |_a_|_b_|```` I would like to be able to do this programatically. With that in mind:
1. How do I make one CExtControlBar dock onto another one as seen above? 2. How do I determine the tab order? 3. How do I re-arrange the tab order? 4. How do I tell what docking state a window is in? ie: AFX_IDW_DOCKBAR_LEFT
|
|
Technical Support
|
Jan 12, 2006 - 1:08 PM
|
The CExtControlBar::DockControlBarIntoTabbedContainer() performs the tabbed bar docking. You should dock or float one bar initially and then tab-dock other bars with it. Here is the sample code: m_wndBarA.DockControlBarInnerOuter(
AFX_IDW_DOCKBAR_LEFT, true );
wndBarA.DockControlBarIntoTabbedContainer(
&wndBarB, -1, NULL, false );
wndBarA.DockControlBarIntoTabbedContainer(
&wndBarC, -1, NULL, false );
wndBarA.DockControlBarIntoTabbedContainer(
&wndBarD, -1, NULL, false ); This source code docks the m_wndBarA bar to the left inner part of the main frame window. Then the m_wndBarB , m_wndBarC and m_wndBarD bars are tab-docked into the m_wndBarA bar’s area. Here is the declaration of the CExtControlBar::DockControlBarIntoTabbedContainer() method: virtual bool DockControlBarIntoTabbedContainer(
CExtControlBar * pBar,
INT nIndex = -1, // append
CFrameWnd * pDockSite = NULL, // can be NULL only if bar already was at once docked
bool bRecalcLayout = true
); The nIndex parameter allows you to specify where the newly tab-docked bar should appear. The CExtControlBar::DockControlBarIntoTabbedContainer() method can be used both for initial docking and for re-docking with re-arranging the tab order. Detecting the tab-order is a bit more complex task. First of all you should include the following file: #include <../Src/ExtControlBarTabbedFeatures.h> This is essential because we will detect the type of bar’s parent window: CWnd * pWndParent = m_wndBarA.GetParent();
if( ! pWndParent->IsKindOf( RUNTIME_CLASS( CExtDockDynTabBar ) ) )
return; // bar A is not inside the tabbed bar container Now we can get a pointer to the tabbed control bar window which is also derived from the CExtControlBar class: CExtDynTabControlBar * pTabbedBar =
STATIC_DOWNCAST( CExtDynTabControlBar, pWndParent->GetParent() ); Now we can detect how much bars are inside the tabbed bar group, traverse them and detect whether each of them is visible (the tabbed bar group may contain invisible bars and tabs): LONG nBarIndex, nBarCount = pTabbedBar->GetSwitcherItemCount();
for( nBarIndex = 0; nBarIndex < nBarCount; nBarIndex ++ )
{
CExtControlBar * pBar = pTabbedBar->GetBarAt( nBarIndex, false );
BOOL bBarIsVisible = pBar->IsVisible();
} We can also get the selection and change it: LONG nSel = pTabbedBar->GetSwitcherSelection();
pTabbedBar->SetSwitcherSelection( new_selected_index, true, true );
|
|
Andrew Harding
|
Jan 12, 2006 - 2:06 PM
|
Thank you, I appreciate the extra effort you put into the response.
|
|
Gevork Odabashyan
|
Jan 11, 2006 - 9:06 AM
|
Hellow Tab in CExtResizablePropertySheet is not painted with gradient filling in Studio2005 user interface style. Can You correct this lack of correspondence? Thanks
|
|
Technical Support
|
Jan 12, 2006 - 12:30 PM
|
The CExtResizablePropertySheet window is 100% compatible with the Prof-UIS paint manager only in the wizard mode. In tabbed mode, it uses the standard tab control. Alternatively, you can use any Prof-UIS tab page container instead.
|
|
Gevork Odabashyan
|
Feb 28, 2006 - 10:19 AM
|
Can you show me example of using any Prof-UIS tab page container instead of standard tab control in CExtResizablePropertySheet?
|
|
Technical Support
|
Mar 1, 2006 - 6:46 AM
|
Here is a sample project that is shows how to use CExtTabPageContainerWnd instead of CExtResizablePropertySheet .
|
|
Gevork Odabashyan
|
Mar 2, 2006 - 11:26 AM
|
By the way, I detected another problem. I created test project with CExtResizablePropertySheet. Access violation appears during propery sheet creation. The test project named "pshtest1.rar" was sended to support@prof-uis.com from . To activate test propery sheet create new document view and make a doubleclick.
|
|
Gevork Odabashyan
|
Mar 2, 2006 - 11:09 AM
|
Thanks for quick anwer.
You sample is not correct. Try it in VS7.1 in "static MFC, ANSI" build configuration.
1. Some memory leaks have been detected. My dump was as follows:
Detected memory leaks! Dumping objects -> plex.cpp(32) : {85} normal block at 0x00D85218, 164 bytes long. Data: < 1 l2 > D8 31 D8 00 F6 03 00 00 08 00 00 00 6C 32 D8 00 plex.cpp(32) : {84} normal block at 0x00D831D8, 164 bytes long. Data: < 0 1 > F8 30 D8 00 EF 03 00 00 10 00 00 00 8C 31 D8 00 plex.cpp(32) : {83} normal block at 0x00D830F8, 164 bytes long. Data: < > 00 00 00 00 E8 03 00 00 0F 00 00 00 00 00 00 00 {82} normal block at 0x00D83078, 68 bytes long. Data: < > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 {81} normal block at 0x00D85110, 204 bytes long. Data: <Y Z [ > 59 00 10 01 A4 00 10 14 5A 00 10 01 5B 00 10 01 {68} normal block at 0x00D85008, 204 bytes long. Data: < :n $j > D4 D0 C8 00 3A 6E A5 00 0A 24 6A 00 80 80 80 00 c:\program files\foss software inc\prof-uis\src\extpaintmanager.cpp(98) : {51} client block at 0x00D82C88, subtype c0, 292 bytes long. a CExtPaintManager object at $00D82C88, 292 bytes long Object dump complete.
2. Try to add ShowSizeGrip( FALSE ) in CTestDlg::OnInitDialog(). The main dialog is still resizable.
|
|
Technical Support
|
Mar 3, 2006 - 8:48 AM
|
It is just a sample which shows how to use CExtTabPageContainerWnd and nothing more. It is not even available in the our major sample set. We tested it and found no memory leaks and errors when it is compiled in the MBCS Debug configuration. If any memory does happen in your application, we will help you out with this. As for ShowSizeGrip, this method is used to hide/show the resizing gripper. It does not modify the WS_THICKFRAME window style, which indicates whether the window is resizable. In case of dialogs, you need to set the Border property in the dialog editor to Dialog Frame.
In case of CExtResizablePropertySheet , the WS_THICKFRAME window style is turned on by default. To disable resizing, simply remove this style: ModifyStyle( WS_THICKFRAME, 0 );
ShowSizeGrip( FALSE );
|
|
Shoji Ueda
|
Jan 10, 2006 - 6:47 PM
|
Hi There,
I bought Prof-UIS on December and I spend considerable time on the sample codes. I have found that in that sample code, it tooks some time (not short) in the initialization part. Here is my question. How can I get more efficent initialization to get more speed?
Best regards, --- Shoji Ueda
|
|
Technical Support
|
Jan 11, 2006 - 9:14 AM
|
The startup speed of a Prof-UIS-based application depends both on its design and UI complexity. Small applications like SDI and MDI starts up fast. Large applications like ProfStudio are starting slow and display a splash screen to show actions being performed. In all cases with slow startup, the application is initializing a large number of controls or data. The SimpleGrids sample application initializes content of all the grid window. The GLViews sample applications initializes Open GL library and 3D scene data. Some samples use the Internet Explorer COM control (to display the help HTML page) which is big and complex . All the things together relates to the startup speed. In most cases it is possible to create the application that appears on the screen immediately. If you want to speed up your project, then we can discuss your UI design and provide you with advice.
|
|
Thomas Maurer
|
Jan 10, 2006 - 8:54 AM
|
Hello I have placed an ActiveX control within a CExtControlBar. The ActiveX control handles WM_KEYDOWN. Whenever I press an arrow key the control bar steals the focus somehow and the ActiveX control does not get the WM_KEYDOWN. Can I do something about that? Thanks in advance Thomas
|
|
Technical Support
|
Jan 10, 2006 - 11:29 AM
|
We pay careful attention to the details of inserting ActiveX windows into the CExtControlBar windows. The CExtControlBar class completely supports the WF_OLECTLCONTAINER flag in the CWnd::m_nFlags property which allows you to route OLE message pre-translation to be delivered to the particular ActiveX control not depending on how deep it is inside the control bar containers. The CExtControlBar::PreTranslateMessage() invokes the IOleInPlaceActiveObject::TranslateAccelerator() method of the child ActiveX control. So, you should not have any problems with the keyboard processing in ActiveX controls but, of course, only if the each particular ActiveX control is written correctly according to the specifications. We tries some ActiveX controls from our customers, which demonstrated buggy keyboard processing and even resizing, but all the problems were caused by ActiveX controls only. As an example, you can see Internet Explorer windows inside resizable control bars in our samples (ProfStudio, GLViews, and SimpleGrids). We need more information to provide you with a solution. We can test your ActiveX control if you send it to us.
|
|
Krustys Donuts
|
Jan 10, 2006 - 8:46 AM
|
I’ve searched on the forums, and the only method I could find is BackColorSet, passing in the constant CExtGridCell::__ECS_SELECTED. So if I call
pCell->BackColorSet( CExtGridCell::__ECS_SELECTED, RGB(0,0,0));
I would expect the highlight to be black (not that I’d every use this for real...). The reason I want to change the color is that the default dark blue makes black text hard to read. Ideally, I’d like to have the text color invert or something when selected.
So in summary, I guess I have a few questions: 1. Is BackColorSet the right way to change the selection color? 2. How can I change the foreground color when a cell is selected? I take it that I’ve have to handle the message for a selection, and then tell the cell to change its foreground color 3. The docs somewhere say that v2.42 and later use BackColorGet. My code was written before 2.42, and to change cell text color, I override OnQueryTextColor and OnPaintBackground. Was there an old-style way to change the selection color, just for comparison / testing purposes?
|
|
Krustys Donuts
|
Jan 10, 2006 - 9:01 AM
|
Some more info: I thought that maybe the overrides were messing things up, so I commented out that code, and tried to use TextColorSet and BackColorSet exclusively. No matter what combination of colors or cell states I use, nothing seems to work.
|
|
Krustys Donuts
|
Jan 10, 2006 - 9:18 AM
|
Ok, so it turns out that it didn’t work because my derived cell class inherited from CExtGridCellStringDM, instead of CExtGridCellString. Can you explain why the latter works? The only difference between the two *seems* to be the text string member in the former.
|
|
Krustys Donuts
|
Jan 10, 2006 - 9:31 AM
|
I’ve got it working to my liking right now, but the one catch with the TextColorSet method is that once you change it, it also changes the background color to the same color!
I couldn’t just do this and retain the default blue selection background:
pCell->TextColorSet( CExtGridCell::__ECS_SELECTED, RGB(255,255,255));
But instead, had to do this:
pCell->TextColorSet( CExtGridCell::__ECS_SELECTED, RGB(255,255,255));
pCell->BackColorSet( CExtGridCell::__ECS_SELECTED, RGB(32,0,255));
Could you please explain this behavior, as well as my other question in the previous post? Thank you!
|
|
Technical Support
|
Jan 11, 2006 - 2:52 AM
|
You need to use the CExtGridCell::__ECS_NORMAL constant.
|
|
Technical Support
|
Jan 10, 2006 - 11:35 AM
|
The CExtGridCell class does not hold text/background colors. It’s a kind of lightweight class used by other derived classes. We added the CExtGCC template that allows a CExtGridCell -derived class to hold these values. CExtGCC template is designed to decorate any CExtGridCell -derived class. It allows you to specify text and background colors.
We also added the CExtGridCellEx class which implements a cell which is usually used as a base class for other cell objects with custom text and background colors and a custom hover cursor. The CExtGridCellString class derived from CExtGridCellEx and CExtGridCellStringDM does not.
|