Subject |
Author |
Date |
|
Offer Har
|
Oct 16, 2006 - 10:44 AM
|
Hi,
I need to display a bitmap and not an icon on the button - I could not find any support for this in the class’s interface. How can this be done?
Thanks.
|
|
Technical Support
|
Oct 17, 2006 - 4:05 AM
|
You can use the CExtBitmap class to load a bitmap from a file or a resource and then generate an icon from it. Here are the steps to achieve this:
1) Load a bitmap using CExtBitmap::LoadBMP_File() or CExtBitmap::LoadBMP_Resource() ; 2) Make it 32-bit compatible using CExtBitmap::Make32() ; 3) Use CExtBitmap::AlphaColor() method to make all pixels of a particular color transparent; 4) Generate an HICON handle from this bitmap using CExtBitmap::CreateHICON() ; 5) To assign the icon to a button (the CExtButton class), use the CExtButton::SetIcon() method.
|
|
Offer Har
|
Oct 17, 2006 - 3:36 PM
|
Thanks,
That solved the problem.
Where can i find documentation of the AlphaColor function? what are the parameters?
|
|
Technical Support
|
Oct 18, 2006 - 7:19 AM
|
This method sets the alpha channel value for all pixels of the specified color. You can find the description of this method in the Prof-UIS 2.60 Help.
|
|
Offer Har
|
Oct 16, 2006 - 8:31 AM
|
Hi,
I need programmatically to set this cell type to be empty (no selected color) until the user selects a color. How can this be done?
Thanks.
|
|
Technical Support
|
Oct 16, 2006 - 11:15 AM
|
You can apply the __EGCS_EX_UNDEFINED_ROLE extended style for the cell. Then, when the user selects the color, just remove this style: // add
pCellColor->ModifyStyleEx( __EGCS_EX_UNDEFINED_ROLE, 0 );
// remove
pCellColor->ModifyStyleEx( 0, __EGCS_EX_UNDEFINED_ROLE );
|
|
Offer Har
|
Oct 16, 2006 - 7:17 PM
|
Hi,
It doesn’t work. I added this function:
void CXXXProperty::SetDontKnow() { CExtGridCellColor* pValue = (CExtGridCellColor*)ValueActiveGet(); pValue->ModifyStyleEx(__EGCS_EX_UNDEFINED_ROLE, 0); }
And nothing happened.
Please send a full function or a sample how to use this method.
Thanks.
|
|
Technical Support
|
Oct 17, 2006 - 10:40 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 17, 2006 - 10:44 AM
|
Please let me know what is your estimation on that one, because we need it ASAP. In general we need this for every cell type.
|
|
Technical Support
|
Oct 17, 2006 - 11:11 AM
|
Most probably we will implement this feature this week.
|
|
Offer Har
|
Oct 16, 2006 - 7:40 AM
|
Hi,
I need programmatically to display a cell of the type CExtGridCellUpDown empty. I tried setting it to empty by calling TextSet, with no success. How can this be achieved?
Thanks.
|
|
Technical Support
|
Oct 16, 2006 - 11:27 AM
|
The CExtGridCellUpDown cell is derived from CExtGridCellVariant , which allows you to set the type of the variant to VT_EMPTY : pCellUpDown->vt = VT_EMPTY;
|
|
Offer Har
|
Oct 16, 2006 - 8:42 PM
|
This really removes the string, but it also makes the cell read-only.... I just need the cell to be able to display no string.
|
|
Technical Support
|
Oct 17, 2006 - 10:42 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 - 6:36 AM
|
Hi,
I have a docked bar in a tab array. I need programmatically to make sure this bar is visible (to select its tab). I don’t know where the tab is docked or it it’s in a tabbed view.
How do i make sure the docked bar is visible?
Thanks.
|
|
Technical Support
|
Oct 16, 2006 - 11:42 AM
|
We can guess that you are asking about dynamic control bars. You can learn if a dynamic control bar is visible and of it is in the document mode using the CExtDynamicControlBar::BarStateGet() method, which returns both CExtDynamicControlBar::eDynamicBarState_t (bar’s location) and the visibility flag. If it is not visible, you can show it in its current state using the CExtDynamicControlBar::BarStateSet() method. If the bar is visible then we can have two cases. If the bar is not in the document mode ( the CExtDynamicControlBar::BarStateGet() method returnes a value not equal to __EDBS_DOCUMENT ), you should send the WM_COMMAND message to the main frame window and specify the bar’s dialog control identifier (pBar->GetDlgCtrlID() ) in WPARAM . If the bar is in the document mode, you should get a handle of the bar’s child window first by using the CExtDynamicControlBar::OnQueryChildHWND() method. Then activate the parent frame window of the bar’s child window in the MDI application and make the found frame window being the active MDI child frame window. You should find the tab item’s index in the tab page container window (main SDI view) and select this item. The CExtTabPageContainerWnd::GetSafeTabWindow() method will return a pointer to the CExtTabWnd window used inside the tab page container. Enumerated all the tab items in this tab window and compare the LPARAM data of each window with the HWND handle of resizable bar’s child window. Finally you should set selection to the found tab item.
|
|
Offer Har
|
Oct 16, 2006 - 8:49 PM
|
Hi,
All I need is for a specific bar, derived from CExtControlBar to be visible. It seems to me that there should be some command that will make sure the control bar is visible. I can show it if it is hidden with no problems, using ShowControlBar of CFrameWnd, but if the bar is docked in a bar with other control bars, and is not hidden, I want to be able to select its tab programmatically.
It seems to me that there should be a function of CExtControlBar called EnsureVisible, or MakeVisible that will handle this - please let me know what API function to use, as i could not find any.
I think that you answer was not answering my question.
Regards, Offer
|
|
Technical Support
|
Oct 17, 2006 - 10:59 AM
|
Thank you for clarifying the question. You can make a control bar visible (this also ensures it will be selected in a tabbed bar group) by sending the WM_COMMAND message to the main frame window. You should specify the control bar’s dialog control identifier in the WPARAM parameter of this message: CExtControlBar * pBar = . . .
CMainFrame * pMainFrame = . . .
pMainFrame->SendMessage( WM_COMMAND, WPARAM( pBar->GetDlgCtrlID() ) );
|
|
Offer Har
|
Oct 17, 2006 - 3:44 PM
|
This doe not work.
I will explain again:
I have a button that when pressed should bring a control bar to be displayed: (a) If the bar is not shown (closed) should show it - this is trivial with ShowControlBar (b) If the bar is docked with other bars in a tab style, it should be the selected tab, hence the bar is displayed.
Again, it seems to be a very trivial request to have. I can easily achieve (a), but have no solution for (b) - if the bar is tabbed, i don’t know how to bring it to front.
The answer you gave me is the same as (a) show/hide a tab, but i need it to be the selected tab if tabbed.
Thanks.
|
|
Technical Support
|
Oct 18, 2006 - 7:27 AM
|
To activate a control bar including when it is auto hidden, tabbed or docked, you need to send the WM_COMMAND message to the main frame window. Do not forget to specify control bar’s dialog control identifier in the WPARAM parameter. The same can be done using the following code: CExtControlBar::DoFrameBarCheckCmd(
pMainFrame,
nBarID,
false
); This static method activates the control bar specified with nBarID . Please note that if you use the auto-hide feature, you should implement the following versions of MFC’s OnBarCheck() and OnUpdateControlBarMenu() methods in the main frame window: BOOL CMainFrame::OnBarCheck(UINT nID)
{
return CExtControlBar::DoFrameBarCheckCmd( this, nID, false );
}
void CMainFrame::OnUpdateControlBarMenu( CCmdUI * pCmdUI )
{
CExtControlBar::DoFrameBarCheckUpdate( this, pCmdUI, false );
}
|
|
Offer Har
|
Oct 18, 2006 - 6:41 PM
|
|
|
Chun Pong Lau
|
Oct 16, 2006 - 12:17 AM
|
Dear support team,
When I upin a docked CExtDynamicControlBar, it will not hide until my mouse cursor leaves it. Can I make it hide immediately once I unpin it?
Thanks a lot, Alan
|
|
Technical Support
|
Oct 16, 2006 - 11:16 AM
|
You can control the speed of auto hiding using the following static properties of the CExtControlBar class: CExtControlBar::g_bDisableAutoHideAnimationExpanding
CExtControlBar::g_bDisableAutoHideAnimationCollapsing
CExtControlBar::g_nAutoHideAnimationStepCount
CExtControlBar::g_nAutoHideAnimationStepTime
|
|
Offer Har
|
Oct 15, 2006 - 9:49 PM
|
Hi,
I have a property grid, and I need to display the indeterminate mode for a cell. The cell also contains a combo with the corresponding text (show for checked, hide for un-checked) When in the indeterminate state, I would like no text to be displayed. I tried setting the text to "", but i found out that if the text is not one of the show/hide (the true/false) texts, the LabelTextSet is ignored.
Is there a way around this problem? is there a smarter way of having a 3 state check-box like the standard check-box
Regards,
Offer
|
|
Offer Har
|
Oct 15, 2006 - 9:50 PM
|
Mistake in my problem description - the funcion TextSet is ignored, NOT LabelTextSet
|
|
Technical Support
|
Oct 16, 2006 - 11:28 AM
|
You can use the CExtGridCellCheckBox cell and initialize it in the following way: CExtGridCellBool::g_strTextTrue = _T("Show");
CExtGridCellBool::g_strTextFalse = _T("Hide");
pCellCheckBox->SetAutoTextMode( true );
pCellCheckBox->Set3StateMode( true );
pCellCheckBox->SetCheck( 2 ); // indeterminate state
|
|
Offer Har
|
Oct 16, 2006 - 8:33 PM
|
Hi,
Thanks, the 3 state works, but now there is no label. Even if I set the static variables, they do not appear. Also, I need them to change from cell to cell, so global variables is not a good idea.
Thanks.
|
|
Technical Support
|
Oct 17, 2006 - 11:16 AM
|
You can do this by overriding CExtGridCellCheckBox in the following way: //Declaration:
class CYourGridCellCheckBox : public CExtGridCellCheckBox
{
public:
DECLARE_SERIAL( CYourGridCellCheckBox );
IMPLEMENT_ExtGridCell_Clone( CYourGridCellCheckBox, CExtGridCellCheckBox);
CYourGridCellCheckBox(
CExtGridDataProvider * pDataProvider = NULL
);
virtual void TextGet( CExtSafeString & strCopy ) const;
};
//Implementation:
IMPLEMENT_SERIAL( CYourGridCellCheckBox, CExtGridCellCheckBox, VERSIONABLE_SCHEMA|1 );
...
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
...
CYourGridCellCheckBox::CYourGridCellCheckBox(
CExtGridDataProvider * pDataProvider // = NULL
)
: CExtGridCellCheckBox( pDataProvider )
{
}
void CYourGridCellCheckBox::TextGet( CExtSafeString & strCopy ) const
{
ASSERT_VALID( this );
if( (GetStyleEx()&__EGCS_EX_UNDEFINED_ROLE) != 0 )
{
strCopy = _T("");
return;
}
strCopy.Empty();
if( GetAutoTextMode() )
{
strCopy = _T("");
INT nCheck = GetCheck();
switch( nCheck )
{
case 0:
strCopy = _T("Hide");
break;
case 1:
strCopy = _T("Show");
break;
case 2:
strCopy = _T("Indeterminate");
break;
} // switch( nCheck )
return;
} // if( GetAutoTextMode() )
CExtGridCellCheckBox::TextGet( strCopy );
} Here is how this class should be initialized: CYourGridCellCheckBox * pCellCheckBox0 =
STATIC_DOWNCAST(
CYourGridCellCheckBox,
m_wndGrid.GridCellGet(
nColNo,
0L,
0,
0,
RUNTIME_CLASS(CYourGridCellCheckBox)
)
);
pCellCheckBox0->SetAutoTextMode( true );
pCellCheckBox0->Set3StateMode( true );
pCellCheckBox0->SetCheck( 2 ); // indeterminate state
|
|
Chun Pong Lau
|
Oct 15, 2006 - 9:09 AM
|
Dear support team,
Your Tabbed Interface is very nice. In addition, can I add a button for adding some more tabbed documents (e.g. a button with a "+" sign) next to the "move left", "move right" and "close a tab" buttons?
Thanks a lot,
Alan
|
|
Technical Support
|
Oct 16, 2006 - 11:48 AM
|
Please let us know what tabbed documents you want to add?
|
|
Chun Pong Lau
|
Oct 16, 2006 - 11:56 AM
|
Sorry maybe I didn’t make myself clear. I do not mean to add "a new tabbded document". I mean to add "a button" in your tabbed interface, next to the "move tabbed document to the left", "move tabbed document to right" and "close" button. The purpose of the button is to create a blank new tabbed document.
Best regards, Alan
|
|
Chun Pong Lau
|
Oct 16, 2006 - 12:56 PM
|
|
|
Technical Support
|
Oct 17, 2006 - 10:47 AM
|
Here is a sample project that shows how to add a custom tab button to an mdi tab. You can add a custom button to any tab page container in the same way.
|
|
Roger Taplin
|
Oct 15, 2006 - 1:02 AM
|
I have an owner-draw CExtPopupMenuWnd popup menu displaying various border weights. The menu is elicited from a button within a dialogue. The menu contains labels and lines for border weights varying from zero (no line) to 3 points.
Item drawing is done in a CExtPopupMenuWnd::g_nMsgPopupDrawItem handler within the dialogue.
How can I suppress the menu left-hand gradient (I don’t want to display icons)?
How can I control the menu width?
Can the border weight status of the current selection (a command ID set by an ON_UPDATE_COMMAND_UI_RANGE handler) be accessed from the g_nMsgPopupDrawItem handler’s ExtPopupMenuWnd::DRAWITEMDATA struct?
Thanks,
Roger Taplin
|
|
Technical Support
|
Oct 17, 2006 - 12:10 PM
|
We recommend you follow an absolutely different approach for constructing your "border weight" menu items. You can insert them into a popup menu as tool button like menu items. You can see these menu items in the popup menu displayed from the toolbar’s chevron button. This menu is filled with toolbar buttons which cannot fit in the toolbar. The tool menu items can be displayed in multiple rows with several menu items per row. The last tool menu item in each row is marked with the wrap flag. You can insert several "border weight" tool menu items that have the wrap flag and generate wide icons for them displaying the "border weight" information like you need or like the line width in many painting programs. Using this approach you will not have to implement any custom painting. You can insert a menu item using the CExtPopupMenuWnd::ItemInsertCommand() method. Get a reference to the CExtPopupMenuWnd::MENUITEMDATA object by invoking the CExtPopupMenuWnd::ItemGetInfo() method. Configure it so it is descrived as the tool button like menu item: CExtPopupMenuWnd::MENUITEMDATA & mi = . . .
mi.SetNoCmdUI( true );
mi.Enable( true );
mi.SetToolButton( true );
mi.SetToolWrap( true );
CExtCmdIcon _icon;
// GENERATE THE icon.m_bmpNormal HERE
mi.SetPopupIcon( _icon ); The icon.m_bmpNormal property is an object of the CExtBitmap type. For instance, if you want to generate a line width icon of the 150x15 size and a black line of some width inside, you should generate a 150x15 HBITMAP (or CBitmap) object which has some known background color (for instance RGB(255,0,255) ) of all its pixels and draw a line over this background. Then you can assign this bitmap handle to the icon.m_bmpNormal property and make all the background pixels transparent: HBITMAP hBitmap = . . .
icon.m_bmpNormal.FromBitmap( hBitmap );
icon.m_bmpNormal.Make32();
icon.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), BYTE(0) );
// do not forget to destroy the hBitmap handle finally
::DeleteObject( hBitmap );
|
|
Timothy Anderson
|
Oct 13, 2006 - 1:35 PM
|
I try to run 2.60 install and it tells me to uninstall 2.50. I go to "add/remove programs" and launch the uninstall and it does absolutely nothing.
|
|
Timothy Anderson
|
Oct 13, 2006 - 1:49 PM
|
I did a registry search for the string inside add/remove programs, then found the MSI in "windows\downloaded installations" and uninstalled it successfully directly from it. Woot!
|
|
Offer Har
|
Oct 13, 2006 - 7:16 AM
|
Hi,
I am using CExtStatusControlBar status bar. When my window is switched to restore mode the gripper on the bottom right appears. I have a pane on the far right (the one before is stretch mode). When the gripper appears, the right most pane does not move to the left to allow space for the gripper, so the gripper hides a portion of that pane.
How to solve this problem?
Thanks.
|
|
Technical Support
|
Oct 16, 2006 - 11:20 AM
|
Unfortunately we failed to reproduce this problem. Would you help us reproduce this using some of our samples, for example StatusPanes?
|
|
Chun Pong Lau
|
Oct 12, 2006 - 8:13 PM
|
Dear support team,
Is there any way to modify the styles (e.g. thickness, color) of the border line in CExtDynamicControlBar?
Thanks in advance.
Alan
|
|
Technical Support
|
Oct 13, 2006 - 8:26 AM
|
Customized non client areas of control bars are demonstrated in the TabbedBars sample. The CMainFrame::OnMsgUseCustomNcArea() method in this sample handles the CExtControlBar::g_nMsgCustomNcAreaQuery registered Windows message which is designed both for recomputing and repainting the non client area of resizable control bars.
|
|
Chun Pong Lau
|
Oct 14, 2006 - 6:15 AM
|
I did the following but the debugger never runs into the modified function
In CMainFrame.h,
afx_msg LRESULT OnMsgUseCustomNcArea( WPARAM wParam, LPARAM lParam );
In CMainFrame.cpp,
BEGIN_MESSAGE_MAP( CMainFrame, CFrameWnd ) ON_REGISTERED_MESSAGE( CExtControlBar::g_nMsgCustomNcAreaQuery, OnMsgUseCustomNcArea) END_MESSAGE_MAP()
LRESULT CMainFrame::OnMsgUseCustomNcArea( WPARAM wParam, LPARAM lParam ){ int i = 0; // ******* the programe never reaches this line****** return 0; }
Please advice. Thanks a lot.
Regards, Alan
|
|
Technical Support
|
Oct 16, 2006 - 10:36 AM
|
Please also set the CExtControlBar::g_bUseCustomNcArea global variable to true. This is needed to tell all the CExtControlBar windows to start sending the CExtControlBar::g_nMsgCustomNcAreaQuery message and let your code affect the non-client area of any control bar.
|
|
Chun Pong Lau
|
Oct 16, 2006 - 3:32 PM
|
Thanks for your response. I can go to CExtControlBar::g_nMsgCustomNcAreaQuery() now. However, actually what I would like is simply to remove the border lines of a CExtDynamicControlBar. Can add code inside g_nMsgCustomNcAreaQuery() help to achieve this purpose?
On the other hand, I attempted to let CExtControlBar::DoPaintNC( CDC * pDC ) draw nothing but its border lines are still present (in white without any style makeup though).
Is there any way to remove the border lines of a CExtDynamicControlBar like a ribbon bar /page does? Please help. Thanks a lot.
Alan
|
|
Technical Support
|
Oct 17, 2006 - 11:09 AM
|
The message handler for the CExtControlBar::g_nMsgCustomNcAreaQuery registered Windows message should look like: LRESULT CMainFrame::OnMsgUseCustomNcArea( WPARAM wParam, LPARAM lParam )
{
ASSERT_VALID( this );
lParam;
CExtControlBar::CUSTOM_NC_AREA_QUERY_DATA * pCNAQD =
CExtControlBar::CUSTOM_NC_AREA_QUERY_DATA::FromWPARAM( wParam );
ASSERT( pCNAQD != NULL );
ASSERT_VALID( pCNAQD->m_pBar );
if( pCNAQD->m_pBar->IsFixedMode() )
return 0;
if( pCNAQD->m_hDcDraw != NULL )
{ // if rendering query
pCNAQD->m_bQueryHandled = false;
} // if rendering query
else
{ // if metric update query
pCNAQD->m_bQueryHandled = true;
pCNAQD->m_pBar->_SeparatorWidthSet( 0 );
pCNAQD->m_pBar->_SeparatorHeightSet( 0 );
} // if metric update query
return 0;
} Please also update the source code for the CExtControlBar::_SeparatorHeightSet() method in the .../Prof-UIS/Src/ExtControlBar.cpp file to fix a small assertion bug: void CExtControlBar::_SeparatorHeightSet( INT nSeparatorHeight )
{
ASSERT_VALID( this );
ASSERT( nSeparatorHeight >= 0 ); /* previously in 2.60 this line was ASSERT( nSeparatorHeight > 0 ); */
m_nSeparatorHeight = nSeparatorHeight;
}
|
|
David Skok
|
Oct 12, 2006 - 2:39 PM
|
under the following conditions...
Data in a ReportGrid is sorted on a column. I use the following code to locate the selected rows:
int SelectedRow = SelectionGetFirstRowInColumn( column );
while( SelectedRow != -1 ) { SelectedRow = SelectionGetNextRowInColumn( column, SelectedRow ); //... Do something to selected row, focused column }
How do I use column and SelectedRow to locate the cells. Remember data is sorted and so I can’t use SelectedRow directly to look up the Item in the array I saved it in when I initialized the ReportGridWnd. I know the column from the cell that I edited.
I need the lookup to work when grouped also.
Thanks
|
|
David Skok
|
Oct 12, 2006 - 3:04 PM
|
My apologies, I just realized that the CExtGridWnd::GridCellGet method can be used.
|
|
David Skok
|
Oct 12, 2006 - 12:55 PM
|
Or maybe a method already exists...
I use a ReportGridWnd with the following styles...
#define __ENABLE_CELLEDITING_BSE_STYLES__ ( __EGWS_BSE_EDIT_RETURN_CLICK |__EGWS_BSE_EDIT_SINGLE_FOCUSED_ONLY |__EGWS_BSE_EDIT_DOUBLE_LCLICK |__EGWS_BSE_EDIT_CELLS_INNER |__EGWS_BSE_EDIT_AUTO |__EGWS_BSE_BUTTONS_IN_FOCUSED_ROW )
SiwModifyStyle( 0, __EGBS_SFB_MASK ); SiwModifyStyle( __EGBS_GRIDLINES | __EGBS_SFM_CELLS_V | __EGBS_LBEXT_SELECTION, __EGBS_SFB_FULL_ROWS ); BseModifyStyle( __ENABLE_CELLEDITING_BSE_STYLES__, __EGWS_BSE_BUTTONS_PERSISTENT );
In short: multiple row selection, full row highlighted, auto editing etc.
The functionality I am implementing is that when multiple rows are selected, any edit to a cell is applied to the same column of all selected rows. Right now if VK_LEFT or VK_RIGHT is pressed, it will automatically unselect rows other than the currently focused row. The functionality that I would like is all selected rows remain selected if I switch columns in the selected row. All other functionality remains the same, that is, when the focus row is changed through either VK_UP/DOWN with bNoModifiers == false it will still unselect everything but the focused row, same for the mouse.
Your help is greatly appreciated,
Thanks
|
|
Technical Support
|
Oct 13, 2006 - 7:57 AM
|
The CExtGridWnd class supports the functionality that restores the selection after modifying grid cells in sorted columns. This feature is not supported in the CExtReportGridWnd class because it rebuilds its tree nodes after a grid cell is modified. To restore the selection is this case would be very ineffective. The super grid window in MS Outlook does not restore the selection either. You can restore the selection manually by keeping a CExtReportGridItem * pointer for each selected data row in the report gird. After the sort order is updated, you need to ensure all the kept report row pointers have expanded parent report rows first and then select the data rows which were selected previously.
|
|
David Skok
|
Oct 13, 2006 - 2:39 PM
|
I forgot to mention that CExtGridCell::OnInplaceControlTextInputVerify is overridden and always returns false. I hijack the input here and send it over a wire. If the device at the end of the wire completes the edit it reflects a message back and my app effects the text update in the report. I understand what you mean about sort not being in sync. Sorting is allowed at this point however is not terribly important and in fact may disabled in the future.
|
|
David Skok
|
Oct 13, 2006 - 9:02 AM
|
Thank you for the reply.
I think you misunderstood my request. I was not asking for selections to remain when sorting but rather selections to remain in a case where multiple rows selected, full rows highlighted enabled. When the user selects rows then begins editing they may move from column to column (within the same last selected row) without clearing the selections they made. The way it is now, if they went through the report selecting rows then edited a column the selections remain. If they use the right or left arrow key to focus a different column in the same row they lose their selected rows and are forced to jump around the report selecting the same rows all over then edit another column.
When I first traced through the lib code it appeared that there were no functions that I could override and modify to produce the effect I wanted. I spent more time and stepped through again and discovered that I can easily do what I want as follows (in case others are interested).
in a decendent of CExtReportGridWnd declare:
bool SelectionsCanChange; // added, init to true in constructor! bool SetSelectionsCanChange( bool setting ) // added { bool sel = SelectionsCanChange; SelectionsCanChange = setting; return sel; }
virtual bool OnGbwSelectionCanModify() // overrides CExtGridBaseWnd version { ASSERT_VALID( this ); return SetSelectionsCanChange( true ); }
In a decendent of CExtGridCell that will be used in the ReportGrid add...
virtual bool OnKey( CExtGridWnd & wndGrid, bool bKeyDownEvent, // true - key-down event, false - key-up event UINT nChar, // virtual key code UINT nRepCnt, // key-down/key-up press count UINT nFlags // key-down/key-up event flags );
in new version of OnKey...
if( bKeyDownEvent ) { if( nChar == VK_LEFT || nChar == VK_RIGHT ) { CExtReportGridWndDecendent *srpt = (CExtReportGridWndDecendent *) &wndGrid; if( srpt->IsKindOf( RUNTIME_CLASS( CExtReportGridWndDecendent ) ) ) srpt->SetSelectionsCanChange( false ); } break; } call the original version of OnKey....
The above overrides seem to produce the desired effect without causing harm elsewhere.
|
|
Technical Support
|
Oct 16, 2006 - 12:50 PM
|
Thank you for the interesting feature request. It is really reasonable, but for the report grid only -- not for any generic grid. Currently the report grid resets multiple selection to a single row with the focused cell absolutely the same like in MS Outlook. We can add optional selection keeping in this case.
|
|
David Skok
|
Oct 12, 2006 - 11:44 AM
|
When the __EGWS_BSE_EDIT_AUTO style is set in BseModifyStyle, a single ENTER (CR) keypress automatically replaces the contents in the editor with a CR character. As a fix may I suggest that when the AUTO style is set, ENTER places you in edit mode (selecting but not replacing the original text similar to when the AUTO style is not on) otherwise AUTO style works the same.
As an aside, the __EGWS_BSE_EDIT_AUTO style did not make it into the documentation or at least on the CExtGridWnd page.
|
|
Technical Support
|
Oct 13, 2006 - 7:58 AM
|
We have already fixed this bug. Please download the latest stable code from our ftp site.
|
|
Gevork Odabashyan
|
Oct 12, 2006 - 10:57 AM
|
Hellow
Is there any way to decrease the size of an executable in static MFC - static Prof-UIS build configuration? After update Prof-UIS version from 2.54 to 2.60 the size of our application increased approximately from 5.25 MB to 7.15 MB. The usage of MDI tabs and dynamic control bars was added in new version of our application. Is this increase defensible? Or there is any way to decrease the size? Maybe there are some preprocessor directives which can do that?
|
|
Gevork Odabashyan
|
Oct 12, 2006 - 11:00 AM
|
P.S. The size of our new code added to new version is approximatly 50 KB. No new features of MFC were used.
|
|
Suhai Gyorgy
|
Oct 12, 2006 - 3:28 PM
|
|
|
Gevork Odabashyan
|
Oct 13, 2006 - 3:24 AM
|
Thanks, Gyorgy! The size reduced greatly.
|
|
Technical Support
|
Oct 13, 2006 - 8:16 AM
|
We have just updated the mentioned FAQ: you can also reduce the library size by excluding Office 2007 paint managers and unneeded language resources.
|
|
Gevork Odabashyan
|
Oct 13, 2006 - 9:59 AM
|
After excluding unneded resources sized have reduced dramatically. Thanks for support!
|
|
Suhai Gyorgy
|
Oct 12, 2006 - 4:36 AM
|
Dear Support,
Please fix the above mentioned topic in Help. It has the line "virtual void OnPgcProcessChildWindowCommand" now, but as I checked in ExtPropertyGridWnd.h, it should be "virtual bool OnPgcProcessChildWindowCommand".
Thank you, Chris.
|
|
Technical Support
|
Oct 13, 2006 - 7:10 AM
|
Thank you for reporting the bug, Chris. We fixed it in the documentation source file.
|
|
Jason Smith
|
Oct 11, 2006 - 7:10 PM
|
I have a CWnd based custom control that I am subclassing to. This control is in a CExtResizableDialog docked within a CExtControlBar.
The control paints properly but does not respond to any mouse events (or other UI type events that I can determine). If I add a regular edit control to the dialog template, the Edit control accepts input, but the custom control still does not.
This control works properly if I subclass it in a regular CDialog. Ideas? What am I not doing to get this to work?
|
|
Technical Support
|
Oct 12, 2006 - 11:36 AM
|
What custom control are you using? The Prof-UIS Grid, Property Grid, TabPageContainer, Toolbox, PageNavigator, Duration, DateTime and other controls are custom controls and they all work inside CExtResizableDialog without problems. Please check the Disabled property for your control. If the problem persists, please send us (at support@prof-uis.com) a test project so we can figure out out what’s wrong.
|
|
Jason Smith
|
Oct 12, 2006 - 10:59 PM
|
It is a custom control I created and I found the problem -- a brainfart -- I didn’t set the "Notify" style in the CStatic I was using in the dialog resource. Thanks though!
|
|
delu qiu
|
Oct 11, 2006 - 11:51 AM
|
Hi,
I want to use AnimateWindow to slide animation a dialog window, the problem is all controls display skin well except the dialog. the dialog background display the window system default color instead of the skin.
BOOL CSPSSelection::OnInitDialog() { CDialog::OnInitDialog(); SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon
windll = LoadLibrary("C:\\WINDOWS\\system32\\user32.dll"); if ((AnimateWindow = (ANIMATEWINDOW)GetProcAddress(windll, "AnimateWindow")) == NULL) { FreeLibrary(windll); } BOOL bReturn; bReturn=AnimateWindow(this->m_hWnd,500,0x00040000|0x00000001); if (!bReturn) { CString str; DWORD err=GetLastError(); str.Format("%d",err); AfxMessageBox(str); } FreeLibrary(windll); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
|
|
Technical Support
|
Oct 13, 2006 - 11:55 AM
|
Thank you for reporting the bug. We found out that many of our controls do not support the WM_PRINT and WM_PRINTCLIENT messages, which should be implemented so that the AnimateWindow() function can work correctly. Now we are working on this issue and next week we will release a new Prof-UIS version that includes this fix. Please note that Prof-UIS already has the g_PaintManager.m_pfnAnimateWindow function pointer that can be used in your application: g_PaintManager.m_pfnAnimateWindow(
this->m_hWnd,
500,
__EXT_AW_SLIDE|__EXT_AW_HOR_POSITIVE
);
|
|
Brett Cook
|
Oct 11, 2006 - 10:58 AM
|
Hello,
Is it possible to have a scrollbar in a CExtResizableDialog to behave like a CFormView when the dialog is resized too small?
Thanks Brett
|
|
Technical Support
|
Oct 11, 2006 - 12:54 PM
|
The CExtResizableDialog class is a skinned version of MFC’s CDialog class. It also allows you to anchor controls. The CFormView class is a kind of the CScrollView class with features of the CDialog class and scrolling support. The CExtResizableDialog class AS IS is unable to replace the form view class. You should use your own CScrollView -derived class (or CExtScrollWnd -derived) with the CExtResizableDialog inside. This class should scroll the child dialog if the window size is small and resize the child dialog if the window size is large. We can help you with coding this task.
|
|
Brett Cook
|
Oct 11, 2006 - 5:36 PM
|
Yes, the solution you suggest would be ideal for my individual dialogs. Any help would be appreciated in getting started there.
Also, is it possible to have a scrollbar pop up when too many bars are docked into one control bar to allow scrolling of the entire bar. For example, I have 6 dialogs encapsulated by control bars that I dock vertically into one bar. When all six are there, there is not enough space to display them all, so having a way to scroll the entire bar would be ideal.
Thanks Brett
|
|
Technical Support
|
Oct 12, 2006 - 12:54 PM
|
We coded a simple sample for you. It implements a scrollable container window for other windows like a test dialog used in this sample. The scrollable container is used as the SDI view window. If the container’s size is less than the initial size of its child window, scroll bars appear. Otherwise the child window is stretched to the client area of the container window and scroll bars are hidden. You can also use the scrollable container as a child of a control bar.
|
|
Brett Cook
|
Oct 13, 2006 - 12:45 PM
|
Thank you for the sample you have provided, it will prove very useful.
Any word on the ability to throw up a scrollbar to scroll multiple side-by-side docked control bars?
|
|
Technical Support
|
Oct 16, 2006 - 11:46 AM
|
Control bars can be organized into different layouts inside the main frame window or inside floating mini frame windows. In any case, the parent of any CExtControlBar window is the CDockBar dock bar window. The dock bars are not enabled for scrolling both in MFC and in Prof-UIS.
|
|
Chun Pong Lau
|
Oct 11, 2006 - 1:32 AM
|
Dear support team,
Your docking mechanism is very nice. However, in some cases, I would like to have some CExtDynamicControlBar to be
1) undockable 2) unable to be docked inside by another bar
Can you please advise?
Thanks in advance, Alan
|
|
Technical Support
|
Oct 11, 2006 - 12:46 PM
|
You can override the CExtControlBar::FloatControlBar() virtual method and not invoke the parent class method in it to prevent switching of the control bar into the floating state. You can override the CExtControlBar::_CanDockToTabbedContainers() virtual method to prevent docking of one control bar into the tabbed container with particular other bar. You can override the CExtControlBar::_CanDockLTRB() virtual method to prevent docking of one control bar with another bar.
|