Subject |
Author |
Date |
|
Offer Har
|
Jan 12, 2007 - 9:42 AM
|
Dear Support,
When I change the font of a dialog from size 8 to 10, all controls are automatically change to the right size, but not the CExtTabPageContainerWnd control.
Please note that even if I add the following line in OnInitDialog
m_ctrlTab.SetFont(GetFont());
The font does not change.
Please fix, and if possible send me a patch for this problem ASAP.
Thanks, Ron.
|
|
Technical Support
|
Jan 13, 2007 - 1:27 PM
|
Thank you for reporting the problem. We sent you the patch by e-mail
|
|
Suhai Gyorgy
|
Jan 12, 2007 - 9:14 AM
|
Dear Support, I have a modeless dialog in my SDI application. Actually the MainFrame has a pointer member variable which is NULL first, but then I allocate it with new in a command handler. When user clicks X button on dialog, I destroy it. All seem to work fine. There’s just a little thing: If I fire the command through toolbar button, the button visually stayes hovered and goes back to normal state only if I hover over any button of same toolbar. There’s no UpdateCommandUI handler for my buggy button. What am I doing wrong? I reproduced the problem in a modified ThemeColorizer sample. If you need to check it, you can download it from here. I connected the handler to the Rectangle Selection button. Thank you and have a nice weekend!
|
|
Technical Support
|
Jan 13, 2007 - 1:22 PM
|
We confirm the problem and will fix it as soon as possible. Thank you for reporting the problem.
|
|
Suhai Gyorgy
|
Jan 12, 2007 - 8:15 AM
|
We are using a custom paintmanager derived from CExtPaintManagerStudio2005. It is almost the same as your CColorizedThemeOffice2003 in ThemeColorizer sample. I get the warning "Cannot call WriteClass/WriteObject for ..." in the VS Output window. I traced it down, it gets called somewhere inside InstallPaintManager. I checked, same happens in your ThemeColorizer sample as well. I’m guessing it is connected to your new PaintManagerStateSerialize feature. Am I right? How could I fix it? It’s really no big mistake, users won’t notice anything, I just would like to clear it up.
Thank you.
|
|
Technical Support
|
Jan 12, 2007 - 12:35 PM
|
Are you using the DECLARE_SERIAL and IMPLEMENT_SERIAL macro in your class? This may be the cause of the problem.
|
|
Hans Peter Miedeck
|
Jan 12, 2007 - 1:51 AM
|
hello, i want to deactivate one row in my Grid to runtime. Is this possible?
Thank you for this great foru.
|
|
Suhai Gyorgy
|
Jan 12, 2007 - 3:31 AM
|
If you want to hide one row then you can set its height to 0 by setting the extent of the outer left cell to 0. CExtGridCellHeader * pCell = STATIC_DOWNCAST( CExtGridCellHeader,
GridCellGetOuterAtLeft( nRowNo, 0L, RUNTIME_CLASS(CExtGridCellHeader) )
);
pCell->ExtentSet( 0, 0 ); // set current height
pCell->ExtentSet( 0, 1 ); // set maximum height
If you are using CExtReportGridWnd and you would like to filter your rows, then you will have to wait some more: Support’s post from Jan 11, 2006 "Filters for the CExtReportGridWnd class are in the TO-DO list"
|
|
Offer Har
|
Jan 11, 2007 - 7:48 PM
|
Dear Support,
When the tab control orientation is to the right side, and theme is one of the R1, R2 or R3 themes, the limiter line between the tabs is missing. You can reproduce it by running the ProfUIS_Controls, and change the tab orientation to right.
Please note that in left orientation the lines are there...
Regards, Ron.
|
|
Technical Support
|
Jan 12, 2007 - 12:46 PM
|
Thank you for reporting the problem. We will fix it as soon as possible.
|
|
Soo Wei Tan
|
Jan 11, 2007 - 3:12 PM
|
I am using a slider button similar to the one implemented in the AviFrames example. However, I am getting an uninitialized value if I click on the slider button and release it without moving it away from its original position.
The bad value first occurs in the following code:
virtual void OnClick( CPoint point, bool bDown )
{
CExtBarSliderButton::OnClick(point,bDown);
TRACE( "OnClick, Scroll Pos: %u\n", m_nScrollPos );
}
The value of m_nScrollPos is 3452816845 which is 0xCDCDCDCD. I believe this means the memory is uninitialized. This is weird since it is initialized to 0L in the constructor.
Any help would be greatly appreciated. Thanks!
|
|
Soo Wei Tan
|
Jan 24, 2007 - 12:58 PM
|
Hmmm... I can’t reproduce it anymore. If it does appear again I’ll make a sample to send to you. Thanks!
|
|
Soo Wei Tan
|
Jan 12, 2007 - 12:47 PM
|
I am overriding OnClick() because I only want an action to occur when the user releases the mouse button after dragging. ScrollPosSet() is called for many values when dragging, but I only want the final position of the slider, rather than updated values along the way.
|
|
Technical Support
|
Jan 16, 2007 - 11:16 AM
|
We tried to reproduce this bug with our AviFrames sample but failed. Would you send us your project or a modified version of the AviFrames sample that reproduces the bug?
|
|
Technical Support
|
Jan 12, 2007 - 12:19 PM
|
The m_nScrollPos property is initialized in the CExtBarSliderButton class constructor so the problem hides somewhere in your code. Please let us know what is the reason for overriding the OnClick() virtual method? If you need to know when the scroll position changes, you could override ScrollPosSet() instead.
|
|
Andrew Banks
|
Jan 11, 2007 - 11:51 AM
|
Do you have CFileDialog, AfxMessageBox consistant with PaintManager
|
|
Technical Support
|
Jan 12, 2007 - 12:25 PM
|
The system dialogs that are consistent with Prof-UIS themes are not supported at the moment. This feature is in our to-do list.
|
|
Offer Har
|
Jan 11, 2007 - 10:50 AM
|
Dear Support,
This class contains a lot of text changing function, but i could not find any function to change the font’s size? How can this be done? Why isn’t there a function for doing this?
Regards, Ron.
|
|
Wes Aday
|
Jan 11, 2007 - 2:16 PM
|
Can’t you use the SetFont function?
|
|
Offer Har
|
Jan 11, 2007 - 7:19 PM
|
I can, but it will look like this:
CFont* pFont = m_lblMessage.GetFont(); LOGFONT logFont; pFont->GetLogFont(&logFont); logFont.lfHeight -=4; CFont* pNewFont = new CFont; pNewFont->CreateFontIndirect(&logFont); m_lblMessage.SetFont(pNewFont);
Instead of one line...
All i’m saying is that i think that such a nice class can have an option to allow simple font’s parameters changing.
|
|
Technical Support
|
Jan 12, 2007 - 12:15 PM
|
Actually the LOGFONT structure defines 14 attributes of the font. This means we would have to add 14*2=28 methods for getting and setting these attributes. To make this consistent throughout the library, we would have to a number of methods. On the other hand, the task of changing font attributes is well-defined in MFC projects. So in our opinion it is a debatable question.
|
|
Scott Moore
|
Jan 11, 2007 - 9:16 AM
|
I’m having trouble with my menu items when I use keyboard accelerators to invoke them. I believe the problem is because I handle the message in a child class of CFrameWnd which is a CExtResizeableDlg.
Everything works fine if I select the menu item with the mouse. And the keyboard accelerator works fine anytime I have previously selected a menu item from the application. But if I set focus to my CExtGrid control and try the accelerator, it never works. I assume this is a problem with PreTranslateMsg(), but I’m not sure how to fix it.
My window hierarchy is this:
CExtNCW < CFrameWnd > CExtTabPageContainerWnd CExtResizableDialog <<< handles menu item Thanks, Scott
|
|
Technical Support
|
Jan 14, 2007 - 1:09 PM
|
The problem is caused by the message pre-translation implemented in the CDialog class. Everything should work if you override the CWnd::PreTranslateMessage() virtual method in your dialog class: BOOL CYourDialogClass::PreTranslateMessage( MSG * pMSG )
{
if( WM_KEYFIRST <= pMSG->message && pMSG->message <= WM_KEYLAST
&& ( pMSG->wParam == VK_TAB || pMSG->wParam == VK_UP || pMSG->wParam == VK_DOWN )
)
return CExtResizableDialog::PreTranslateMessage( pMSG );
else
return CWnd::PreTranslateMessage( pMSG );
}
|
|
Scott Moore
|
Jan 12, 2007 - 6:31 AM
|
No, my grid is read only. It just happens if you select a row or the grid gets focus.
|
|
Suhai Gyorgy
|
Jan 12, 2007 - 3:34 AM
|
Does it happen when you use inplace editor of a cell in your CExtGridWnd?
|
|
Offer Har
|
Jan 11, 2007 - 6:57 AM
|
Dear Support,
What is the way to remove the caption bar of a dock bar completely?
Thanks, Ron.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 7:32 AM
|
Dear Ron,
First of all, two notes about window/control names: - Control bar (the
CControlBar class in MFC) is the window which sticks to the border of its parent window and which can be optionally redockable in MFC frame windows. Status bar (the CStatusBar class in MFC, the CExtStatusControlBar class in Prof-UIS) is the most popular non-redockable control bar. Toolbars (the CToolBar class in MFC, the CExtToolControlBar class in Prof-UIS) and resizable bars (not implemented in MFC, the CExtControlBar class in Prof-UIS) are the most popular redockable control bars. - Dock bar is also the kind of control bar, but it is internal window which has implementation both in Prof-UIS and MFC. The dock bar (the
CDockBar class in MFC, the CExtDockBar and CExtDockOuterBar classes in Prof-UIS) is the non-redockable version of control bar which is designed to act as container for any kind of redockable control bars. I think dock bars normally should never be discussed.
All the control bars in Prof-UIS are created using the CExtControlBar::Create() method. Typically the control bar window styles specified in the method’s parameter are the default C++ parameter value which has several WS_*** standard window styles and several CBRS_*** MFC control bar styles. If the CBRS_GRIPPER style is present (it is specified in default parameter value), then: - The gripper is present in created toolbar (the
CExtToolControlBar class), menu bar (the CExtMenuControlBar class) or panel bar (the CExtPanelControlBar class). - The caption is present in created resizable control bar (the
CExtControlBar class).
So, you should simply create your resizable control bars with invoking the CExtControlBar::Create() method and specifying the set of styles similar to default C++ parameter value, but without the CBRS_GRIPPER style. Such kind of resizable control bar are very similar to the splitter windows, but they have two very handy features: - You can show/hide them anytime at run time.
- Control bars have state persistence support.
|
|
Offer Har
|
Jan 11, 2007 - 7:42 AM
|
Dear Sergiy,
Thanks for the comprehensive answer. I understand my terminology mistake.
Best Regards, Ron.
|
|
Offer Har
|
Jan 11, 2007 - 6:43 AM
|
Dear Support,
I am creating from scratch an SDI application. I create it to be maximized by default. When i replace CFrameWnd with CExtNCW<CFrameWnd> i see that 4 right most pixels (the right side frame) is missing, as if the CExtNCW is doing some wrong calculations.
Is it a known bug? Do you want me to send you the project with the bug?
Regards, Ron.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 7:34 AM
|
Dear Ron,
Please provide more details about the location of these 4 pixels on the screen. Do you use some multi monitor system? It would be very helpful to take a look at the screenshot demonstrating the problem?
|
|
Offer Har
|
Jan 11, 2007 - 7:37 AM
|
Dear Sergiy,
Yes, i am using multi-monitor, in dual-view. The extra pixels ’slide’ into the right monitor.
Regards, Ron.
|
|
Technical Support
|
Jan 12, 2007 - 11:44 AM
|
We confirm that this actually occurs on multi-monitor systems and will fix this in the next release. Thank you.
|
|
Henry Tso
|
Jan 11, 2007 - 5:52 AM
|
Dear Supporter,
I create a MDI API and enable tabbed MDI with "CExtTabMdiWhidbeyWnd" Class. Can’t I run time to add or remove the tabbed MDI effect ?
Thanks
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 6:07 AM
|
Dear Henry,
The ProfStudio sample application demonstrates how implement the on-the-fly switching between classic MDI and tabbed MDI interfaces. The MDI tab window is persistently exist in this sample application. It is visible in the tabbed mode and invisible in the classic mode. The implementation is based on overriding of the CExtTabWnd::OnTabWndSyncVisibility() virtual method. If you need to implement the tabbed MDI interface exactly like in Visual Studio .NET or Visual Studio 2005, then you also should hide the minimize/maximize-restore/close buttons for the active MDI document in the menu bar. This feature is also demonstated in the ProfStudio sample application.
|
|
Hans Peter Miedeck
|
Jan 11, 2007 - 4:16 AM
|
Dear Support,
I’ve looked everywhere for a sample how to use OnGbwAnalyzeCellMouseClickEvent but I cannto find anyone.
I’ve got a CScrollSortGridWnd object which has to enable diferrent buttons when a row was clicked. So I have to ask for the left mouse click.
I tried it so:
//Header CScrollSortGridWnd m_cTest;
//CPP
... ... /* Add some rows*/ ..... .....
BOOL CPruefreihenfolge::PreTranslateMessage(MSG* pMsg) { if ( pMsg->message == WM_LBUTTONDOWN ) { if ( this->m_cTest.OnGbwAnalyzeCellMouseClickEvent(VK_LBUTTON,1,NULL,NULL) ) { MessageBox("jepp",NULL,MB_OK); } }
return CExtResizableDialog::PreTranslateMessage(pMsg); }
But nothing happens.
How can I get events that were send in my CScrollSortGridWnd object?
|
|
Hans Peter Miedeck
|
Jan 12, 2007 - 5:45 AM
|
Thanks,
it works very well. ;-)
But now I’ve a new problem :-)
The choosen row was not selected. :-(
|
|
Suhai Gyorgy
|
Jan 12, 2007 - 6:46 AM
|
Just a guess: In Sergiy’s code it says: if( nColType == 0 && nRowType == 0)
{
// if we are here, then the inner data cell is clicked by the left mouse button
if( "this event is handled by your code" ) return true;
}
I think in your case "this event is handled by your code" should always be false, meaning that return shouldn’t be called here, only after CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 5:02 AM
|
Dear Hans,
You should add the OnGbwAnalyzeCellMouseClickEvent() virtual method into your CScrollSortGridWnd class instead of invoking it explicitly. Sample:bool CScrollSortGridWnd::OnGbwAnalyzeCellMouseClickEvent(
UINT nChar, // VK_LBUTTON, VK_RBUTTON or VK_MBUTTON only
UINT nRepCnt, // 0 - button up, 1 - single click, 2 - double click, 3 - post single click & begin editing
UINT nFlags, // mouse event flags
CPoint point // mouse pointer in client coordinates
)
{
ASSERT_VALID( this );
ASSERT( 0 <= nRepCnt && nRepCnt <= 3 );
if( nChar == VK_LBUTTON )
{
CExtGridHitTestInfo htInfo( point );
HitTest( htInfo, false, true );
if( htInfo.IsHoverEmpty()
|| (! htInfo.IsValidRect() )
)
return false;
INT nColType = htInfo.GetInnerOuterTypeOfColumn();
INT nRowType = htInfo.GetInnerOuterTypeOfRow();
if( nColType == 0
&& nRowType == 0
)
{
// if we are here, then the inner data cell is clicked by the left mouse button
if( this event is handled by your code )
return true;
}
}
if( CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent(
nChar,
nRepCnt,
nFlags,
point
)
)
return true;
return false;
}
|
|
Andrey Pinchuk
|
Jan 11, 2007 - 2:23 AM
|
Hello. This is problem in the BoundChecker checked. ------------------------------------------------------------------------------------------------------- Dynamic memory overrun 1520 byte block allocated in D:\My projects\AwsServer\ChildView.cpp (44) HANDLE: 0x03611FD8 allocating thread ID: 0x888, current thread ID: 0x888
Location of Error CExtPopupMenuWnd::`scalar deleting destructor’ d:\prof-uis\include\extcustomize.h 902 CExtPopupMenuSite::_Done D:\Prof-UIS\Src\ExtPopupMenuWnd.cpp 906 CExtPopupMenuSite::DoneInstance D:\Prof-UIS\Src\ExtPopupMenuWnd.cpp 837 CExtPopupMenuWnd::PostNcDestroy D:\Prof-UIS\Src\ExtPopupMenuWnd.cpp 5769 CWnd::OnNcDestroy wincore.cpp 842 CWnd::OnWndMsg wincore.cpp 1824 CWnd::WindowProc wincore.cpp 1585 CExtPopupBaseWnd::WindowProc D:\Prof-UIS\Src\ExtPopupMenuWnd.cpp 4619 CExtPopupMenuWnd::WindowProc D:\Prof-UIS\Src\ExtPopupMenuWnd.cpp 12313 AfxCallWndProc wincore.cpp 215 AfxWndProc wincore.cpp 367 USER32.DLL!00008704 (unknown) (unknown) USER32.DLL!000087E6 (unknown) (unknown) USER32.DLL!0000B363 (unknown) (unknown) USER32.DLL!0000E634 (unknown) (unknown) CExtPopupMenuWnd::DestroyWindow D:\Prof-UIS\Src\ExtPopupMenuWnd.cpp 10440 CExtPopupMenuWnd::_OnCancelMode D:\Prof-UIS\Src\ExtPopupMenuWnd.cpp 13549 CExtPopupMenuSite::_HookMouseProc D:\Prof-UIS\Src\ExtPopupMenuWnd.cpp 1154 USER32.DLL!00016E41 (unknown) (unknown)
I?ienoiaeo anee nicaaaaou eiioaenoiia iai?:
CExtPopupMenuWnd * pPopup = new CExtPopupMenuWnd(); pPopup->CreatePopupMenu(GetSafeHwnd()); pPopup->ItemInsertCommand(ID_COM,-1,"text",NULL,AfxGetApp()->LoadIcon(IDI_COM)); CPoint p; GetCursorPos(&p); pPopup->TrackPopupMenu(0, p.x, p.y); ------------------------------------------------------------ A Aa?nee 2.61 Yoie i?iaeaiu ia auei.
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 5:17 AM
|
Dear Andrey,
The DevPartner software (more modern Bounds Checker version) is provided with a set of Error Suppression files. Each file is the database of errors for some EXE/DLL module which should never be displayed by DevPartner as the errors. The Error Suppression files are provided for many DLLs from the $Windows$/System32 folder. The DevPartner software does not provide such "error" database for Prof-UIS and we too. Previously, we faced many "errors" in both DevPartner and Purify but all of them were not the real errors. For instance, we are often writing code lines which are needed just to make Prof-UIS more "compatible" with both both DevPartner and Purify:SOME_WIN32_STRUCT_TYPE varName;
::memset( &varName, 0, sizeof( SOME_WIN32_STRUCT_TYPE ) );
varName.cbSize = sizeof( SOME_WIN32_STRUCT_TYPE ); The memset() invocation is needed just to avoid the uninitialized memory usage error message in DevPartner logs. In fact, even if the memset() function is not invoked - we are sure we are not using uninitialized memory when DevPartner reports this.
|
|
Jeremy Ruth
|
Jan 10, 2007 - 6:56 PM
|
First of all, I hope it’s ok to lump more than 1 question into one thread. Please let me know if you’d rather they were separate threads. I have a bunch of GridWnd questions:
1. I have numeric cell columns that I do not want thousand separators for... is there a way to suppress the ’ThousandSeparator’ (i.e. a value of 345,543 to display as: 345543?
2. I am experiencing slow/choppy horizontal scrolling when using any of the office 2007 themes. I notice the grid sample in the ’Controls’ sample app seems to do a better job. I have tried to implement my grid the same way. The only differences I can think of are: My grid is on a CFormView and I have a lot more columns (160 for this app). Any thoughts on this?
3. Is there a thought about adding functionality for horizontal scrolling while dragging a column header to either end of the visible grid window? How could this handled programmatically? In other words, are there events I can use to get me going in the right direction?
4. The documentation help file (Very awesome, by the way!!) I have for 2.62, which I believe is the latest, is not up to date for the OnMeasureTextSize overridable. There are 3 CRect parms now in 2.63. What and how are they used?
5. Given a CExtGridCell pointer, is there a way to know the row and column?
6. I am trying with absolutely no luck to dynamically change the width of the Left Outer column (row headers). I have set the __EGCS_HDR_ROW_COLUMN_NUMBER style on the column of cells to auto number the rows. I want to dynamically change the Extent based on how many rows (largest width of all row numbers encountered). I have found examples here using OnMeasureTextSize for inner cells and column headers, but I can not get it to work for row headers.
Thanks very much for this tool. It is wonderful. The support is also very good. Keep up the great work.
|
|
Technical Support
|
Jan 13, 2007 - 1:43 PM
|
1. CExtGridCellNumber class uses the information specified by the LCTYPE constant value LOCALE_STHOUSAND in the current locale. So you can use the SetLocaleInfo() method for changing this value. Please note you cannot specify the "" (empty) value using the SetThousandSeparator() method. This value is interpreted as the default value. Another way is to override the CExtGridCellNumber::OnQueryThousandSeparator( CExtSafeString & sVal ) virtual method and make the sVal parameter empty.
2. It is not clear what you mean by the "slow/choppy horizontal scrolling". If you mean the Office 2007 style of the scroll bars, please take a look at how it is done in the CMyGridWnd class in the ProfUIS_Controls sample (the PageGrid.h file)
3. This is not supported at the moment. We added this feature to our TO-DO list.
4. Thank you for the comments, we will update the documentation. These parameters were added for the future use and are not used currently.
5. The CExtGridCell object knows nothing about its location in the grid. The only one way is to traverse all the cells in the grid and compare the cell objects with your cell object. Please let us know where you are going to use the cell location? Maybe we could suggest you some better solution in your particular case.
6. There is a CExtGridBaseWnd::OuterColumnWidthSet() method that sets the width, in pixels, of the outer column on left/right.
|
|
Suhai Gyorgy
|
Jan 12, 2007 - 4:13 AM
|
Partial reply: 1. Have you tried using CExtGridCellNumber::SetThousandSeparator(_T(""));? You can’t set it to the column but have to set it to every cell of the column when initializing. 5. If you knew the client coordinates of the cell then you could call CExtGridBaseWnd::HitTest() after filling out CExtGridHitTestInfo::m_ptClient member of the first parameter of the method. It will fill out the rest of the CExtGridHitTestInfo members. 6. Have you tried CExtGridWnd::BestFitColumn(0, -1) ?
|
|
Scott Moore
|
Jan 10, 2007 - 3:13 PM
|
This must be a simple problem, but for the life of me I can’t find the correct combination of styles. No matter what styles I select, I can always select multiple rows by holding down the Ctrl key. My current style is set like this:
m_grid.SiwModifyStyle(__EGBS_SFB_FULL_ROWS, __EGBS_SFB_MASK);
The help docs say to enable multiple rows, I would need to include the __EGBS_SFM_ROWS flag. But I’m not including this and I can still select more than 1 row.
What am I doing wrong? This is with 2.62
|
|
Scott Moore
|
Jan 10, 2007 - 3:30 PM
|
Nevermind, I finally found the method MultiAreaSelectionSet(false);
|
|
Paul Cowan
|
Jan 10, 2007 - 2:34 PM
|
Several questions about different grid cells:
1. How can I get an empty, but editable numeric cell? It seems that the cell it not editable until I assign a value, even 0, but then the value is displayed in the cell. I would like the cell to be empty until a value is entered.
2. How to change the format of the date in a CExtGridCellDateTime cell. It seems to be using the Windows short date format, how can I specify a custom format?
3. How to hide the None button on the pop-up calendar from the CExtGridCellDateTime cell.
4. How to get the top/left corner filled in. I have a top header and left header and would like a corner between the two. I’ve tried using __EGBS_EX_CORNER_AREAS_3D with the grid SiwModifyStyle, but it’s not working.
|
|
Paul Cowan
|
Jan 12, 2007 - 2:48 PM
|
I didn’t need to override ::OnGbwEraseArea The code given didn’t draw the 3D look in the corners. I used SiwModifyStyleEx (__EGBS_EX_CORNER_AREAS_3D to draw the corner
|
|
Technical Support
|
Jan 12, 2007 - 12:31 PM
|
In addition to what Chris wrote we would like to add the following:
1. There is a new __EGCS_EX_EMPTY cell style that werer added in Prof-UIS v2.62 and it is exactly what you are looking for.
2. In the CExtGridCellDateTime::OnQueryDatePickerStyle() overridden method do not specify __EDPWS_BUTTON_NONE style.
3. The grid control does not display cell objects in corners but you can repaint them if you need to display some information there. You should override the CExtGridBaseWnd::OnGbwEraseArea() virtual method like as follows: void C_YOUR_GridWnd::OnGbwEraseArea(
CDC & dc,
const RECT & rcArea,
DWORD dwAreaFlags
) const
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
COLORREF clrDebugFill = COLORREF( -1L );
switch( dwAreaFlags )
{
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_TOP:
clrDebugFill = RGB( 255, 128, 128 );
break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_BOTTOM:
clrDebugFill = RGB( 128, 255, 128 );
break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT:
clrDebugFill = RGB( 128, 128, 255 );
break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT:
clrDebugFill = RGB( 128, 255, 255 );
break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT|__EGBWA_OUTER_TOP:
clrDebugFill = RGB( 255, 128, 255 );
break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_LEFT|__EGBWA_OUTER_BOTTOM:
clrDebugFill = RGB( 255, 255, 128 );
break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT|__EGBWA_OUTER_TOP:
clrDebugFill = RGB( 255, 255, 128 );
break;
case __EGBWA_OUTER_CELLS|__EGBWA_OUTER_RIGHT|__EGBWA_OUTER_BOTTOM:
clrDebugFill = RGB( 128, 128, 128 );
break;
case __EGBWA_INNER_CELLS:
clrDebugFill = RGB( 255, 255, 224 );
break;
}
if( clrDebugFill != COLORREF( -1L ) )
dc.FillSolidRect( &rcArea, clrDebugFill );
}
|
|
Paul Cowan
|
Jan 12, 2007 - 10:10 AM
|
Thanks for the reply I do have v2.62
Some comments for future reference:
1. For the empty cell, you still need to assign a value: pCellNumber->_VariantAssign (0); pCellNumber->Empty();
4. The __EGBS_EX_CORNER_AREAS_3D does work, but you need to use SiwModifyStyleEx, I was using SiwModifyStyle
|
|
Suhai Gyorgy
|
Jan 12, 2007 - 8:03 AM
|
1. Prof-UIS v2.62 has what you need here. From Version History: - Added an __EGCS_EX_EMPTY extended cell style, which makes the cell empty. The empty style is automatically removed when the user starts entering some value in the cell. - Added CExtGridCell::IsEmpty() and CExtGridCell::Empty() methods, which allow you to check if the cell is empty and make it empty. 2. I’m just guessing here. I checked v2.62 implementation for CExtGridCellDateTime::TextGet. That does all the formatting, but it gets the format from the OS’ locale settings. What you can set from outside the cell is: - CExtGridCellDateTime::SetMode : Sets a new display mode (only time, only date, or date and time). - CExtGridCellDateTime::SetTimeFormat : Sets a new time format (12-hour, 24-hour or automatically detected). If you want to do other settings, you should override CExtGridCellDateTime::TextGet. Check default implementation. 3. There’s a virtual DWORD OnQueryDatePickerStyle() const; private method in CExtGridCellDateTime. Default implementation returns a combination of CExtDatePickerWnd styles. You should override this method and set your own styles. In SimpleGrids sample you can see that overriding a CExtGridCell-derived class is a little more tricky than overriding a usual class. Check implementation of CDemoColoredCell in that sample. 4. There’s a thread in this forum on this topic already. You can find it fast if you do a search on the word "intersection". The topic is entitled Grid Columns. Although it’s a quite old thread, I think it’s still applicable now.
|
|
Darren Oliver
|
Jan 10, 2007 - 2:06 PM
|
1. I would like to create a similar layout as Microsoft did in Outlook’s Rules and Alerts (Tools->Rules and Alerts).
I would like to have a string of text be a link which would open up another dialog when clicked. I have looked through your examples and I see you are using buttons which I do not think will work in this case.
It is essential that I am able to make a few words in a sentence a link instead of the entire line.
This link would appear inside a CExtGridWnd cell.
2. Also is it possible to add another table inside a CExtGridWnd cell? So as to have a single cell be an entire new table.
Thank you for your time, Darren
|
|
Darren Oliver
|
Jan 12, 2007 - 8:56 AM
|
I apologize my quick example. The cell headers didn’t line up to their corresponding columns correctly.
Enable corresponds to <check box> Action corresponds to "send e-mail to Parameter" Parameter corresponds to "Jonny"
Thanks, Keep up the great work!
|
|
Darren Oliver
|
Jan 12, 2007 - 8:53 AM
|
Thank you for your quick response Sergiy.
I have redesigned my dialog by adding some colour to the grid cells to avoid a nested table. This allows me to show the entire grid without using a popup window. Thank you for the suggestion though :)
I am however still a little stumped on how to implement a rich text edit control. I would like a grid with check boxes on the left side corresponding to a line of text in the grid. I would like to underline one or more words in the cell but unfortunately I’m only able to underlne all the text in the cell.
Having check boxes would allow the user to enable or disable the corresponding action. A quick example would be ________________________________________________ Enable | Action | Parameter | _____________|______________________|___________| | <check box> | send e-mail to Parameter | Jonny | _______________________________________________|
I would like to underline only the word "Parameter" where Parameter would just be a place holder for "Jonny". The underlined text wouldn’t be replaced with the text inside the parameter cell in the grid but the action would effectively be "send e-mail to Jonny".
The rich text examples you suggested look like they would work for a large single text control but could something like this be embedded inside a CExtGridWnd?
Thank you for your assistance, Darren
|
|
Technical Support
|
Jan 15, 2007 - 1:28 PM
|
The grid cell content you need is the simple text with multiple hyperlinks. Unfortunately we have no ready-to-use grid cell which is working as simple web browser. We can assume your message as feature request or custom work request depending on its importance in your project(s).
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 4:35 AM
|
Dear Darren,
The CExtGridWnd class implements the HWND -based UI control which acts like the grid control. The CExtGridCell class implements the non-HWND -based UI item inside the grid control. Currently it is not possible to insert the grid control into the grid cell inside other grid control. But you can create the grid cell with the ellipsis button and show the nested grid control inside some popup window which will be displayed when the grid cell’s ellipsis button is clicked. This popup window can be either modal or non-modal. We can discuss details of your task to find more exact solutions.
The CExtGridCellHyperlink class implements grid cell which works like hyperlink in web browser, but entire hyperlink cell area works like hyperlink - not some part of cell’s text. I think the Outlook like rule builder should be implemented in an other way. You should use the rich edit common control with the hyplerlink like looking and working OLE objects inserted into rich text. First of all, please check the following articles and corresponding source code which will bring you much closer to the solution:
In the most simple case the hyperlinks can be implemented as bitmaps inside rich text. Each bitmap will display rich edit’s background and underlined text.
|
|
Massimo Germi
|
Jan 10, 2007 - 12:05 PM
|
Hi tec support, I’m starting a new project using CExtReportGridWnd. I wish to hide some column when printing preview is enabled, is there a way to implement this?
Thanks a lot and Happy new Year
|
|
Sergiy Lavrynenko
|
Jan 11, 2007 - 2:14 AM
|
Dear Massimo,
The printing and print preview (PPV) subsystem for the CExtReportGridWnd class uses all the active columns for rendering printable pages. It is not possible to specify neither set of custom report columns for printing nor custom widths for columns (they are measured to fit content) in the first version of PPV subsystem. So, currenty you should activate all the columns to see them printed. I think your question can be assumed as very good feature request.
|
|
Paul Cowan
|
Jan 10, 2007 - 8:08 AM
|
I have a single frame with two view Windows. Each of the view Windows have its own set of toolbars. How do I save/restore the docking/floating and toolbar layouts for the two indepentent views?
|
|
Technical Support
|
Jan 10, 2007 - 11:16 AM
|
Because your views are different windows, you should assign different profiles for these windows. Please take a look at how this is done in the MDI_InnerOuterBars sample.
|