Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
|
Subject |
Author |
Date |
|
|
Babenko Alexey
|
Jul 30, 2010 - 6:13 AM
|
CLabel class based on CStatic and has some additional functions like change text angle etc. CLabel m_sSuction; m_sSuction.SetFontName ("Arial", RUSSIAN_CHARSET);
m_sSuction.SetFontSize (10);
m_sSuction.SetFontItalic (TRUE);
m_sSuction.SetRotationAngle (90, TRUE);
m_sSuction.SetFontBold (TRUE);
m_sSuction.SetTextColor (RGB (0, 0, 127)); Like this. Is there any analog of CLabel class in prof-UIS? Thanks!
|
|
|
Technical Support
|
Jul 30, 2010 - 7:42 AM
|
This is a CExtLabel class in Prof-UIS.
|
|
|
Abhinandan Deka
|
Jul 29, 2010 - 12:17 PM
|
I installed Prof - UI 2.9 trial version, but unfortunately "msi.chm missing" error was given. After that I have restarted my PC and trying to run the Integration wizard. An error message like " A referal was returned from server" was given. Please help me to run the integration wizard.....
|
|
|
Technical Support
|
Jul 30, 2010 - 7:41 AM
|
The A referral was returned from server error is an internal UAC error of Windows Vista and Windows 7. This means UAC settings may be corrupted on your computer. Please run the Integration Wizard as Administrator. The msi.chm missing installation error occurs very rarely. It’s not critical. It can happen on computers where the MSI installations were debugged and, as a result, some of Windows Installer’s tables became corrupted.
|
|
|
Nicolas Pinaud
|
Jul 27, 2010 - 10:05 AM
|
Hello, At first, saddened for my English, but I am French... I use for the first time Prof-UIS 2.90 instead of Prof-UIS 2.85.
In the compilation, I obtain the following error : "error C2039: ’m_FontNormalVertX’: is not a member of ’CExtPaintManager’"
And effectively, I notice that ’m_FontNormalVertX’ is not member any more of CExtPaintManager. What may I make to correct this problem?
Is the variable ’m_FontNormal’ sufficient? What consequences on my project? Thank you in advance for your answer.
|
|
|
Nicolas Pinaud
|
Jul 27, 2010 - 10:56 AM
|
Ok, thanks for this answer. I look immediatly the RichContentFeatures sample application. Thanks again 
|
|
|
Technical Support
|
Jul 27, 2010 - 10:49 AM
|
Prof-UIS 2.89 and older versions (including 2.85): - The DrawText() Win32 API is used for painting horizontal text. - The ExtTextOut() Win32 API is used for painting vertical text. That’s why the paint manager’s m_FontNormalVertX property was present for keeping vertically oriented font handle.
Prof-UIS 2.90 and later versions does not use the Win32 text output APIs anymore. The HTML-based engine demonstrated in the new RichContentFeatures sample application is used for painting both horizontal and vertical text, both HTML and plain text (according to the classic DT_*** flags used by the DrawText() Win32 API), both Vista/7 text over glass with/without glow and simple text over non-glass window surface.
We don’t need to cache many font handles anymore. The m_FontNormalVertX paint manager’s property and other vertically font handles were removed in Prof-UIS 2.90. We recommend you to switch using new text output APIs demonstrated in the RichContentFeatures sample application. But if you need vertically oriented fonts, then you can simply re-create the m_FontNormal paint manager’s font via guerying its LOGFONT, changing font escapement and creating new vertically oriented font.
|
|
|
Nicolas Pinaud
|
Jul 27, 2010 - 10:58 AM
|
Sorry for the mistake  So, i begin again... Ok, thanks for this answer. I look immediatly the RichContentFeatures sample application. Thanks again 
|
|
|
Aleksander Hribšek
|
Jul 26, 2010 - 5:34 AM
|
I have a FixedSingle Form with disabled ControlBox. I can resize it. Is this a bug or am I missing something?
|
|
|
Zoltan Bokor
|
Jul 22, 2010 - 5:37 AM
|
There is a problem in Prof-UIS 2.89 when you click on the Custom Color.. in the color selector drop down window.
|
|
|
Technical Support
|
Jul 23, 2010 - 4:27 AM
|
We cannot reply your e-mail. The mail server returned the following report: Delivery failed 3 attempts: ***your***e-mail***address***here*** SMTP connection failed Please drop us an e-mail from some other address.
|
|
|
Technical Support
|
Jul 22, 2010 - 6:40 AM
|
Thank you for reporting this issue. We already fixed it. Please drop us an e-mail to the support mail box at this web site and we will provide you with the source code update.
|
|
|
Zoltan Bokor
|
Jul 22, 2010 - 6:09 AM
|
This is also the same in Prof-UIS 2.90
|
|
|
Nitin Gahlaut
|
Jul 21, 2010 - 8:16 AM
|
Hi, How can i check whether "Group by" is enabled/activated for any column on grid corntol. Thanks & Regards
|
|
|
Technical Support
|
Jul 21, 2010 - 8:48 AM
|
Here is the code snippet demonstrating how to check whether report grid is grouped:
CExtReportGridWnd * pRGW = . . .
CExtReportGridSortOrder & rgso = pRGW->ReportSortOrderGet();
LONG nCountOfGrouppingColumns = rgso.ColumnGroupCountGet();
bool bReportGridIsGroupped = ( nCountOfGrouppingColumns > 0L ) ? true : false;
Please note, the CExtReportGridWnd class is derived from the CExtTreeGridWnd class. The CExtReportGridItem* pointers can be used as HTREEITEM tree row handles in invocations of the CExtTreeGridWnd class methods. If the report grid control is NOT grouped, then all the tree rows are leaf rows without children. Only the group rows in the report grid control contain children rows. The group rows are completely re-created during re-grouping. I.e. HTREEITEM handles and CExtReportGridItem* pointers of all the group rows are NOT permanent. The data row handles and CExtReportGridItem* pointers are permanent and your app can keep them for using in particular methods.
|
|
|
Keyur Bhatnagar
|
Jul 12, 2010 - 8:42 AM
|
Hi, I have a lot of Control Bars in my application. I am trying to bring up a control bar when i recieve an event associated with it. I used the following approaches:- 1. Call the ShowControlBar() in my CFrameWnd class, but then if the control bar is already on the top, it dissapears for a second and then comes back. 2. If i use the controlbar’s BringWindowTpTop() it comes to the top but if the control bar is docked with some other control bars, only the dilog comes to the top and the selected Tab and the caption does not change. Can anyone help me with this? Thanks in Advance. -Keyur
|
|
|
Keyur Bhatnagar
|
Jul 12, 2010 - 12:06 PM
|
The above code only works when the control bar is not displayed. If it iss displayed the code hides it, also if it is docked, it removes the tab.
|
|
|
Technical Support
|
Jul 13, 2010 - 3:26 AM
|
You are using toolbar style commands for resizable control bars. I.e. each resizable control bar related command switches the bar visibility. This means you should check whether the bar is visible before sending WM_COMMAND message. The CControlBar::IsVisible() API checks visibility of single control bar which is not in the tabbed group of bars and not auto-hidden. Which Prof-UIS version are you using? Whether the tabbed bar groups are present in your app? The auto-hiding feature should be disabled in your app because it requires Visual Studio .NET / 2005 / 2008 / 2010 style of resizable bar commands when each command only shows and focuses resizable bar. Generally, the control bar activation code should look like:
#if ( ! defined __EXT_MFC_NO_TAB_CONTROLBARS )
#if ( ! defined __EXT_CONTROLBAR_TABBED_FEATURES_H )
#include <../Src/ExtControlBarTabbedFeatures.h>
#endif
#endif
. . .
CFrameWnd * pMainFrame = . . .
CExtControlBar * pBar = . . .
UINT nBarDlgCtrlID = UINT( pBar->GetDlgCtrlID() );
bool bBarActivated = false;
#if ( ! defined __EXT_MFC_NO_TAB_CONTROLBARS )
if( pBar->AutoHideModeGet() )
{
pMainFrame->SendMessage( WM_COMMAND, WPARAM(nBarDlgCtrlID) );
bBarActivated = true;
}
else
{
CExtDynTabControlBar * pTabBar = _GetNearestTabbedContainer();
if( pTabBar != NULL )
{
LONG nSelectedTabNo = pTabBar->GetSwitcherSelection();
if( nSelectedTabNo >= 0L )
{
CExtControlBar * pSelectedBar = pTabBar->GetBarAt( nSelectedTabNo );
if( LPOVID(pBar) == LPVOID(pSelectedBar) )
{
CWnd * pWndBarChild = pBar->GetWindow( GW_CHILD );
if( pWndBarChild->GetSafeHwnd() != NULL )
pWndBarChild->SetFocus();
bBarActivated = true;
}
}
}
}
#endif
if( ! bBarActivated )
{
if( ! pBar->IsVisible() )
pMainFrame->SendMessage( WM_COMMAND, WPARAM(nBarDlgCtrlID) );
else
{
CWnd * pWndBarChild = pBar->GetWindow( GW_CHILD );
if( pWndBarChild->GetSafeHwnd() != NULL )
pWndBarChild->SetFocus();
}
bBarActivated = true;
}
return bBarActivated;
|
|
|
Technical Support
|
Jul 12, 2010 - 11:39 AM
|
The following code activates any resizable control bar in any state and brings it to top:
CFrameWnd * pMainFrame = . . .
CExtControlBar * pBar = . . .
pMainFrame->SendMessage( WM_COMMAND, WPARAM(pBar->GetDlgCtrlID()) );
|
|
|
Nitin Gahlaut
|
Jul 10, 2010 - 6:57 AM
|
Hi, I have used one of your recommended soution (give by you under subject "CExtReportGridWnd column header alignment") Please see the below algo. Override CExtReportGridWnd::ReportColumnAdjustTextAlignmentH() function. ReportColumnAdjustTextAlignmentH()
{ //Get the style of the Cell or Columns (as per requirement)
align = GetStyle();
CExtReportGridWnd::ReportColumnAdjustTextAlignmentH(pRGC, align, RedrawFlag); //Then update the Header alignment
CExtGridCell *Cell = GridCellGetOuterAtTop(ColNum, RowNum, RUNTIME_CLASS( CExtGridCellHeader ));
Cell->ModifyStyle(__EGCS_TA_***);
}
This algorithms is working fine and changing the header alignment as per ModifyStyle() and cell alignment as per alignment variable (“align” in above code). But I observed some issues Issue 1: When right click on header->Alignment, it always shows selected alignment type is “Center” doesn’t matter whether cells are left/right aligned. I want alignment option as per cells’ aliment bases instead of columns. So any solution for this? Issue 2: Changed alignment (say left or right) and reopen the application. Gird resets the last saved alignment style to default.
I observed that GetStyle (in above algo) is returning a junk value. I also tried to used GetStyleEx() function but it is always retuning 0.
So can you please tell me how can I get the correct style value or how I can I restore last saved alignment style.
Thanks in advance.
|
|
|
Technical Support
|
Jul 12, 2010 - 2:21 AM
|
You should use the CExtGridCell::ModifyStyle() API for changing text alignment. The text alignment is specified using the following style flags: #define __EGCS_TA_HORZ_BY_TYPE 0x00000000L
#define __EGCS_TA_HORZ_LEFT 0x00000001L
#define __EGCS_TA_HORZ_RIGHT 0x00000002L
#define __EGCS_TA_HORZ_CENTER 0x00000003L
#define __EGCS_TA_HORZ_MASK 0x00000003L
This means you should remove the previous alignment flags by removing the __EGCS_TA_HORZ_MASK masked flags. In other words, you should invoke the CExtGridCell::ModifyStyle() API with two paramenters: CExtGridCell * pCell = . . .
pCell->ModifyStyle( __EGCS_TA_HORZ_RIGHT, __EGCS_TA_HORZ_MASK );
|
|
|
Bart Kampers
|
Jul 5, 2010 - 4:48 AM
|
Hello, I try to clear a corner cell in a CExtGridWnd by invoking GridCellSet(0, 0, NULL, 1, 1, -1, -1, false). This causes an assertion failure because of the following code in ExtGridWnd.cpp at line 53903
if( nColType < 0 )
{
if( nRowType != 0 )
{
// only one of nColType, nRowType may be non-zero
ASSERT( FALSE );
Why is it wrong for both nRowType and nColType to be non-zero?
How can I clear the corner cell?
Thanks in advance,
Bart.
|
|
|
Technical Support
|
Jul 5, 2010 - 12:14 PM
|
Thank you for reporting this issue. Here is the fix: bool CExtGridWnd::GridCellSet(
LONG nColNo,
LONG nRowNo,
const CExtGridCell * pCell, // = NULL // NULL - clear (make empty)
LONG nColCount, // = 1L
LONG nRowCount, // = 1L
INT nColType, // = 0 // -1 - nColNo is fixed column at left, 1 - at right, 0 - data cell
INT nRowType, // = 0 // -1 - nRowNo is fixed column at top, 1 - at bottom, 0 - data cell
bool bRedraw // = true
)
{
__EXT_DEBUG_GRID_ASSERT_VALID( this );
if( nColNo < 0L || nRowNo < 0L || nColCount < 0L || nRowCount < 0L )
{
// invalid cell position
//__EXT_DEBUG_GRID_ASSERT( FALSE );
return false;
} // if( nColNo < 0L || nRowNo < 0L || nColCount < 0L || nRowCount < 0L )
if( nColCount == 0L || nRowCount == 0L )
{
if( bRedraw )
{
OnSwUpdateScrollBars();
OnSwDoRedraw();
} // if( bRedraw )
return true;
} // if( nColCount == 0L || nRowCount == 0L )
LONG nEffectiveColNo = nColNo;
LONG nEffectiveRowNo = nRowNo;
if( nColType < 0 )
{
LONG nOuterColCountLeft = CExtGridBaseWnd::OuterColumnCountLeftGet();
if( nColNo >= nOuterColCountLeft )
{
// invalid cell position
__EXT_DEBUG_GRID_ASSERT( FALSE );
return NULL;
}
} // if( nColType < 0 )
else if( nColType > 0 )
{
LONG nOuterColCountRight = CExtGridBaseWnd::OuterColumnCountRightGet();
if( nColNo >= nOuterColCountRight )
{
// invalid cell position
__EXT_DEBUG_GRID_ASSERT( FALSE );
return NULL;
}
LONG nOuterColCountLeft = CExtGridBaseWnd::OuterColumnCountLeftGet();
nEffectiveColNo += nOuterColCountLeft;
} // else if( nColType > 0 )
else
{
LONG nInnerColCount =
(SiwScrollTypeVGet() == __ESIW_ST_VIRTUAL)
? LONG( OnGridQueryDataProvider().CacheColumnCountGet() )
: ColumnCountGet()
;
if( nColNo >= nInnerColCount )
return NULL; // invalid cell position
LONG nOuterColCountLeft = CExtGridBaseWnd::OuterColumnCountLeftGet();
LONG nOuterColCountRight = CExtGridBaseWnd::OuterColumnCountRightGet();
LONG nEffectiveShift = nOuterColCountLeft + nOuterColCountRight;
nEffectiveColNo += nEffectiveShift;
} // else from else if( nColType > 0 )
if( nRowType < 0 )
{
LONG nOuterRowCountTop = CExtGridBaseWnd::OuterRowCountTopGet();
if( nRowNo >= nOuterRowCountTop )
{
// invalid cell position
__EXT_DEBUG_GRID_ASSERT( FALSE );
return NULL;
}
} // if( nRowType < 0 )
else if( nRowType > 0 )
{
LONG nOuterRowCountBottom = CExtGridBaseWnd::OuterRowCountBottomGet();
if( nRowNo >= nOuterRowCountBottom )
{
// invalid cell position
__EXT_DEBUG_GRID_ASSERT( FALSE );
return NULL;
}
LONG nOuterRowCountTop = CExtGridBaseWnd::OuterRowCountTopGet();
nEffectiveRowNo += nOuterRowCountTop;
} // else if( nRowType > 0 )
else
{
LONG nInnerRowCount =
(SiwScrollTypeVGet() == __ESIW_ST_VIRTUAL)
? LONG( OnGridQueryDataProvider().CacheRowCountGet() )
: RowCountGet()
;
if( nRowNo >= nInnerRowCount )
return NULL; // invalid cell position
LONG nOuterRowCountTop = CExtGridBaseWnd::OuterRowCountTopGet();
LONG nOuterRowCountBottom = CExtGridBaseWnd::OuterRowCountBottomGet();
LONG nEffectiveShift = nOuterRowCountTop + nOuterRowCountBottom;
nEffectiveRowNo += nEffectiveShift;
} // else from else if( nRowType > 0 )
CExtGridDataProvider & _DataProvider = OnGridQueryDataProvider();
bool bRetVal = _DataProvider.CellRangeSet( ULONG(nEffectiveColNo), ULONG(nEffectiveRowNo), ULONG(nColCount), ULONG(nRowCount), pCell, true );
__EXT_DEBUG_GRID_ASSERT( bRetVal );
if( bRedraw )
{
OnSwUpdateScrollBars();
OnSwDoRedraw();
} // if( bRedraw )
return bRetVal;
}
|
|
|
HP Jiang
|
Jun 28, 2010 - 11:40 PM
|
hi, I want to change the font of default button in CExtMsgBox::DoMsgBox(). In default, the default button text is bold under certain skin theme if using the profskin.dll staff. how is the solution? thanks
|
|
|
Technical Support
|
Jun 30, 2010 - 7:58 AM
|
The PaintPushButton() virtual method can also be used in your task.
|
|
|
Technical Support
|
Jun 29, 2010 - 9:57 AM
|
You can use your paint manager class which overrides the CExtPaintManager::PaintPushButtonText() virtual method:
void CExtPaintManager::PaintPushButtonText(
CDC & dc,
CRect & rcCaption,
CExtPaintManager::PAINTPUSHBUTTONDATA & _ppbd
)
The CExtPaintManager::PAINTPUSHBUTTONDATA::m_hFont parameter allows you to specify the desired font. The CExtPaintManager::PAINTPUSHBUTTONDATA::m_pHelperSrc parameter can be a pointer to CExtButton object. This means you can detect button windows.
|
|
|
HP Jiang
|
Jun 29, 2010 - 10:50 PM
|
CExtPaintManager::PaintPushButtonText can not be called back. but, void PaintPushButton() can be called back.
I am using prof-uis 2.88 version.
thanks
Jiang Haipeng
|
|
|
Nitin Gahlaut
|
Jun 25, 2010 - 5:32 AM
|
Hi, My application has some grids. I have added some flags (TRUE/FALSE) in the registry which indicates whether I need to create/show a grid or not. I am saving these grid/window profile in registry under “HKEY_CURRENT_USER\Software\%sSectionNameCompany%\%sSectionNameProfile%” (i.e. ProfUIS\ Profiles\<ProductName>\ ControlBar\block_0x00000000) using “ProfileBarStateSave” API on closing the application. Similarly I am reading this profile in “OnCreate” while opening the application from registry using "ProfileBarStateLoad" API. Now before launching the application if I change the flag TRUE to FALSE (i.e. do not show the grid in next execution) and now if I launch the application then there is no girds on the screen. When I again restart the application then application displays the grids on menu selection properly. Can you please suggest me the resolution? (I need to edit saved profile as per regidtry flags before launching the application.) Thanks & Regards,
|
|
|
Technical Support
|
Jun 25, 2010 - 10:27 AM
|
The CExtControlBar::ProfileBarState***() methods require the same control bars created in your main frame window. Otherwise the bar states cannot be loaded successfully. If some control bar with a grid should be optionally invisible for your users, then you can force hide it after state loading and make it inaccessible by setting its CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property to false. You can also switch using dynamic resizable control bars (CExtDynamicControlBar) which are controlled by the dynamic bar site (CExtDynamicBarSite). The dynamic bar site supports variable count of dynamic control bars.
|
|
|
li heartice
|
Jun 24, 2010 - 3:38 AM
|
I used CGfxListCtrl like this CGfxColumnManager * pManager = m_wndList.CreateColumnManager();
pManager->DefineColumn(0, "", NULL, LVCFMT_LEFT, 0,fhNumeric);
pManager->DefineColumn(1, "No.", NULL, LVCFMT_LEFT, 80,fhNumeric);
pManager->DefineColumn(2, "Station", NULL, LVCFMT_LEFT, 150, fhEdit);
pManager->DefineColumn(3, "Address", NULL, LVCFMT_LEFT, 120,fhEdit);
pManager->DefineColumn(4, "Port", NULL, LVCFMT_LEFT, 150,fhEdit);
pManager->DefineColumn(5, "IP", NULL, LVCFMT_LEFT, 150, fhEdit);
pManager->DefineColumn(6, "Location", NULL, LVCFMT_LEFT, 150, fhComboBox);
pManager->DefineColumn(7, "Topology", NULL, LVCFMT_LEFT, 150, fhComboBox);
pManager->DefineColumn(8, "Type", NULL, LVCFMT_LEFT, 150, fhComboBox);
int _DEFCOLS[] = { 0,1,2,3,4,5,6,7,8};
pManager->DefineDefaultColumns(sizeof(_DEFCOLS)/sizeof(int), _DEFCOLS);
m_wndList.SetupColumnData();
CString sql,str;
m_adoMainTable.m_pDatabase=&m_db;
sql = "select * from MainTable";
TRY
{
m_adoMainTable.Open();//(CRecordset::dynaset ,sql);
if(m_adoMainTable.IsOpen())
{
m_adoMainTable.Requery();
if(!m_adoMainTable.IsEOF())//empty ?
{
m_adoMainTable.MoveFirst();
m_strCorpName=m_adoMainTable.m_CorpName;
m_nSaveCyc=m_adoMainTable.m_SaveTime;
}
}
m_wndList.OnInit();
m_wndList.ModifyFlag(0,fHighRowSelect|fVertGrid|fHorizGrid|fAutoSort,0);
CManagerApp *pApp=(CManagerApp *) AfxGetApp();
m_wndList.m_bEnableEdit=pApp->m_curUser.bConfig>0?1:0;
m_wndList.SetItemCount(MAX_STATIONNUM);
m_wndList.SetItemHeight(20);
int row=0;
m_adoStationTable.m_pDatabase=&m_db;
sql = "select * from StationTable";
m_adoStationTable.Open(CRecordset::dynaset ,sql);
if(m_adoStationTable.IsOpen())
{
m_adoStationTable.Requery();
int num= 0;
if(!m_adoStationTable.IsEOF())//empty ?
{
m_adoStationTable.MoveFirst();
num=m_adoStationTable.GetRecordCount();
}
m_wndList.SetRedraw(false);
m_wndList.BindRecordset(&m_adoStationTable);
m_wndList.SetExInfoCallback((long (CWnd::*)(LXHDREX *))&CDlgSysConfig::GetExInfoCallback);
m_wndList.FillRecordsetColumn();
m_adoRegionTable.m_pDatabase=&m_db;
sql = "select * from RegionTable";
m_adoRegionTable.Open(CRecordset::snapshot,sql);
if(m_adoRegionTable.IsOpen())
{
m_adoRegionTable.Requery();
VERIFY(m_wndList.LinkRecordset("Layout", &m_adoRegionTable , "RegionName", "RegionName",false));
}
m_adoTopologyTable.m_pDatabase=&m_db;
sql = "select * from TopologyTable";
m_adoTopologyTable.Open(CRecordset::snapshot,sql);
if(m_adoTopologyTable.IsOpen())
{
m_adoTopologyTable.Requery();
VERIFY(m_wndList.LinkRecordset("TopologyName", &m_adoTopologyTable , "TopologyName", "TopologyName",true));
}
m_wndList.FillRecordsetItems();
m_wndList.SetRedraw(true);
}
}But when I run it and double click on the cell that has fhComboBox type,the code stoped. BOOL CWnd::OnNotify(WPARAM, LPARAM lParam, LRESULT* pResult)
{
ASSERT(pResult != NULL);
NMHDR* pNMHDR = (NMHDR*)lParam;
HWND hWndCtrl = pNMHDR->hwndFrom; // get the child ID from the window itself
UINT nID = _AfxGetDlgCtrlID(hWndCtrl);
int nCode = pNMHDR->code; ASSERT(hWndCtrl != NULL);
ASSERT(::IsWindow(hWndCtrl)); //it stoped here if (_afxThreadState->m_hLockoutNotifyWindow == m_hWnd)
return TRUE; // locked out - ignore control notification // reflect notification to child window control
if (ReflectLastMsg(hWndCtrl, pResult))
return TRUE; // eaten by child AFX_NOTIFY notify;
notify.pResult = pResult;
notify.pNMHDR = pNMHDR;
return OnCmdMsg(nID, MAKELONG(nCode, WM_NOTIFY), ¬ify, NULL);
}
So I trace it form OnLButtonDblClk. void CGfxInCombo::OnLButtonDblClk(UINT nFlags, CPoint point)
{
CWnd::OnLButtonDblClk(nFlags, point);
// ClientToScreen(&point);
NMHDR nh; //this is a local var
nh.hwndFrom = GetParent()->GetSafeHwnd();
nh.idFrom = GetParent()->GetDlgCtrlID();
nh.code = NM_DBLCLK;
GetParent()->GetParent()->PostMessage(WM_NOTIFY, GetParent()->GetDlgCtrlID(), (LPARAM) &nh);
}
I go on trace and find the Address of "nh" was be changed at CExtNcFrameImpl::NcFrameImpl_PreWindowProc. bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )
{ //Stop here,the method init vars
m_bNcFrameImpl_RestoreBorder = false;
Then, How can I face to it?
|
|
|
li heartice
|
Jun 28, 2010 - 2:39 AM
|
E~,It’s that,My Dialog "class CDlgSysConfig :" is inherit from "public CExtNCW < CExtResizableDialog > ". CGfxInCombo is a child of CGfxCtrlList,and the CGfxCtrlList is a List Control of CDlgSysConfig which is inherit from "public CExtNCW < CExtResizableDialog > ". when I Double click the CGfxInCombo,I Send a WM_NOTIFY to CDlgSysConfig(the parent’s parent of the CGfxInCombo). then I was tracing the code,I find that: In the class of "CExtNCW < CExtResizableDialog >",the virtual method "virtual WindowProc( UINT message, WPARAM wParam, LPARAM lParam )" take me to run "bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )" first,in that method,when it init its local parameters,the last Parameter(the local var nh) of the WM_NOTIFY message has been coverd,
(I Tracing the address of CGfxInCombo’s local var "nh" and find it changed at
bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )
{ //Stop here,the method init vars
m_bNcFrameImpl_RestoreBorder = false;
)
when it run to my OnNotify Method "BOOL CDlgSysConfig::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) " ,the parameters has been changed yet and assert false.
|
|
|
Technical Support
|
Jun 28, 2010 - 10:30 AM
|
This is a really interesting task. The CExtNcFrameImpl::NcFrameImpl_PreWindowProc() method does not handle the WM_NOTIFY message and it cannot change your message’s parameters. Could you create some test project demonstrating this problem and send it to the support mail box at this web site?
|
|
|
li heartice
|
Jun 28, 2010 - 9:55 PM
|
I try to create a sample about this problem. First I create a simple dialog with vs6.0,and chage the parent of mydialog form CDialog to CExtNCW < CExtResizableDialog >,then I run it. A message dialog show that: "User breakpoint called from code at 0x********" I find the debug window show message too: "Second Chance Assertion Failed: File E:\bakef\vs6pro\Test624\Prof-UIS\Src\ExtPaintManager.cpp, Line 264" What happend? And how do I deal with it?
|
|
|
li heartice
|
Jun 29, 2010 - 2:32 AM
|
As a see the FAQ,I add the wizard on my vs6.0 and create a sample(a very simple test project). When I double click the item in my list control,it assert again. I have send the test project to support email, the subject is "the WM_NOTIFY message doesn’t work correctly". Please check the email and I expect for your help.
|
|
|
Technical Support
|
Jun 30, 2010 - 8:31 AM
|
The problem is in the CMyListCtrl::OnLButtonDblClk() method:
GetParent()->PostMessage(WM_NOTIFY, GetDlgCtrlID(), (LPARAM) &nh);
That code posts a WM_NOTIFY message and passes a pointer to a local stack variable ( nh). This is an error. You should use the following instead: GetParent()->SendMessage(WM_NOTIFY, GetDlgCtrlID(), (LPARAM) &nh);
|
|
|
li heartice
|
Jun 30, 2010 - 7:28 PM
|
CGfxListCtrl and CGfxInCombo are parts of a Third-party control named gfxlist.I used it in my project,and it post but not send the WM_NOTIFY message to mydialog,then it bring me into this problem,I search for the author of the gfxlist first but no result,so I turn to our site for help. I can only change the source code of the gfxlist to solve it. Now,I know it’s not caused by our product but the gfxlist control,thanks.Best regards.
|
|
|
li heartice
|
Jun 28, 2010 - 2:39 AM
|
E~,It’s that,My Dialog "class CDlgSysConfig :" is inherit from "public CExtNCW < CExtResizableDialog > ". CGfxInCombo is a child of CGfxCtrlList,and the CGfxCtrlList is a List Control of CDlgSysConfig which is inherit from "public CExtNCW < CExtResizableDialog > ". when I Double click the CGfxInCombo,I Send a WM_NOTIFY to CDlgSysConfig(the parent’s parent of the CGfxInCombo). then I was tracing the code,I find that: In the class of "CExtNCW < CExtResizableDialog >",the virtual method "virtual WindowProc( UINT message, WPARAM wParam, LPARAM lParam )" take me to run "bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )" first,in that method,when it init its local parameters,the last Parameter(the local var nh) of the WM_NOTIFY message has been coverd,
(I Tracing the address of CGfxInCombo’s local var "nh" and find it changed at
bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )
{ //Stop here,the method init vars
m_bNcFrameImpl_RestoreBorder = false;
)
when it run to my OnNotify Method "BOOL CDlgSysConfig::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) " ,the parameters has been changed yet and assert false.
|
|
|
Technical Support
|
Jun 29, 2010 - 9:58 AM
|
We received your e-mail. Please check if you may have forgotten to add the res subfolder of your test project into the ZIP file.
|
|
|
li heartice
|
Jun 29, 2010 - 6:41 PM
|
I have repack it and send it with the subject "the WM_NOTIFY message doesn’t work correctly 2" yet,please check it,thanks.
|
|
|
li heartice
|
Jun 28, 2010 - 2:39 AM
|
E~,It’s that,My Dialog "class CDlgSysConfig :" is inherit from "public CExtNCW < CExtResizableDialog > ". CGfxInCombo is a child of CGfxCtrlList,and the CGfxCtrlList is a List Control of CDlgSysConfig which is inherit from "public CExtNCW < CExtResizableDialog > ". when I Double click the CGfxInCombo,I Send a WM_NOTIFY to CDlgSysConfig(the parent’s parent of the CGfxInCombo). then I was tracing the code,I find that: In the class of "CExtNCW < CExtResizableDialog >",the virtual method "virtual WindowProc( UINT message, WPARAM wParam, LPARAM lParam )" take me to run "bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )" first,in that method,when it init its local parameters,the last Parameter(the local var nh) of the WM_NOTIFY message has been coverd,
(I Tracing the address of CGfxInCombo’s local var "nh" and find it changed at
bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )
{ //Stop here,the method init vars
m_bNcFrameImpl_RestoreBorder = false;
)
when it run to my OnNotify Method "BOOL CDlgSysConfig::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) " ,the parameters has been changed yet and assert false.
|
|
|
li heartice
|
Jun 28, 2010 - 2:38 AM
|
E~,It’s that,My Dialog "class CDlgSysConfig :" is inherit from "public CExtNCW < CExtResizableDialog > ". CGfxInCombo is a child of CGfxCtrlList,and the CGfxCtrlList is a List Control of CDlgSysConfig which is inherit from "public CExtNCW < CExtResizableDialog > ". when I Double click the CGfxInCombo,I Send a WM_NOTIFY to CDlgSysConfig(the parent’s parent of the CGfxInCombo). then I was tracing the code,I find that: In the class of "CExtNCW < CExtResizableDialog >",the virtual method "virtual WindowProc( UINT message, WPARAM wParam, LPARAM lParam )" take me to run "bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )" first,in that method,when it init its local parameters,the last Parameter(the local var nh) of the WM_NOTIFY message has been coverd,
(I Tracing the address of CGfxInCombo’s local var "nh" and find it changed at
bool CExtNcFrameImpl::NcFrameImpl_PreWindowProc( LRESULT & lResult, UINT message, WPARAM wParam, LPARAM lParam )
{ //Stop here,the method init vars
m_bNcFrameImpl_RestoreBorder = false;
)
when it run to my OnNotify Method "BOOL CDlgSysConfig::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) " ,the parameters has been changed yet and assert false.
|
|
|
li heartice
|
Jun 27, 2010 - 11:58 PM
|
|
|
|
|
Technical Support
|
Jun 25, 2010 - 3:21 AM
|
The CGfxListCtrl control is not part of Prof-UIS. We can help you only if you create some test project with this control for us.
|
|
|
Kevin Murray
|
Jun 22, 2010 - 12:59 PM
|
Missing ProfUIS290m.dll file. K.
|
|
|
Technical Support
|
Jun 22, 2010 - 1:26 PM
|
Thank you. Fixed. Uploading...
|
|
|
Bart Kampers
|
Jun 17, 2010 - 5:49 AM
|
<table style="border-collapse: collapse; border-top: #d5d5d5 1px solid" id="MessagesTable" border="0" cellspacing="0" cellpadding="6" width="100%"> <tbody> <tr> <td style="padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" colspan="3">
Hello, I have an additional question about the thread "CExtGridWnd in virtual mode" which seems to be read-only: Is it also possible to use virtual mode for grids not representing a database table, for instance a very large array of strings? Creating a lot of CExtGridCells takes a lot of time. Matbe it is better to create cells as soon as they get visible. Is that possible stil having the possibility to order columns. Is there some example to do this? Thanks in advance.
Hello,
Is it possible to make a "CExtGridWnd List" like this?
http://www.codeproject.com/listctrl/virtuallist.asp </td> </tr> <tr> <td> </td> <td style="white-space: nowrap; font-weight: bold"> Technical Support </td> <td style="white-space: nowrap"> Nov 7, 2006 - 1:05 PM </td> </tr> <tr> <td style="padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" colspan="3"> Reply Yes, this is fully supported in the Prof-UIS grid. The solution is based on coding a CExtGridDataProviderRecordSet-derived class and implementing all the abstract methods. The cacheable and virtual grid windows are demonstrated in the AdoRecordsetView sample. Open the recordset options dialog and specify database connection settings and an SQL Query. Now you can click OK to see the results in the grid window. There is a check box in the recordset options dialog: Use Virtual Mode. If it is checked, data are displayed in the virtual mode. If it is unchecked, the simple cacheable mode is used instead. In fact, both modes are based on caching. This means the grid window keeps only data records which are visible on the screen. But simple cacheable mode is based on a database recordset with a known number of rows in the query result and you can see the vertical scrollbar that is working classically. The virtual mode is based on a recordset with an unknown number of rows. The vertical scrollbar in the virtual mode can have only three states: top, middle and bottom. The virtual database recordset knows only the current record position and whether the current record at this position is the first and/or last record in the returned table. This explains the meaning of the grid virtual mode and the behavior of the scroll bar in this mode. The virtual mode can be used if the data base API supports only this kind of recordset or if you have a very large scrollable data range which often becomes updated dynamically. The Prof-UIS grid window supports the cacheable and/or virtual scrolling strategies in both horizontal and vertical directions even at the same time. So, scrolling an unlimited data source is not a problem. </td> </tr> </tbody> </table>
|
|
|
Bart Kampers
|
Jun 25, 2010 - 9:06 AM
|
Thank you. Very nice! Stilt tow questions: - Is it possible to hide the scrollbars when they aer not needed? Most of the time the data to show is very large, but sometimes it is small. - Is there a smart way to sort colums or do I have to sort the provided data first?
|
|
|
Technical Support
|
Jun 25, 2010 - 11:50 AM
|
The CExtScrollWnd::OnSwHasScrollBar() and CExtScrollWnd::OnSwCanAutoHideScrollBar() virtual methods allow you to control the behavior and persistent visibility or invisibility of scroll bars. The virtually cacheable grids do not support sorting. Your code should sort externally stored data or query some external database to return sorted data. Although it’s possible to enable sorting in virtually cacheable grids and make it displaying sort arrows, your code should handle the header cell clicks and perform sorted data reloading using the CExtScrollItemWnd::SiwFireCacheChanging() API.
|
|
|
Borremans Pierre
|
Jun 24, 2010 - 3:16 AM
|
Is it possible to use this virtual mode and printing all data ?
|
|
|
Technical Support
|
Jun 25, 2010 - 3:20 AM
|
The printing and print preview is supported for virtually cacheable grid controls with a known row count. The print preview subsystem simply scrolls the invisible grid control to let it upload the grid cells before they become printed. The printing and print preview is NOT supported for virtually cacheable grid controls with an unknown row count.
|
|
|
Technical Support
|
Jun 19, 2010 - 11:45 AM
|
Yes, it’s possible to use the virtually cached mode without databases. Yes, it’s possible to make the virtually cached grid editable. But please note: the virtually cached grid does not know where the real data is stored and you will need to handle the end-of-editing cell events and manually save data were it should be saved too. First of all, we have the editable version of the AdoRecordsetView sample application:
http://www.prof-uis.com/download/forums/AdoRecordsetEdit.zip
And here is the simple cacheable grid based sample application similar to what you asked for:
http://www.prof-uis.com/download/forums/CacheableGrid2.zip
|
|
|
Stephan Wieland
|
Jun 17, 2010 - 2:49 AM
|
Hello, I have problems to add and remove nodes to or from RibbonBar dynamically. I tried so: void CMainFrame::UpdateRibbon(void)
{
int iNodes = 0;
... // Get Group...
CExtCustomizeCmdTreeNode * pRibbonNodeTabPageCollection = m_pRibbonNode->ElementAt(0);
CExtCustomizeCmdTreeNode * pRibbonNodeTabPage = pRibbonNodeTabPageCollection->ElementAt(0);
CExtCustomizeCmdTreeNode * pRibbonGroup = pRibbonNodeTabPage->ElementAt(1);
// remove all nodes from group
pRibbonGroup->RemoveAllNodes();
// get number of objects
int iCount = GetNumberObjects();
for(int i=0; i<iCount; i++)
{
CXObject* pObj = GetObjectAt(i);
if(pObj)
{
pRibbonGroup->InsertNode(
NULL,
CreateRibbonNode(pObj->m_strBez1, (char)(0x30+iNodes), IDX_START_OBJ+iNodes, IDX_START_OBJ, NULL)
);
iNodes++;
}
}
m_wndRibbonBar.SetButtons(NULL);
m_wndRibbonBar.SetButtons(m_pRibbonNode);
m_wndRibbonBar._RecalcPositionsImpl();
//m_wndRibbonBar.Ribbon_UpdateLayout();
CWnd::RepositionBars(0,0xFFFF,0);
m_wndRibbonBar.Invalidate();
} But there´s an assertion in SetButtons(NULL); Can you please help me? Best regards SW
|
|
|
Technical Support
|
Jun 19, 2010 - 11:46 AM
|
Your code modifies the nodes of an existing command tree which is already assigned to the ribbon bar. Then it invokes the m_wndRibbonBar.SetButtons(NULL); code which deletes ribbon bar buttons. Some of ribbon bar buttons contain references to the ribbon nodes which you already deleted before invoking the m_wndRibbonBar.SetButtons(NULL); code. So, you should invoke the m_wndRibbonBar.SetButtons(NULL); code first. Then modify the command tree. Finally, assign modified tree to the ribbon bar.
|
|
|
Art Wilkes
|
Jun 12, 2010 - 10:32 AM
|
Hi; Using CExtGridWnd how do you go about finding a cell cursor, and also a row cursor. I would like to make a default row for addition or deletion row. Also is there any way to tell if the grid or portions of the grid have been modified. I can just re-search the grid but that’s not very efficient. Thanks
|
|
|
Technical Support
|
Jun 14, 2010 - 9:55 AM
|
The CExtGridBaseWnd::FocusGet() method returns a location of the focused grid cell. If both row and column numbers are negative, then there is no focused cell. If you are using the full row focus/selection model, then only the row number is important. The CExtGridWnd::OnGridCellInputComplete() virtual method can be overridden to catch the cell modification event.
|
|
|
Nitin Gahlaut
|
Jun 7, 2010 - 7:52 AM
|
Hi,
I am using a Prof-UI’s grid control (derived from CExtReportGridWnd class). In the grid I am adding data through CExtReportGridColumn’s object using SetItemText(). CDRGridCellString *l_pCellStr = (CDRGridCellString*)m_GridCtrl.ReportItemGetCell(m_pRGCLoc, l_pRGI, RUNTIME_CLASS(CDRGridCellString));
l_pCellStrLoc->SetItemText("Xyz", colorRef); I want to know, is there any API which returns the index of last inserted row in the grid
If anybody knows then please let me know ASAP. Thanks
Nitin
|
|
|
Technical Support
|
Jun 7, 2010 - 11:19 AM
|
The CExtReportGridWnd report grid control is based on the CExtTreeGridWnd tree grid control The CExtReportGridItem* pointers can be used as HTREEITEM tree row handles. You can get plain row index of the CExtReportGridItem* report item using the CExtTreeGridWnd::ItemGetVisibleIndexOf() method. Please note, it’s not possible to get plain zero-based row index of tree/report rows which are under collapsed rows. The CExtTreeGridWnd::ItemGetVisibleIndexOf() method returns negative value in this case.
|
|
|
Seung Cheol Lee
|
Jun 6, 2010 - 9:05 PM
|
I used vs2008 style of prof-uis 2.85. After upgrading prof 2.89, I found that the vs2008 style of prof-uis 2.87/ 2.89 is different. I have to use previous vs2008 style of prof-uis 2.85. Did you have the way to use previous style ( vs2008 style of pro-uis 2.85). I think that the style is import item to end customer.
|
|
|
Technical Support
|
Jun 23, 2010 - 11:04 AM
|
Thank you for providing us with the screen shots. We adjusted VS2008 UI theme to provide the UI look which is closer to VS2008 look on the latest Windows versions. We did this because of customer requests. If you need more gray color theme, then please use the Office 2003 theme without native theme API colors (CExtPaintManagerOffice2003NoThemes).
|
|
|
Technical Support
|
Jun 7, 2010 - 6:44 AM
|
The VS 2008 style and Office 2003 was adjusted to fit the Visual Studio 2008 and Office 2003 look when running on Windows Vista and Windows 7. These styles should have the same unchanged look on Windows XP and Windows 2000. Please provide us with more information about what was changed and what you want to rollback?
|
|
|
Seung Cheol Lee
|
Jun 7, 2010 - 5:51 PM
|
I send the e-mail attached the presentation with screen shots. To : support@prof-uis.com Title : Problem of vs2008 style of prof-uis 2.85 / 2.87 / 2.89.
|
|
|
Seung Cheol Lee
|
Jun 20, 2010 - 5:30 PM
|
Could you tell me when to get the answer ot the problem.
|
|
|
Technical Support
|
Jun 21, 2010 - 12:08 PM
|
We replied your e-mail immediately. You can provide us with another e-mail answer if you didn’t received our reply yet. Or you can wait a few hours for Prof-UIS 2.90 release today.
|
|
|
Seung Cheol Lee
|
Jun 22, 2010 - 9:58 PM
|
I confirmed the problem at Prof-UIS 2.90. But the problem was not fixed If it is difficult to fix the problem, I’d like to know how to use VS2008 style at Prof-UIS 2.85. You can see the different thing between VS2008 style at Prof-UIS 2.85 and VS2008 style at Prof-UIS 2.87, 2.89. 2.90. I send the e-mailt attached the screen shots. To : support@prof-uis.com Title : Problem of vs2008 style of prof-uis 2.85 / 2.87 / 2.89 / 2.90 Could you check the e-mail.
|
|
|
Seung Cheol Lee
|
Jun 4, 2010 - 4:12 AM
|
At Visual Studio 2005/2008, the tile text color of the tab page is black to click the tab. But the title text color of the tab page at prof-uis style ( VS2005, VS 2008 ) is white. So it is difficult to see the title text of the tab page because the title color is white. I would like to know that there is the way to change the title text color to black.
|
|
|
Technical Support
|
Jun 8, 2010 - 12:06 PM
|
Thank you for providing the screen shots. We reproduced the white caption issue. To fix it, please update the source code for the following method: void CExtPaintManagerXP::PaintGripper(
CDC & dc,
CExtPaintManager::PAINTGRIPPERDATA & _pgd
)
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
CRect rectGripper( _pgd.m_rcGripper );
if( _pgd.m_bSideBar || _pgd.m_bFloating )
{
if( _pgd.m_bFlashCaptionHighlightedState )
{
ASSERT( _pgd.m_clrFlashCaptionBackground != COLORREF(-1L) );
ASSERT( _pgd.m_clrFlashCaptionText != COLORREF(-1L) );
dc.FillSolidRect( rectGripper, _pgd.m_clrFlashCaptionBackground );
} // if( _pgd.m_bFlashCaptionHighlightedState )
else
{
COLORREF clrGrip =
GetColor(
_pgd.m_bSideBar ? ( _pgd.m_bActive ? COLOR_HIGHLIGHT : XPCLR_3DFACE_DARK ) : COLOR_3DSHADOW,
_pgd.m_pHelperSrc,
_pgd.m_lParam
);
if( ! _pgd.m_bHelperNoFill )
dc.FillSolidRect( rectGripper, clrGrip );
if( _pgd.m_bSideBar
&& (!_pgd.m_bHelperNoFill)
&& (!_pgd.m_bFloating)
&& (!_pgd.m_bActive)
)
{ // rect border of docked bar caption like VS-.NET-7.0
COLORREF clrSideRect = GetColor( COLOR_3DSHADOW, _pgd.m_pHelperSrc, _pgd.m_lParam );
stat_PaintDotNet3dRect( dc, rectGripper, clrSideRect, clrSideRect );
} // rect border of docked bar caption like VS-.NET-7.0
} // else from // if( _pgd.m_bFlashCaptionHighlightedState )
int nTextLen = 0;
if( _pgd.m_sCaption != NULL
&& ( nTextLen = int(_tcslen(_pgd.m_sCaption)) ) > 0
&& (! _pgd.m_rcText.IsRectEmpty() )
&& _pgd.m_rcText.right > _pgd.m_rcText.left
&& _pgd.m_rcText.bottom > _pgd.m_rcText.top
)
{
e_paint_manager_name_t ePMN = OnQueryPaintManagerName();
e_system_theme_t eST = OnQuerySystemTheme();
COLORREF clrText = _pgd.m_bFlashCaptionHighlightedState;
if( ! _pgd.m_clrFlashCaptionText )
{
if( ( ePMN == Office2003 || ePMN == Studio2005 )
&& g_PaintManager.m_bIsWinVistaOrLater
)
clrText = GetColor( COLOR_BTNTEXT, _pgd.m_pHelperSrc, _pgd.m_lParam );
else if( _pgd.m_bActive || (! _pgd.m_bSideBar) )
clrText = GetColor(
( ( ePMN == Office2003 || ePMN == Studio2005 ) && ( eST == ThemeLunaSilver ) ) ? COLOR_WINDOW : COLOR_HIGHLIGHTTEXT,
_pgd.m_pHelperSrc, _pgd.m_lParam
);
else
clrText = GetColor( COLOR_BTNTEXT, _pgd.m_pHelperSrc, _pgd.m_lParam );
}
// COLORREF clrText =
// _pgd.m_bFlashCaptionHighlightedState
// ? _pgd.m_clrFlashCaptionText
// : (
// ( _pgd.m_bActive || (! _pgd.m_bSideBar) )
// ? GetColor(
// ( ( ePMN == Office2003 || ePMN == Studio2005 ) && ( eST == ThemeLunaSilver ) )
// ? COLOR_WINDOW : COLOR_HIGHLIGHTTEXT,
// _pgd.m_pHelperSrc, _pgd.m_lParam
// )
// : GetColor( COLOR_BTNTEXT, _pgd.m_pHelperSrc, _pgd.m_lParam )
// );
COLORREF clrOldText =
dc.SetTextColor(clrText);
int nOldBkMode = dc.SetBkMode( TRANSPARENT );
CFont * pCurrFont =
(! _pgd.m_bHorz)
? ( _pgd.m_bSideBar ? (&m_FontNormalBC) : (&m_FontBoldBC) )
: ( _pgd.m_bSideBar ? (&m_FontNormalVertXBC) : (&m_FontBoldVertXBC) )
;
CFont * pOldFont = dc.SelectObject( pCurrFont );
if( !_pgd.m_bHorz )
{ // if text is horizontal
bool bFloatingFixedBar = false;
UINT nDtAlign = _pgd.m_bForceRTL ? DT_RIGHT : DT_LEFT;
if( _pgd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtMiniDockFrameWnd) ) )
{
CExtControlBar * pBar = ((CExtMiniDockFrameWnd *)_pgd.m_pHelperSrc)->GetControlBarExt( false );
if( pBar != NULL && pBar->IsFixedMode() )
bFloatingFixedBar = true;
}
if( bFloatingFixedBar )
{
CExtSafeString sCaption( _pgd.m_sCaption );
INT nAvailableWidth = _pgd.m_rcText.Width();
for( ; ; )
{
INT nWidth = stat_CalcTextWidth( dc, *pCurrFont, sCaption );
if( nAvailableWidth >= nWidth || sCaption.IsEmpty() )
break;
sCaption.Delete( sCaption.GetLength() - 1 );
}
if( sCaption.GetLength() > 0 )
DrawText( dc.m_hDC, sCaption, sCaption.GetLength(), (LPRECT)&_pgd.m_rcText, nDtAlign|DT_SINGLELINE|DT_VCENTER|DT_NOCLIP );
} // if( bFloatingFixedBar )
else
DrawText( dc.m_hDC, _pgd.m_sCaption, nTextLen, (LPRECT)&_pgd.m_rcText, nDtAlign|DT_SINGLELINE|DT_VCENTER|DT_END_ELLIPSIS );
} // if text is horizontal
else
{ // if text is vertical
LOGFONT lf;
::memset(&lf,0,sizeof(LOGFONT));
pCurrFont->GetLogFont(&lf);
int _cyHorzFont = abs(lf.lfHeight);
int _cyTextMargin = (_pgd.m_rcText.Width() - _cyHorzFont) / 2;
CRect rcString =
CRect(
CPoint( _pgd.m_rcText.left + _cyTextMargin - __ExtMfc_CXTEXTMARGIN, _pgd.m_rcText.bottom - __ExtMfc_CYTEXTMARGIN ),
_pgd.m_rcText.Size()
);
rcString.DeflateRect( 2, 2 );
CRect rcExclude;
rcExclude.SetRect(
_pgd.m_rcGripper.left,
_pgd.m_rcGripper.top,
_pgd.m_rcGripper.right,
_pgd.m_rcText.top
);
dc.ExcludeClipRect( &rcExclude );
rcString.OffsetRect( -2, -3 );
DrawText( dc.m_hDC, _pgd.m_sCaption, nTextLen, rcString, DT_SINGLELINE|DT_NOCLIP|DT_NOPREFIX ); // don’t forget DT_NOCLIP
dc.SelectClipRgn( NULL );
} // if text is vertical
dc.SelectObject( pOldFont );
dc.SetBkMode( nOldBkMode );
dc.SetTextColor( clrOldText );
}
} // if( _pgd.m_bSideBar || _pgd.m_bFloating )
else
{
COLORREF clrGrip = GetColor( CLR_3DFACE_OUT, _pgd.m_pHelperSrc, _pgd.m_lParam );
CRect rcGripToClear( _pgd.m_rcGripper );
rcGripToClear.DeflateRect( 1, 1 );
if( _pgd.m_pHelperSrc != NULL
&& _pgd.m_pHelperSrc->IsKindOf( RUNTIME_CLASS(CExtToolControlBar) )
&& ((CControlBar*)_pgd.m_pHelperSrc)->m_pDockSite != NULL
&& ((CExtToolControlBar*)_pgd.m_pHelperSrc)->m_bForceNoBalloonWhenRedockable
)
{
}
else
dc.FillSolidRect( rcGripToClear, clrGrip );
CPen pen;
pen.CreatePen( PS_SOLID, 1, GetColor( XPCLR_GRIPPER, _pgd.m_pHelperSrc, _pgd.m_lParam ) );
CPen * pOldPen = dc.SelectObject( &pen );
if( _pgd.m_bHorz )
{
rectGripper.DeflateRect( 4, 1, 6, 2 );
rectGripper.right = rectGripper.left + 5;
rectGripper.DeflateRect( 1, 0 );
CRect rcLine( rectGripper );
INT nLineCount = rectGripper.Height() / (1 + 1);
rcLine.top += rcLine.Height() - (1 + 1) * nLineCount;
rcLine.bottom = rcLine.top + 1;
for( INT nLine = 0; nLine < nLineCount; nLine++ )
{
dc.MoveTo( rcLine.left, rcLine.top + 1 );
dc.LineTo( rcLine.right, rcLine.bottom );
rcLine.OffsetRect( 0, 1 + 1 );
}
}
else
{
rectGripper.OffsetRect( 1, 0 );
rectGripper.DeflateRect( 1, 4, 2, 6 );
rectGripper.bottom = rectGripper.top + 5;
rectGripper.DeflateRect( 0, 1 );
CRect rcLine( rectGripper );
int nLineCount = rectGripper.Width() / (1 + 1);
rcLine.left += rcLine.Width() - (1 + 1) * nLineCount;
rcLine.right = rcLine.left + 1;
for( int nLine = 0; nLine < nLineCount; nLine++ )
{
dc.MoveTo( rcLine.left + 1, rcLine.top );
dc.LineTo( rcLine.right, rcLine.bottom );
rcLine.OffsetRect( 1 + 1, 0 );
}
} // else from if( _pgd.m_bHorz )
dc.SelectObject( pOldPen );
} // else from if( _pgd.m_bSideBar || _pgd.m_bFloating )
}
|
|
|
Technical Support
|
Jun 7, 2010 - 11:18 AM
|
We are sorry but in the case of Prof-UIS the title text color is also black. We suspect the issue you are reporting depends on the Windows version and desktop theme settings. Please provide us with additional information.
|
|
|
Seung Cheol Lee
|
Jun 7, 2010 - 6:24 PM
|
I send the additional information with screen shot. To : support@prof-uis.com Title : About title text color of the tab page. - VS2005, VS2008 style Could you confirm the e-mail.
|
|
|
Borremans Pierre
|
Jun 2, 2010 - 12:47 AM
|
Is it possible to change the header style when we show the print preview for a grid ? For example we want to change the font’s text only on the header
|
|
|
Technical Support
|
Jun 2, 2010 - 7:48 AM
|
The CExtGridCell::OnPaintBackground(), CExtGridCell::OnPaintForeground() and all the other CExtGridCell::OnPaint*** () are used both for painting grid window surface and enhanced windows metafiles for each printed/previewed paper page. All these methods have the DWORD dwHelperPaintFlags parameter which contains a set of __EGCPF_*** flags. The __EGCPF_PRINTER and __EGCPF_PRINT_PREVIEW flags allow you to know when the painting method is invoked for printing or previewing. If both these flags are absent, then the painting method is invoked for grid window surface. This means you can implement your own grid cells which generate different look on the screen and on the printer sufaces.
|
|