Subject |
Author |
Date |
|
Sungsoo Yoon
|
Nov 30, 2005 - 1:20 AM
|
Dear, I’d like to put the AdoRecordView(CExtGridWnd) into CExtControlBar. In my application that I want to make 5~6 dockable windows display the contents from MS SQL, respectively. Please show me the simple example code.
|
|
Technical Support
|
Dec 1, 2005 - 7:52 AM
|
We have coded a sample application for you. Please download it and contact us in case of any questions.
|
|
Michael Chernikovsky
|
Nov 29, 2005 - 10:10 AM
|
How can I use png images instead of simple .bmp in my UI? First of all I interested in extended toolbar buttons.
|
|
Technical Support
|
Nov 30, 2005 - 12:52 PM
|
Thank you for the interesting question. Although Prof-UIS 2.50 does not support PNG images, Prof-UIS 2.51 (coming soon) will feature this including full transparency support for all Window OSes starting from Windows 95 / NT 4.0 (as you know no AlphaBlend() API is available in these old OSes). You can download a test sample that demonstrates the fully PNG-based UI.
|
|
Thomas Roeder
|
Nov 25, 2005 - 8:24 AM
|
Hello, I’m using CExtGridWnd in my dialog. I have to apply some logic after user has finished edit the cell. Is there some way to get a notification message in my dialog box window procedure? Or there is another way to handle this? I’ll appreciate some example of sourcecode. Thanks.
|
|
Thomas Roeder
|
Nov 25, 2005 - 3:01 PM
|
Hi, Thanks for the prompt responce. The first method works just fine for me.
|
|
Technical Support
|
Nov 25, 2005 - 11:36 AM
|
You need to declare a CExGridWnd -derived class and override the CExtGridWnd::OnGridCellInputComplete() virtual method in it. It is called when in-place editing is complete and the cell value has been changed. virtual void OnGridCellInputComplete(
CExtGridCell & _cell,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
HWND hWndInputControl = NULL
);
void CMyGridWnd::OnGridCellInputComplete(
CExtGridCell & _cell,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
HWND hWndInputControl // = NULL
)
{
ASSERT_VALID( this );
ASSERT_VALID( (&_cell) );
.....
.....
.....
} You can also use derived cell classes with the overridden CExtGridCell::OnInplaceControlTextInputComplete() virtual method, which is also called when in-place editing is complete. virtual void OnInplaceControlTextInputComplete(
HWND hWndInplaceControl,
CExtGridWnd & wndGrid,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
__EXT_MFC_SAFE_LPCTSTR sTextNew,
bool bSaveChanges
);
void CExtGridCell::OnInplaceControlTextInputComplete(
HWND hWndInplaceControl,
CExtGridWnd & wndGrid,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
__EXT_MFC_SAFE_LPCTSTR sTextNew,
bool bSaveChanges
)
{
ASSERT_VALID( this );
ASSERT( hWndInplaceControl != NULL && ::IsWindow(hWndInplaceControl) );
ASSERT_VALID( (&wndGrid) );
hWndInplaceControl;
wndGrid;
nVisibleColNo;
nVisibleRowNo;
nColNo;
nRowNo;
nColType;
nRowType;
sTextNew;
if( bSaveChanges )
{
TextSet( sTextNew );
CExtGridDataProvider & _DataProvider = wndGrid.OnGridQueryDataProvider();
_DataProvider.SortOrderUpdate( true, &wndGrid );
_DataProvider.SortOrderUpdate( false, &wndGrid );
CPoint ptFocus = wndGrid.FocusGet();
if( ptFocus.x >= 0 )
wndGrid.EnsureVisibleColumn( ptFocus.x );
if( ptFocus.y >= 0 )
wndGrid.EnsureVisibleRow( ptFocus.y );
}
wndGrid.OnGridCellInplaceControlTextInputComplete(
*this,
hWndInplaceControl,
nVisibleColNo,
nVisibleRowNo,
nColNo,
nRowNo,
nColType,
nRowType,
sTextNew,
bSaveChanges
);
if( bSaveChanges )
{
.....
.....
.....
}
}
|
|
Neville Franks
|
Nov 24, 2005 - 1:40 PM
|
Hi, I’m using a CExtBarColorButton toobar button using the same code as in your StyleEditor sample app. I want to separate out the action performed when the users clicks the icon and when the click the drop down arrow. At present clicking on either one drops down the color pallete. Instead what I want is when the user clicks on the icon I apply the current color and the color pallete window *does not* appear. If they click on the drop down arrow the color pallete window works as in the sample app. How can I do this? Also is there a way to specify the colors used in the color pallete drop down window? Thanks, Neville
|
|
Technical Support
|
Nov 26, 2005 - 10:56 AM
|
Yes, the StyleEditor sample application features simple drop-down buttons. To add a separate drop-down part on the right of the button, just find the following lines in the CMainFrame::OnCreate() method in the sample pCmdItem = g_CmdManager->CmdGetPtr( pApp->m_pszProfileName, ID_SE_TEXT_COLOR );
pCmdItem->StateSetColor();
pCmdItem->StateSetColorBtnDefault();
pCmdItem->StateSetColorBtnCustom();
pCmdItem->StateSetNoRotateVL();
//pCmdItem->StateSetSeparatedDD(); and uncomment the last line. Then please remove the HKEY_CURRENT_USER\Software\Foss\StyleEditor registry key, under which the application state is stored, build the StyleEditor project and run it. The text color button should now have a separate drop-down part and act as you described. It is also possible to set up a custom color palette, dimension and size for the color button. This is demonstrated in the ProfUIS_Controls sample application (starting from version 2.50). For instance, you can invoke a context menu over the Popup Menus page to see four different color picker menus there. The CPagePopupMenus::OnContextMenu() method in the ProfUIS_Controls sample application handles the WM_CONTEXTMENU standard windows message and initializes color picker menus in the context menu. Initialization of each color popup menu invokes the methods below: 1) CExtPopupColorMenuWnd::RemoveAllColors() removes the color palette entries initialized by default. 2) CExtPopupColorMenuWnd::SetColorsInRow() sets the number of color buttons in each line. 3) CExtPopupColorMenuWnd::AddColor() appends the color button to the color picker menu. To customize the color pickers in your application, please handle the CExtPopupMenuWnd::g_nMsgPrepareOneMenuLevel registered windows message. This message is sent by each popup menu sublevel before it appears on the screen. You should use the following message map entry and handler method:
ON_REGISTERED_MESSAGE(
CExtPopupMenuWnd::g_nMsgPrepareMenuOneLevel,
OnExtMenuPrepareOneLevel
)
LRESULT CMainFrame::OnExtMenuPrepareOneLevel(WPARAM wParam, LPARAM lParam)
{
lParam;
CExtPopupMenuWnd::MsgPrepareMenuData_t * pData =
reinterpret_cast
< CExtPopupMenuWnd::MsgPrepareMenuData_t * >
( wParam );
ASSERT( pData != NULL );
CExtPopupMenuWnd * pPopup = pData->m_pPopup;
ASSERT( pPopup != NULL );
CExtPopupColorMenuWnd * pColorPopup =
DYNAMIC_DOWNCAST( CExtPopupColorMenuWnd, pPopup );
if( pColorPopup != NULL )
{
CExtCustomizeCmdTreeNode * pNode = pColorPopup->_CmdNodeGet()
ASSERT_VALID( pNode );
if( pNode->GetCmdID(false) == ID_YOUR_COLOR_COMMAND )
{
pColorPopup->RemoveAllColors();
// TO-DO: INITIALIZE COLOR PALETTE HERE
. . .
}
return TRUE;
}
|
|
George Ross
|
Nov 24, 2005 - 1:45 AM
|
Hi If you try to remove all property stores from CExtPropertyGridComboBoxBar you get an assertin error. The problem,i think, is in CExtPropertyGridComboBoxBar::AssertValid() in ASSERT( GetCount() == m_arrPropertyStores.GetSize() ); GetCount() calls also the AssertValid() that way enters an infinite loop. PSE check it!! regards George
|
|
Technical Support
|
Nov 24, 2005 - 5:48 AM
|
Please update the source code for the following method in the .../Prof-UIS/Src/ExtPropertyGridWnd.cpp file: bool CExtPropertyGridComboBoxBar::PropertyStoreRemove(
INT nPos // = -1 // if -1 - remove all
)
{
ASSERT_VALID( this );
if( nPos < 0 )
{
m_arrPropertyStores.RemoveAll();
if( GetSafeHwnd() != NULL )
ResetContent();
return true;
}
if( nPos >= PropertyStoreGetCount() )
{
ASSERT( FALSE );
return false;
}
DeleteString( UINT(nPos) );
m_arrPropertyStores.RemoveAt( nPos );
return true;
} The problem should not occur after that.
|
|
Thomas Roeder
|
Nov 22, 2005 - 3:37 PM
|
Hi, How can I make a read-only column in the grid(CExtGridWnd)? Thanks.
|
|
Thomas Roeder
|
Nov 23, 2005 - 9:50 AM
|
pCellVariant->ModifyStyle( __EGCS_READ_ONLY | __EGCS_NO_INPLACE_CONTROL);
|
|
Technical Support
|
Nov 23, 2005 - 11:55 AM
|
Yes, to make any CExtGridCell object (including all the derived cell classes) non-editable, just apply the __EGCS_READ_ONLY cell style to make the in-place editor control read-only. You can apply __EGCS_NO_INPLACE_CONTROL to disable activation of the in-place editor control at all.
|
|
Thomas Roeder
|
Nov 22, 2005 - 3:32 PM
|
Hi, I’m using a grid (CExtGridWnd), but the header cutting-off the bottom part of some letters from title. How can I increase the height of the grid header? Thanks.
|
|
Technical Support
|
Nov 24, 2005 - 12:08 PM
|
There are two methods in the CExtGridBaseWnd class: OuterColumnWidthSet() and OuterRowHeightGet() . The first changes the width (in pixels) of the outer column on the left or right side and the second changes the height (in pixels) of the outer row at the top or bottom side. Here is the sample code which increases the height of the header row by 5 pixels: INT nHeight =
m_wndGrid.OuterRowHeightGet(
true, // bTop
0, // nRowNo
false // bZeroIfNoColumns
);
m_wndGrid.OuterRowHeightSet(
true, // bTop
0, // nRowNo,
nHeight + 5
);
m_wndGrid.OnSwUpdateScrollBars();
m_wndGrid.OnSwDoRedraw();
|
|
Michael Valentine
|
Nov 22, 2005 - 4:23 AM
|
Hi, I am trying to get ctrl-c and ctrl-v working to allow me to cut and paste data between grid cells. The popup menu with the cut and paste options works correctly, however the shortcut keys (ctrl-c and ctrl-v) do not. They seem to work ok on the Prof-UIS PropertyGrid sample and I am not sure what I need to do my app to make them work. I suspect that my main menu accelerators for ctrl-c and ctrl-v are interfering with the commands before the property grid gets a chance to get the messages. Ideally, what I would like would be for the copy and paste options on my main menu to be enabled/disabled depending on if the current cell data can be copied and/or pasted. Is this possible to do, maybe on an ON_UPDATE_COMMAND_UI message? My property grid is located on a CExtCommandBar, which is attached to the CMainFrame. I have tried overriding the OnCmdMsg function in my command bar dialog to route the message ID_EDIT_COPY to the property grid but I just cannot get it to work correctly. Any suggestions would be much appreciated! Thanks
|
|
Technical Support
|
Nov 23, 2005 - 12:09 PM
|
Could you send us a project that reproduces the problem?
|
|
Thomas Roeder
|
Nov 21, 2005 - 10:20 AM
|
Hi, I want to use the data grid(CExtGridWnd) in my dialog. Could you please send me a simple project. Some columns should be read only. Cells new/changed values should be checked on the specified range. Thanks.
|
|
Technical Support
|
Nov 21, 2005 - 10:40 AM
|
We sent you a simple sample (shows how to use the grid on the dialog) by e-mail.
|
|
Srinivasan Natarajan
|
Nov 19, 2005 - 12:38 AM
|
HI, The tooltip sample message was working fine. we would like to know whether is there a way to display the message on any window (CView or any other)? email:sundar@cynaptix.com regards sundar
|
|
Srinivasan Natarajan
|
Nov 21, 2005 - 2:34 AM
|
Hi, I tried to display it on the View , when the View is maximised i am not able to see the tooltip message . I would like to see the tooltip message on the mouse pointer location. How to achieve this ? regards sundar
|
|
Technical Support
|
Nov 21, 2005 - 12:22 PM
|
To help you, we coded a simple MDI application. The view window in the MDI child frame window draws a small red rectangle. You can see a balloon tip over it. Please download the sample project from here. The source code is very simple. We added the following members to the CTestView view class: CExtPopupMenuTipWnd m_wndCoolTip;
CRect m_rcToolRect; The m_rcToolRect member specifies location of the red rectangle. It is initialized in the constructor: CTestView::CTestView()
: m_rcToolRect( 50, 50, 100, 100 )
{
// TODO: add construction code here
} The CTestView::OnDraw() virtual method draws the red rectangle: void CTestView::OnDraw(CDC* pDC)
{
CTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
pDC->FillSolidRect( &m_rcToolRect, RGB(255,0,0) );
}
Finally, we have added the WM_MOUSEMOVE message handler to make cool tip window working:
void CTestView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if( m_rcToolRect.PtInRect( point ) )
{
if( m_wndCoolTip.GetSafeHwnd() == NULL
|| (m_wndCoolTip.GetStyle()&WS_VISIBLE) == 0
)
{
CRect rcTrack = m_rcToolRect;
ClientToScreen( &rcTrack );
m_wndCoolTip.SetText( "cooltip" );
m_wndCoolTip.Show( this, rcTrack );
}
}
else
m_wndCoolTip.Hide();
CView::OnMouseMove(nFlags, point);
}
|
|
Technical Support
|
Nov 20, 2005 - 10:18 AM
|
What we demonstrated you in the dialog sample you had requested works over any window. So, let us know more details on you application (MDI, SDI, etc) and windows you would like to show tooltips over?
|
|
ki okju
|
Nov 18, 2005 - 3:46 AM
|
I use v2.50. This code make assert error " m_pCombo->PropertyStoreRemove(-1); " I read T-S forum. and I found same case. <TABLE style="BORDER-TOP: #aaaaaa 2px solid; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=6 width="100%" border=0> <TBODY> <TR> <TD>
</TD> <TD noWrap> George Ross</TD></TR></TBODY></TABLE> Please solve this problem.
|
|
Technical Support
|
Nov 18, 2005 - 12:20 PM
|
Please update the source code for the CExtPropertyGridComboBoxBar::PropertyStoreRemove() method in the ExtPropertyGridWnd.cpp file: bool CExtPropertyGridComboBoxBar::PropertyStoreRemove(
INT nPos // = -1 // if -1 - remove all
)
{
ASSERT_VALID( this );
if( nPos < 0 )
{
m_arrPropertyStores.RemoveAll();
if( GetSafeHwnd() != NULL )
ResetContent();
return true;
}
if( nPos >= PropertyStoreGetCount() )
{
ASSERT( FALSE );
return false;
}
DeleteString( UINT(nPos) );
m_arrPropertyStores.RemoveAt( nPos );
return true;
}
|
|
ki okju
|
Nov 20, 2005 - 10:35 PM
|
I edited that and recompiled lib & dll files. but same assert error come from.
|
|
Technical Support
|
Nov 21, 2005 - 11:41 AM
|
We have used the PropertyGrid sample to reproduce the bug. We just invoked the following code from the CMainDlg::OnAbout() method which handles a click on the About hyper-link button in the main dialog window: void CMainDlg::OnAbout()
{
//#ifndef __EXT_MFC_NO_PROF_UIS_ABOUT_DIALOG
// VERIFY( ProfUISAbout() );
//#endif // #ifndef __EXT_MFC_NO_PROF_UIS_ABOUT_DIALOG
CExtPropertyGridComboBoxBar * pCombo =
STATIC_DOWNCAST(
CExtPropertyGridComboBoxBar,
m_PGC.GetChildByRTC(
RUNTIME_CLASS(
CExtPropertyGridComboBoxBar
)
)
);
ASSERT_VALID( pCombo );
pCombo->PropertyStoreRemove();
} Before fixing the PropertyStoreRemove() method as described in our previous message, this CMainDlg::OnAbout() method had caused an assertion. After updating the PropertyStoreRemove() method and building Prof-UIS, the problem does not occur anymore. So, we need your sample project in which this problem still persists.
|
|
Krustys Donuts
|
Nov 16, 2005 - 7:27 AM
|
If you have a page that contains something like this:
+----------------------------+
| Static Text |
+----------------------------+
| |
| |
| |
| |
| CListBox |
| |
| |
| |
| |
+----------------------------+
| Static Text |
+----------------------------+
| |
| |
| |
| |
| CListBox |
| |
| |
| |
| |
+----------------------------+
and the application starts up *not* maximized, when you expand this page, the redrawing isn’t quite right, and looks like this:
+----------------------------+
| Static Text |
+----------------------------+
| |
| |
| |
| |
| CListBox |
| |
| |
| |
| |
+----------------------------+
| Static Text |
+----------------------------+
| |
| |
| |
| |
| CListBox |
| Static Text here, too! |
| |
| |
| |
+----------------------------+
If you click on another caption, then back on this one, then it redraws properly. If you maximize the application and restart such that it starts maximized, it redraws properly. However, I just ran into another interesting behavior that may be related to the style bug that I just reported. If I have the following style bits set, it behaves as above:
__EPCWS_CAPTION_HOVER | __EPCWS_CAPTION_TOOLTIPS | __EPCWS_CAPTION_CENTER_TEXT |
__EPCWS_SINGLE_EXPANDED | __EPCWS_SINGLE_FULL_SIZE
But if I have the following style bits set:
__EPCWS_CAPTION_HOVER | __EPCWS_CAPTION_TOOLTIPS | __EPCWS_CAPTION_CENTER_TEXT |
__EPCWS_SINGLE_EXPANDED | __EPCWS_SINGLE_FULL_SIZE | __EPCWS_NOT_ALL_CONTRACTED
the static text appears in the CListBox area regardless of the number of times I click on various captions when the application is maximized *and* not maximized. The strange thing about it is that the static text appears *twice*, rather than just being drawn once in the incorrect location.
|
|
Technical Support
|
Nov 16, 2005 - 11:15 AM
|
Please invoke the CExtPageContainerWnd::Create() method and specify the WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS flags in its dwWindowStyle parameter. The overlapping effect should be fixed.
|
|
Krustys Donuts
|
Nov 16, 2005 - 11:36 AM
|
Unfortunately, this did not fix the problem...
|
|
Technical Support
|
Nov 16, 2005 - 12:10 PM
|
Could you modify the PageContainer sample application to reproduce the problem and then send it to us?
|
|
Krustys Donuts
|
Nov 16, 2005 - 7:13 AM
|
Originally, I was using the __EPCWS_SINGLE_EXPANDED and __EPCWS_SINGLE_FULL_SIZE style bits. I then decided that I wanted to use __EPCWS_NOT_ALL_CONTRACTED. When I did this, the pages started to animate when clicked on, which is what I don’t want. I then checked the docs for __EPCWS_NO_EXPAND_ANIMATION, and it says that this is the same as (__EPCWS_SINGLE_EXPANDED|__EPCWS_SINGLE_FULL_SIZE|__EPCWS_NOT_ALL_CONTRACTED). However, that isn’t the case, because I use those style bits already, and it’s animating.
Here is the exact style I’m using:
__EPCWS_CAPTION_HOVER | __EPCWS_CAPTION_TOOLTIPS | __EPCWS_CAPTION_CENTER_TEXT |
__EPCWS_SINGLE_EXPANDED | __EPCWS_SINGLE_FULL_SIZE | __EPCWS_NOT_ALL_CONTRACTED
|
|
Technical Support
|
Nov 16, 2005 - 11:19 AM
|
The __EPCWS_NOT_ALL_CONTRACTED style does nothing if the__EPCWS_SINGLE_FULL_SIZE and __EPCWS_SINGLE_EXPANDED styles are turned on. Please run the PageContainer sample application. The first three check boxes inside the Page Container Options group box correspond to the __EPCWS_SINGLE_EXPANDED , __EPCWS_SINGLE_FULL_SIZE and __EPCWS_NOT_ALL_CONTRACTED styles. If the first and the second are checked, then the third one does not affect the page container’s layout.
|
|
Krustys Donuts
|
Nov 16, 2005 - 11:49 AM
|
Sorry, I should have just said "this looks like a documentation error". Here’s what the docs say:
__EPCWS_NO_EXPAND_ANIMATION
Do not perform a MS-Outlook(R)-like expand animation (__EPCWS_SINGLE_EXPANDED|__EPCWS_SINGLE_FULL_SIZE|__EPCWS_NOT_ALL_CONTRACTED).
I interpreted this to mean that if you have those three style bits set, the __EPCWS_NO_EXPAND_ANIMATION doesn’t need to be set. However, it still does. If I use this style bit, everything works as expected. On another note, you said that if the first and second checkboxes are checked in the test app, the third does not affect the container’s layout. When I ran it and tried it, clicking the third checkbox clearly had an effect on the behavior of the page captions.
|
|
Krustys Donuts
|
Nov 15, 2005 - 10:44 PM
|
I’d like my page container to notify my application when a user expands one of the page dialogs. I tried to override OnPageContainerCaptionPressedStop and simply use the pPageInfo parameter, but that parameter doesn’t necessarily provide the information that I need (which page is expanded). So I went ahead and implemented it as follows:
void MyExtPageContainerWnd::OnPageContainerCaptionPressedStop( CExtPageContainerWnd::PAGE_ITEM_INFO* pPageInfo)
{
CExtPageContainerWnd::OnPageContainerCaptionPressedStop( pPageInfo);
TRACE( "%s\n", pPageInfo->TextGet());
LONG numChevrons = PageGetCount();
for( LONG i=0; i<numChevrons; i++) {
CExtPageContainerWnd::PAGE_ITEM_INFO* pInfo = PageGetInfo( i);
if( !pInfo->IsExpanded())
continue;
TRACE( "%s\n", pInfo->TextGet());
}
}
I’m using this override as a trigger to determine that the user has clicked on a caption, and then the loop attempts to determine which page is expanded. However, it doesn’t seem to work correctly.
For example, let’s say there are three captions: "donut1", "donut2", and "donut3", and "donut1" is initially expanded. If I press down the left mouse button on "donut1", and then release over "donut2", my code correctly identifies "donut1" as the expanded page. However, if I click normally, things don’t work. In the same example, if I were to click on "donut2", it would say that "donut1" was expanded. Then if I click on "donut1", it will say that "donut2" is expanded. It’s always one page behind.
Can you please help me identify the bug, if any?
|
|
Technical Support
|
Nov 16, 2005 - 11:10 AM
|
The CExtPageContainerWnd::OnPageContainerItemExpanded() virtual method is invoked when a page gets expanded/contracted. The CExtPageContainerWnd::OnPageContainerItemExpanding() virtual method is invoked immediately before the page becomes expanded/contracted and returns a flag which indicates whether the page can be expanded/contracted. So, this allows you to fully control the process.
|
|
Krustys Donuts
|
Nov 16, 2005 - 11:53 AM
|
Thanks... can you please add this to the documentation? The v2.40 help file doesn’t have this method listed, and the v2.50 archive doesn’t have a new help file in it.
|
|
Technical Support
|
Nov 19, 2005 - 12:22 PM
|
The Prof-UIS 2.50 archive (available on www.prof-uis.com/download.aspx) contains help files (both help 1.x and help 2.x) in the Help folder. You can also download the chm file from here. The methods in question are available in these help files.
|
|
Dmitry Kostromin
|
Nov 14, 2005 - 9:33 AM
|
if I set mode "time" of this type of cell, drop-down button dont’care displayed. And I can choose any date , but i set mode to "only time". It’s a bug?
|
|
Technical Support
|
Nov 14, 2005 - 11:29 AM
|
No, this is not a bug. Just remove the drop-down button: pCell->ModifyStyle( 0L, __EGCS_BUTTON_DROPDOWN );
|
|
Dmitry Kostromin
|
Nov 15, 2005 - 12:52 AM
|
Ok, then why no spin button of time inplace control or DOWNUP button in the cell? It’s not right that user must only edit it as text.
|
|
Technical Support
|
Nov 15, 2005 - 8:43 AM
|
The CExtGridCellDateTime inplace up-down button is not used in the cell mode because it is not consistent with the cell up-down buttons. So, we decided to hide it. Of course, we could add some property which controls whether the inplace up-down button should be used or not. Please note the user can also use the up/down arrows buttons and even mouse wheel to edit the date and time field and not only by editing the field directly as you said.
|
|
Eli Kaczer
|
Nov 11, 2005 - 5:46 PM
|
From the documentation, I found the following: CExtGridCell::IconIndexSet(), but it wasn’t clear to me on how it is implemented, or if it is what I need to automatically add an image in my cell.
|
|
Eli Kaczer
|
Nov 11, 2005 - 6:15 PM
|
Actually, I managed to get it to work, but if someone can let me know if this is the appropriate way, I would appreciate it. Here are the steps that I took: In my class derived from CExtPropertyGridCtrl, I provide a test function called: void LoadIcons() {
CExtPropertyGridWnd* pGridWnd = GetActiveGrid();
if (NULL != pGridWnd)
{
HICON hIcon = LoadIcon(NULL, IDI_HAND);
CExtCmdIcon icon(hIcon, true);
pGridWnd->GridIconInsert(&icon);
}
} then in my subsequent call to populate a grid cell: I call the function: CExtGridCell::IconIndexSet() with the desired icon that was populated from above
|
|
Technical Support
|
Nov 14, 2005 - 3:18 AM
|
You correctly use icons in grid cells. So, we will just make some remarks below. There are two ways of attaching an icon to the grid cell:
A) Keep a CExtCmdIcon object in the grid cell. This requires you to define a CExtGridCell -derived class and implement the CExtGridCell::IconGet() virtual method in it. But it is not good if in your grid there are many cells with the same icon.
B) Initialize an internal collection of icons in the grid window as you did and assign icon indexes to the grid cells.
|
|
Srinivasan Natarajan
|
Nov 11, 2005 - 7:27 AM
|
Hi, I tried to display a tooltip message (User friendly) message from CView when right click is invoked but it doesn’t show the tooltip message, could you help me ? void CSampleView::OnRButtonDown(UINT nFlags, CPoint point,BOOL bSelected) { CScrollView::OnRButtonDown(nFlags, point) ; CExtPopupMenuTipWnd m_pop; m_pop.SetText("test"); CRect rcAreaScreen ; rcAreaScreen.top =100; rcAreaScreen.left =100; rcAreaScreen.bottom =200; rcAreaScreen.right =200; this->ClientToScreen( &rcAreaScreen ); m_pop.Show( this, rcAreaScreen ); return; }
or any other method to display the user friendly message regards sundar
|
|
Srinivasan Natarajan
|
Nov 12, 2005 - 5:12 AM
|
Hi, I tried in the same way by declaring CExtPopupMenuTipWnd m_pop; in .h file. But still it doesn’t get displayed. Can you send some piece of code to sundar@cynaptix.com ? regards sundar
|
|
Technical Support
|
Nov 14, 2005 - 3:09 AM
|
We’ve just sent you a sample project by e-mail.
|
|
Technical Support
|
Nov 11, 2005 - 11:47 AM
|
You create the CExtPopupMenuTipWnd object on stack. The m_pop variable is local in the scope of CSampleView::OnRButtonDown() method. So, it is destroyed after the method completes. You need to create the CExtPopupMenuTipWnd object dynamically or declare it in the class declaration section.
|
|
Srinivasan Natarajan
|
Nov 11, 2005 - 5:25 AM
|
Hi, Is it possible to color the date cells in CExtDurationWnd (based on some condition) ? regards sundar
|
|
Technical Support
|
Nov 11, 2005 - 11:44 AM
|
Yes, it is possible. Just override the CExtDurationWnd::OnQueryItemTextColor() virtual method which returns a COLORREF value used for painting text of the specified field. In case of the background, please override the CExtDurationWnd::OnQueryItemBkColor() instead. These methods have the ITEM_INFO parameter which allows you to determine what field the color is requested for (the m_eItemType enum).
|
|
Dmitry Kostromin
|
Nov 10, 2005 - 5:05 AM
|
when I set style of my application CExtPaintManagerOffice2003 or CExtPaintManagerOffice2005, all profuis controls ( like buttons,comboboxes,...) looks equally (with gradients, hot frames,...), but CExtDurationWnd looks like standard windows checking. So the interface of my application looks not much well
|
|
Technical Support
|
Nov 10, 2005 - 6:14 AM
|
Unfortunately Prof-UIS doesn’t have any class that repaints the spin control. That is why the spin in the duration and date time controls looks like the standard button. Of course, we plan to include such a class into Prof-UIS. Please take a look at the picture below. The top image has the standard look, which is available now. The bottom image is what we plan to implement. Please let us know whether this is what you mean? 
|
|
Dmitry Kostromin
|
Nov 11, 2005 - 12:18 AM
|
Yes I meaning this. I very waiting your implementation. I hope it will be soon.
|
|
Technical Support
|
Nov 14, 2005 - 11:45 AM
|
We have good news for you. The CExtSpinWnd class is ready. It provides the basic functionality of the Windows spin control and can be used instead of CSpinButtonCtrl for displaying the spin according to the currently used paint manager. We also modified the CExtDurationWnd class as you requested. Please drop us an email message so we can tell how to download the update.
|
|
Andrew Harding
|
Nov 9, 2005 - 9:42 AM
|
Our project comprises an executable, a couple of MFC extension DLL’s and a few regular MFC DLL’s. All of these modules use Prof-UIS and the MFC extension DLL’s contain Prof-UIS sub-classed objects for use by the other DLL’s and executable. We have been having an inordinate number of state problems. Asserts are constantly triggering down in the MFC code due to these state problems. It is unclear how to integrate Prof-UIS into a project such as ours, there doesn’t seem to be much if any documentation to give us a direction. We have tried defining __PROF_UIS_FOR_REGULAR_DLL in the non-extension DLL’s. Is there something that we’re missing? How can we make Prof-UIS work with our project?
|
|
Technical Support
|
Nov 9, 2005 - 12:41 PM
|
You need to use the RDE version of Prof-UIS in your MFC regular DLL projects (like in ActiveX projects). These projects should have the __PROF_UIS_FOR_REGULAR_DLL preprocessor symbol defined in the project settings. Besides the RDE extension libraries (not only Prof-UIS as RDE) require an explicit initialization invocation from the regular DLL’s code. In case of Prof-UIS, invoke the following code from the InitInstance() virtual method of the CWinApp -derived class in your regular DLL project: CExt_ProfUIS_ModuleState::InitExtension(
AfxGetStaticModuleState()
); This is essential to let Prof-UIS RDE DLL know which MFC regular host is its owner. After that Prof-UIS will be able to manage MFC state correctly and you will not encounter any assertions. If you are also using ProfAuto RDE library, then initialize it too: CExt_ProfAuto_ModuleState::InitExtension(
AfxGetStaticModuleState()
);
|
|
Andrew Harding
|
Nov 10, 2005 - 9:18 AM
|
Ok, I defined __PROF_UIS_FOR_REGULAR_DLL in all of the regular MFC DLL’s and I called CExt_ProfUIS_ModuleState::InitExtension(AfxGetStaticModuleState()); in the InitInstance() of their corrisponding CWinApp objects. We’re still experiencing a lot of state assertions. I verified that we are calling AFX_MANAGE_STATE in the first line all of our exported functions. Is there a problem including Prof-UIS in an MFC Extension DLL that exports objects which are subclassed from Prof-UIS and then using those subclassed objects in other regular MFC DLL’s and Exe’s? In searching these message boards I found the following quote from a Prof-UIS rep. "You cannot use MFC-extension DLLs (like Prof-UIS) in other DLLs. The DLLs in question should only be used in EXE programs which, in turn, should also be based on MFC." The customers problem was not exactly like mine and so I’m not sure if this statement applies or not.
|
|
Technical Support
|
Nov 11, 2005 - 3:06 AM
|
Formerly, Prof-UIS could be used in EXE projects only. More than a year ago we added RDE configurations so that the users can use Prof-UIS in ActiveX/regular DLL projects. Besides, the Frame Features ActiveX control is an MFC extension DLL which instantiates lots of classes derived from Prof-UIS implemented in MBCS and UNICODE Prof-UIS RDE DLL modules. We debugged this ActiveX control with different applications and environments without having any assertions. The Frame Features can be used in Internet Explorer, Office VBA forms, Visual Basic 6.0, Visual J++ 6.0, Visual Basic / J# / C++ / C# .NET 2002 / .NET 2003 / 2005. Prof-UIS 2.50 includes a bug fix with tooltip assertions in toolbars, menus and tab window in RDE builds. We do not know any other assertion bugs and may guess the problem with using RDE in your application is hidden somewhere else. What about sending us some project that demonstrates the problems you mentioned so we can find out what’s wrong?
|
|
Andrew Harding
|
Nov 11, 2005 - 4:12 PM
|
I’ll see if I can re-create the problems we’re encountering in a dummy project that will be easier to send to you. Thank you for all the info so far.
|