Subject |
Author |
Date |
|
Kevin Murray
|
Apr 21, 2009 - 10:27 AM
|
In our app using dynamic bars we have added some functionality such that if the window is integrated into the MDI area (your example says "Tabbed Document"), we added to the menu to have a Dock To option, which opens a popup containing the choices Left, Right, Top, and Bottom. The user can then choose one of these and the dynamic bar will dock to that side of the app. The docking is all accomplished using DockControlBarInnerOuter. That said, I have observed the following strange behavior. If the user has three or more things docked to the left side and stacked on top of each other (in the same circle), the user changes one of the items to the integrated state, then chooses (from our menu) to dock to a different side of the application (Dock to Right, for example), the bar will dock properly to the right, but the remaining items docked to the left will resize themselves, with some of the left side bars becoming so small as to be nearly invisible. If you were to drag the bar from the left to the right, all is good. If I make the bar integrated, then floating, the left side windows will resize again. If you drag the bar off the left to make it float, any further action is fine (integrate, redock, etc.). It is only when you go to the integrated state from the menu on the docked window do the problems arise... Any help would be greatly appreciated. K.
|
|
Technical Support
|
Apr 22, 2009 - 11:35 AM
|
If would be extremely interesting to get a test/compiled version of your application or screen shots of it to take a look what is really happen and how? How are you switching the bar from document mode into docked at top/bottom/left/right mode? At least we need to take a look at the source code performing this operations.
|
|
Kevin Murray
|
Apr 22, 2009 - 11:47 AM
|
As it turns out, I figured out at least what is causing the issue. When switching to the MDI window, we added some callback code so we could utilize our own MDI frame class. As part of the switch, we had a bit of code that told the dynamic bar to destroy itself. This causes the issue. If the bar doesn’t destroy, if we leave it alone (as your samples do, I believe), the resizing problem never occurs. So, it took some time to figure this out, but it appears we have to do some extra work to keep the bar around and reuse it if the user chooses to redock or float the window again. K.
|
|
tera tera
|
Apr 21, 2009 - 2:51 AM
|
Hello. A question I want to automatically display accelerator key information for "a tool tip". Is it impossible? The accelerator key which a user set.
I want to do it about this in the same way.
Thanks
|
|
Technical Support
|
Apr 22, 2009 - 11:30 AM
|
The CExtToolControlBar::IsDisplayShortcutKeysOnScreenTips() virtual method returns a flag indicating whether a screen tip should display a shortcut key. By default, this method simply returns the CExtToolControlBar::g_bToolbarShortcutKeysOnScreenTips global flag. So, you can simply invoke CExtToolControlBar::g_bToolbarShortcutKeysOnScreenTips = true;
|
|
tera tera
|
Apr 22, 2009 - 7:30 PM
|
It is a wonderful function. Thanks,
|
|
tera tera
|
Apr 20, 2009 - 6:44 PM
|
|
|
Technical Support
|
Apr 24, 2009 - 2:00 PM
|
This means the grid cell has the __EGCS_READ_ONLY basic cell style. If you want to disable in-place editing at all, you should use the __EGCS_NO_INPLACE_CONTROL basic cell style instead.
|
|
Technical Support
|
Apr 22, 2009 - 9:00 AM
|
Thank you for reporting this issue. We fixed it in the CExtGridInplaceEdit::WindowProc() method:
. . .
if( message == WM_KEYDOWN )
{
switch( INT(wParam) )
{
case VK_RETURN:
{
DWORD dwCellStyleEx = m_cell.GetStyleEx();
bool bCtrl = ( (::GetAsyncKeyState(VK_CONTROL)&0x8000) != 0 ) ? true : false;
if( (dwCellStyleEx&__EGCS_EX_WRAP_TEXT) == 0L
|| (!bCtrl)
)
{
_DoEndEdit( ( ( m_cell.GetStyle() & __EGCS_READ_ONLY ) == 0 ) ? true : false, UINT(wParam) ); // THIS LINE IS CHANGED
return 0L;
}
}
break;
case VK_ESCAPE:
_DoEndEdit( false, UINT(wParam) );
return 0L;
. . .
|
|
tera tera
|
Apr 22, 2009 - 7:21 PM
|
Hello. Please upload a revision in the Prof-FTP site.
Give my best regards
|
|
Technical Support
|
Apr 23, 2009 - 12:41 PM
|
|
|
tera tera
|
Apr 23, 2009 - 7:02 PM
|
Hello. When I click a cell , It is an Read Only Edit mode.
Is this specifications?
|
|
tera tera
|
Apr 20, 2009 - 6:46 PM
|
Please revise Prof(2009-04-18).zip
|
|
tera tera
|
Apr 20, 2009 - 1:39 AM
|
Hello. Hello. With 03-26 of prof-uis, only a bmp map was displayed.
However, in profuis2009-04-18, "String2" is displayed.
CExtRibbonNode * pNode =
new CExtRibbonNode( uiID , 0, NULL, 0, "" ); if ( uiIDLargeBmp != 0 ){
VERIFY( pNode->m_iconBig.m_bmpNormal.
LoadBMP_Resource( MAKEINTRESOURCE(uiIDLargeBmp ) ) );
pNode->m_iconBig.m_bmpNormal.Make32();
pNode->m_iconBig.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
} if ( uiIDSmallBmp != 0 ){
VERIFY( pNode->m_iconSmall.m_bmpNormal.
LoadBMP_Resource( MAKEINTRESOURCE( uiIDSmallBmp ) ) );
pNode->m_iconSmall.m_bmpNormal.Make32();
pNode->m_iconSmall.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
} {
CExtCustomizeCmdScreenTip *pCmdScreenTip;
pCmdScreenTip = new CExtCustomizeCmdScreenTip;
pCmdScreenTip->CaptionMainSet ( "String2" );
pCmdScreenTip->TextMainSet ( "String3" );
pNode->CmdScreenTipAttach( pCmdScreenTip );
pNode->CmdScreenTipSet ( pCmdScreenTip, true, false );
} pNode->RibbonILE_RuleRemoveEntriesByILV( TRUE, FALSE, TRUE ); if ( pRibbonGroup != NULL )
pRibbonGroup->InsertNode( NULL, pNode );
|
|
Technical Support
|
Apr 20, 2009 - 8:50 AM
|
Thank you for reporting this issue. Here is the fix: bool CExtCustomizeCmdTreeNode::Ribbon_InitCommandProfile(
CExtCmdProfile * pProfile,
bool bInit
)
{
ASSERT_VALID( this );
if( pProfile == NULL )
return false;
UINT nCmdIDi = GetCmdID( false );
UINT nCmdIDe = GetCmdID( true );
if( nCmdIDi == 0
&& nCmdIDe == 0
&& (! IsKindOf( RUNTIME_CLASS(CExtRibbonNodeTabPage) ) )
)
{
}
else
{
if( bInit )
{
CExtCmdItem * pCmdItemI = pProfile->CmdAllocPtr( nCmdIDi );
if( pCmdItemI == NULL )
{
pCmdItemI = pProfile->CmdGetPtr( nCmdIDi );
if( pCmdItemI == NULL )
return false;
} // if( pCmdItemI == NULL )
if( nCmdIDi == 0 )
nCmdIDi = pCmdItemI->m_nCmdID;
pCmdItemI->StateSetBasic();
CExtCmdItem * pCmdItemE = NULL;
pCmdItemI->m_sMenuText = m_strTextInMenu;
pCmdItemI->m_sToolbarText = m_strTextInToolbar;
if( nCmdIDi != nCmdIDe )
{
pCmdItemE = pProfile->CmdAllocPtr( nCmdIDe );
if( pCmdItemE == NULL )
{
pCmdItemE = pProfile->CmdGetPtr( nCmdIDe );
if( pCmdItemE == NULL )
return false;
} // if( pCmdItemE == NULL )
if( nCmdIDe == 0 )
pCmdItemE->m_sMenuText = m_strTextInMenu;
pCmdItemE->m_sToolbarText = m_strTextInToolbar;
nCmdIDe = pCmdItemE->m_nCmdID;
// pCmdItemE->StateSetBasic();
} // if( nCmdIDi != nCmdIDe )
else
nCmdIDe = nCmdIDi;
SetCmdID( nCmdIDi, false );
SetCmdID( nCmdIDe, true );
DWORD dwFlags = GetFlags();
if( (dwFlags&__ECTN_DYNAMIC_POPUP) != 0 )
pCmdItemI->StateSetDynamicPopup();
if( (dwFlags&__ECTN_TBB_SEPARATED_DROPDOWN) != 0 )
pCmdItemI->StateSetSeparatedDD();
if( (dwFlags&__ECTN_TBB_AUTOCHANGE_ID) != 0 )
pCmdItemI->StateSetAutochangeID();
if( (dwFlags&__ECTN_TBB_NO_ROTATE_VL) != 0 )
pCmdItemI->StateSetNoRotateVL();
if( (dwFlags&__ECTN_TBB_CANNOT_HIDE) != 0 )
pCmdItemI->StateSetCannotHide();
#if (!defined __EXT_MFC_NO_BUILTIN_TEXTFIELD)
if( (dwFlags&__ECTN_TBB_TEXT_FIELD) != 0 )
pCmdItemI->StateSetTextField();
if( (dwFlags&__ECTN_TBB_TF_NE) != 0 )
pCmdItemI->StateSetTextFieldNotEditable();
if( (dwFlags&__ECTN_TBB_COMBO) != 0 )
pCmdItemI->StateSetCombo();
if( (dwFlags&__ECTN_TBB_DATE) != 0 )
pCmdItemI->StateSetDate();
if( (dwFlags&__ECTN_TBB_RESIZABLE) != 0 )
pCmdItemI->StateSetResizable();
#endif // (!defined __EXT_MFC_NO_BUILTIN_TEXTFIELD)
if( (dwFlags&__ECTN_TBB_COLOR) != 0 )
pCmdItemI->StateSetColor();
if( (dwFlags&__ECTN_TBB_MCB_DEFAULT) != 0 )
pCmdItemI->StateSetColorBtnDefault();
if( (dwFlags&__ECTN_TBB_MCB_CUSTOM) != 0 )
pCmdItemI->StateSetColorBtnCustom();
if( (dwFlags&__ECTN_TBB_UNDO_REDO) != 0 )
pCmdItemI->StateSetUndoRedo();
if( (dwFlags&__ECTN_TBB_CTRL_VIS_VL) != 0 )
pCmdItemI->StateSetCtrlVisibleVertically();
if( (dwFlags&__ECTN_TBB_CHECK_BOX) != 0 )
pCmdItemI->StateSetCheckBox();
if( (dwFlags&__ECTN_TBB_RADIO_BOX) != 0 )
pCmdItemI->StateSetRadioBox();
pCmdItemI->m_sMenuText = GetTextInMenu( NULL, true );
// if( pCmdItemI->m_sMenuText.IsEmpty() )
// {
// CExtCustomizeCmdScreenTip * pCCST = CmdScreenTipGet( true );
// if( pCCST != NULL )
// pCmdItemI->m_sMenuText = pCCST->CaptionMainGet();
// }
pCmdItemI->m_sMenuText.Replace( _T("\n"), _T(" ") );
pCmdItemI->m_sMenuText.Replace( _T("\r"), _T("") );
pCmdItemI->m_sMenuText.Replace( _T(" "), _T(" ") );
pCmdItemI->m_sMenuText.TrimLeft( _T(" \r\n\t") );
pCmdItemI->m_sMenuText.TrimRight( _T(" \r\n\t") );
pCmdItemI->m_sToolbarText = GetTextInToolbar( NULL, true );
// if( pCmdItemI->m_sToolbarText.IsEmpty() )
// {
// CExtCustomizeCmdScreenTip * pCCST = CmdScreenTipGet( true );
// if( pCCST != NULL )
// pCmdItemI->m_sToolbarText = pCCST->CaptionMainGet();
// }
pCmdItemI->m_sToolbarText.Replace( _T("\n"), _T(" ") );
pCmdItemI->m_sToolbarText.Replace( _T("\r"), _T("") );
pCmdItemI->m_sToolbarText.Replace( _T(" "), _T(" ") );
pCmdItemI->m_sToolbarText.TrimLeft( _T(" \r\n\t") );
pCmdItemI->m_sToolbarText.TrimRight( _T(" \r\n\t") );
//pCmdItemI->m_sTipTool;
//pCmdItemI->m_sTipStatus;
//pCmdItemI->m_sAccelText;
if( pCmdItemE != NULL && pCmdItemE != pCmdItemI )
{
pCmdItemE->m_dwStateFlags = pCmdItemI->m_dwStateFlags;
pCmdItemE->m_sMenuText = pCmdItemI->m_sMenuText;
pCmdItemE->m_sToolbarText = pCmdItemI->m_sToolbarText;
pCmdItemE->m_sTipTool = pCmdItemI->m_sTipTool;
pCmdItemE->m_sTipStatus = pCmdItemI->m_sTipStatus;
pCmdItemE->m_sAccelText = pCmdItemI->m_sAccelText;
}
} // if( bInit )
else
{
if( nCmdIDi != 0 )
pProfile->CmdRemove( nCmdIDi );
if( nCmdIDe != 0 && nCmdIDe != nCmdIDi )
pProfile->CmdRemove( nCmdIDe );
SetCmdID( 0, false );
} // else from if( bInit )
if( ! Ribbon_InitCommandProfileIcon( pProfile, bInit ) )
{
ASSERT( FALSE );
return false;
}
}
INT nIndex, nCount = GetNodeCount();
for( nIndex = 0; nIndex < nCount; nIndex ++ )
{
CExtCustomizeCmdTreeNode * pNode = ElementAt( nIndex );
ASSERT_VALID( pNode );
pNode->Ribbon_InitCommandProfile( pProfile, bInit );
}
return true;
}
|
|
tera tera
|
Apr 20, 2009 - 1:25 AM
|
Hello. I want to display html information made in memory.
Is there a problem in the usage of the program? LPDISPATCH lpDocDisp = NULL;
HRESULT hr = m_HtmlCtrl.m_pBrowser->get_Document( &lpDocDisp );
if( FAILED(hr) || lpDocDisp == NULL ){
return ;
} IHTMLDocument2 * lpHtmlDoc2 = NULL;
hr = lpDocDisp->QueryInterface(
IID_IHTMLDocument2,
(void**)&lpHtmlDoc2
); SAFEARRAY *sfArray;
VARIANT *param; BSTR bstr = SysAllocString(OLESTR("<H1>TEST</H1>"));
sfArray = SafeArrayCreateVector(VT_VARIANT, 0, 1);
hr = SafeArrayAccessData(sfArray, (LPVOID*)¶m);
param->vt = VT_BSTR;
param->bstrVal = bstr;
hr = SafeArrayUnaccessData(sfArray);
hr = lpHtmlDoc2->write(sfArray);
lpHtmlDoc2->close(); SafeArrayDestroy(sfArray);
SysFreeString(bstr); lpDocDisp->Release();
lpHtmlDoc2->Release();
|
|
tera tera
|
Apr 20, 2009 - 6:59 PM
|
Hello. I want to display the html.
So I use WebBrowser2.
Thank you very much for your advice.
|
|
Technical Support
|
Apr 20, 2009 - 8:51 AM
|
Looks like correct. But some errors are present. Please invoke the SafeArrayDestroy(sfArray); last and not invoke the SysFreeString(bstr); because the string handle is destroyed by the SafeArrayDestroy(sfArray); code.
If you need a log view window with colorized text output, then you can get it from the MthOutput sample application.
|
|
Alexey Spichak
|
Apr 15, 2009 - 10:57 AM
|
Hello.
Auto-hiding control bars (of the type CExtDynamicControlBar ) don’t work the way I expect them. When using with CExtControlBar::g_bCloseOnlyOneBarInTabGroup = true; the whole tabbed group is closed when the cross button is pressed. But I want the only one window (the active one) to be closed. (When the tabbed group is not in the __EDBS_AUTO_HIDDEN state everything works fine).
|
|
Technical Support
|
Apr 16, 2009 - 1:52 PM
|
A tabbed group of control bars requires all the bars to be in the same state: docked or auto-hidden. We cannot avoid this requirement because if we allow some bars to be docked and visible when some other bars in the same group will be auto hidden, the user may start drag-n-dropping the docked visible bars. What should we do with the auto hidden bars in the same tabbed group of bars in this case?
|
|
Alexey Spichak
|
Apr 20, 2009 - 5:00 AM
|
Does it mean that if the auto-hidden bar is closed (with the cross button) the bar changes its state to docked?
I just want the auto-hidden bars to behave like the docked bars do. Now I’m working with Prof-UIS in this way: when the user hides the bar with the cross button my child window (that is in that bar) is destroyed. And when the user wants to see that window a new child window is created and placed in the hidden bar, after that the bar is shown.
But when using in auto-hidden mode bars could be shown without a user wish. For example, I have two windows in a tabbed group. I close both windows in that group and then I show the 1st window. The tabbed group is now shown with the only one (the first one) window (and with the only one tab) and that is correct. After that I push the pin button and the group goes into the auto-hidden state. And I see both tabs: the tab for the 1st window and the tab for the 2nd. But the second child window is not still created so I see the empty bar.
Could you please propose any solution for this?
|
|
Alexey Spichak
|
Apr 20, 2009 - 8:16 AM
|
Solved by overriding CExtDynamicTabbedControlBar::NcButtons_HandleClick - I create all the destroyed windows there when the tab is switched to the auto-hidden mode.
I want to say thank you guys for a good quality product and quick support. A move to your UI system is almost completed without any serious problems or prolonged debugging. Good work!
|
|
Robert Webb
|
Apr 14, 2009 - 10:33 PM
|
The new OnRibbonPrepareButtonContextMenu() is very useful. However, if I right-click on a ribbon tab, the CExtBarButton *button argument passed is NULL. It should point to a CExtRibbonButtonTabPage for that tab. Can you provide a fix, or a work-around so I can know which tab was licked on? Thanks, Rob.
|
|
Technical Support
|
Apr 16, 2009 - 1:56 PM
|
The CExtRibbonBar::OnRibbonPrepareButtonContextMenu() virtual method is not invoked on right mouse button click over tab buttons but the CExtRibbonBar::OnRibbonPrepareBarContextMenu() method is invoked. The CExtRibbonBar::OnRibbonPrepareButtonContextMenu() virtual method is invoked over ribbon buttons which can be inserted into the quick access toolbar. The CExtRibbonBar::OnRibbonPrepareBarContextMenu() virtual method is invoked over all the other areas.
|
|
Robert Webb
|
Apr 16, 2009 - 7:43 PM
|
Ah I see. My override of OnRibbonPrepareBarContextMenu() just called OnRibbonPrepareButtonContextMenu() with NULL for the button, hence what I saw. However, using OnRibbonPrepareBarContextMenu() still doesn’t tell me which tab was clicked on. How can I figure that out within that callback? Thanks, Rob.
|
|
Technical Support
|
Apr 17, 2009 - 10:13 AM
|
You can put the following code into your OnRibbonPrepareBarContextMenu() virtual method to determine whether a ribbon tab page button was clicked: HWND hWnd = ::WindowFromPoint( point );
if( hWnd != m_hWnd )
return true; // some popup part of ribbon is clicked
CPoint ptClient = point;
ScreenToClient( &ptClient );
INT nIdx = HitTest( ptClient );
if( nIdx < 0 )
return true; // click is not over any button
CExtBarButton * pTBB = GetButton( nIdx );
ASSERT_VALID( pTBB );
CExtRibbonButtonTabPage * pRibbonTabPageTBB = DYNAMIC_DOWNCAST( CExtRibbonButtonTabPage, pTBB );
if( pRibbonTabPageTBB == NULL )
return true; // click is not over tab page button
. . .
|
|
Offer Har
|
Apr 14, 2009 - 10:26 AM
|
Dear Support, This event is supposed to be called when the user changes the date/time in the control. I see that even if I change the date/time from the code - this event is fired. Please fix. Thanks, Ron.
|
|
Technical Support
|
Apr 14, 2009 - 1:25 PM
|
This class has been in Prof-UIS for years. We cannot do such improvement because it will definitely break Prof-UIS based projects. Please insert some Boolean property into your class which handles date time control changing and use it to indicate whether your class is in the complex updating state when the control modifications should be ignored by appropriate handler methods.
|
|
tera tera
|
Apr 13, 2009 - 11:43 PM
|
Hello. I rebuild RibbonMenu.
Then accelerator key information becomes invalid.
If there is a good method, please teach it.
http://ifreeta.dee.cc/20090414/RibbonBarMDI.lzh An accelerator key becomes invalid when I execute this code. ON_COMMAND ( ID_EDIT_COPY , OnOpTest )
END_MESSAGE_MAP() // ----------------------------------------------------------------------------
/**
* @brief
*/
// ----------------------------------------------------------------------------
void CMainFrame::OnOpTest()
{
m_wndRibbonBar.MenuRebuild ( m_pRibbonNode );
}
void CMyRibbonBar::MenuRebuild( CExtRibbonNode * pRibbonNode )
{
SetButtons( NULL );
SetButtons( pRibbonNode ); _RecalcPositionsImpl(); CMDIFrameWnd * pFrame = (CMDIFrameWnd *)AfxGetMainWnd();
OnUpdateCmdUI( pFrame , TRUE ); // !!! THIS LINE WAS ADDED !!! RedrawWindow( NULL, NULL, RDW_INVALIDATE|RDW_ALLCHILDREN );
CExtPaintManager::stat_PassPaintMessages();
};
|
|
Technical Support
|
Apr 14, 2009 - 11:41 AM
|
Fixed: void MenuRebuild( CExtRibbonNode * pRibbonNode )
{
SetButtons( NULL );
SetButtons( pRibbonNode );
VERIFY( MenuInfoGetDefault()-> AccelTableLoad( IDR_MAINFRAME ) ); // THIS LINE WAS ADDED
_RecalcPositionsImpl();
CMDIFrameWnd * pFrame = (CMDIFrameWnd *)AfxGetMainWnd();
OnUpdateCmdUI( pFrame , TRUE ); // !!! THIS LINE WAS ADDED !!!
RedrawWindow( NULL, NULL, RDW_INVALIDATE|RDW_ALLCHILDREN );
CExtPaintManager::stat_PassPaintMessages();
};
|
|
tera tera
|
Apr 14, 2009 - 6:19 PM
|
Hello. When it is only this
I think that the custom accelerator key to RibbonMenu is erased.
????
|
|
Technical Support
|
Apr 16, 2009 - 1:54 PM
|
Here is the solution: void MenuRebuild( CExtRibbonNode * pRibbonNode )
{
CMemFile _file;
CArchive arSave( &_file, CArchive::store );
MenuInfoGetDefault()->AccelTableSerialize( arSave );
arSave.Close();
SetButtons( NULL );
SetButtons( pRibbonNode );
_file.Seek( 0, CFile::begin );
CArchive arLoad( &_file, CArchive::load );
MenuInfoGetDefault()->AccelTableSerialize( arLoad );
arLoad.Close();
_RecalcPositionsImpl();
CMDIFrameWnd * pFrame = (CMDIFrameWnd *)AfxGetMainWnd();
OnUpdateCmdUI( pFrame , TRUE );
RedrawWindow( NULL, NULL, RDW_INVALIDATE|RDW_ALLCHILDREN );
CExtPaintManager::stat_PassPaintMessages();
};
|
|
tera tera
|
Apr 13, 2009 - 8:25 PM
|
Hello. Will not there be the schedule developing UI for Web application?
|
|
Technical Support
|
Apr 14, 2009 - 11:38 AM
|
We are sorry but it is not completely clear what you mean? Do you mean web-controls, like asp.net controls?
|
|
tera tera
|
Apr 13, 2009 - 12:16 AM
|
|
|
Technical Support
|
Apr 14, 2009 - 1:25 PM
|
|
|
tera tera
|
Apr 20, 2009 - 3:05 AM
|
Hello. It is not improved.
Please revise Prof(2009-04-18).zip
|
|
Technical Support
|
Apr 20, 2009 - 8:49 AM
|
The CExtNCW template class is improved when it is applied to the CMDIChildWnd class. When minimizing the maximized MDI child frame window, then the next activated MDI child frame window does not become restored.
|
|
Technical Support
|
Apr 13, 2009 - 1:14 PM
|
This is fixed in Prof-UIS 2.85. Thank you.
|
|
tera tera
|
Apr 13, 2009 - 8:21 PM
|
Hello. Please upload a revision in the Prof-FTP site. Give my best regards
|
|
tera tera
|
Apr 12, 2009 - 11:44 PM
|
I want to display my bmp here
|
|
Technical Support
|
Apr 13, 2009 - 1:15 PM
|
You should implement the CExtGridCell::OnPaintButton() virtual method in your grid cell class. The nButtonType parameter is equal to INT(__EBTT_ELLIPSIS) when the method is invoked for painting an ellipsis button.
|
|
tera tera
|
Apr 12, 2009 - 10:35 PM
|
Hello. Can you change a font of caption?
|
|
Technical Support
|
Apr 13, 2009 - 1:16 PM
|
This caption is painted by Windows rather by Prof-UIS. If you should change the default looking caption and/or borders, then you should completely repaint them.
|
|
tera tera
|
Apr 12, 2009 - 8:57 PM
|
Hello. Because I am independent and set a Caption title name.
I do not want to display drawcl1 automatically.
Please teach the method how drwcl1 is not displayed.
|
|
Technical Support
|
Apr 20, 2009 - 8:51 AM
|
This issue is very specific because we have no idea how the MDI interface performs main frame caption changing without sending the WM_SETTEXT message to the main frame window. We can provide you with a temporarily solution applicable to skinned window captions only.
|
|
Technical Support
|
Apr 13, 2009 - 1:16 PM
|
You should remove the FWS_ADDTOTITLE style from the main frame window.
|
|
tera tera
|
Apr 14, 2009 - 2:16 AM
|
|
|
Technical Support
|
Apr 14, 2009 - 11:40 AM
|
The cs.style &= ~(FWS_ADDTOTITLE); line of code must be present both in the CMuChildFrame::PreCreateWindow() and CMainFrame::PreCreateWindow() methods:
BOOL CMuChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( ! CExtNCW < CMDIChildWnd > :: PreCreateWindow( cs ) )
return FALSE;
cs.style &= ~(FWS_ADDTOTITLE);
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
cs.lpszClass = AfxRegisterWndClass(0);
cs.style |= WS_CLIPSIBLINGS |WS_CLIPCHILDREN |WS_MAXIMIZE;
return TRUE;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( ! CExtNCW < CMDIFrameWnd > :: PreCreateWindow( cs ) )
return FALSE;
cs.style &= ~(FWS_ADDTOTITLE);
return TRUE;
}
|
|
tera tera
|
Apr 14, 2009 - 7:06 PM
|
Hello. With pChildFrame->SetWindowText( "test-title" ) , the string was displayed by MdiTab.
However, it is displayed in title.
I do not want to display it in title. .rc /////////////////////////////////////////////////////////////////////////////
//
// String Table
// STRINGTABLE DISCARDABLE
BEGIN
IDR_MAINFRAME "MDI"
//IDR_MDITYPE "\nMDI child\nMDI child"
---------------------------------------------------
.cpp CMainFrame * pMainFrame =
DYNAMIC_DOWNCAST(
CMainFrame,
::AfxGetMainWnd()
); pChildFrame->SetWindowText( "test-title" ); ---------------------------------------------------
Thanks,
|
|
Technical Support
|
Apr 16, 2009 - 1:53 PM
|
The main frame’s window text becomes changed without sending the WM_SETTEXT message to the window procedure. So, you need some other solution of this issue. For instance, if you are keeping the MDI child frame windows constantly maximized, then you can switch to SDI project type with the tab page container control inside.
|
|
tera tera
|
Apr 16, 2009 - 6:19 PM
|
Hello. I use plural CMDIFrameWnd.
I cannot use SDI. In my application with SetWindowText , I renew Caption.
but , Behind caption, "test-title" is displayed.
This is troubled.
Please teach some good method
|
|
tera tera
|
Apr 19, 2009 - 10:35 PM
|
Hello. Is not there the good idea elsewhere anymore?
Is it difficult for you to advise me? Thanks,
|
|
tera tera
|
Apr 10, 2009 - 5:26 AM
|
Hello. I update Caption name in SetWindowText.
However, caption is not updated.
Please teach the method how caption is updated. Thanks ,
|
|
Technical Support
|
Apr 13, 2009 - 1:17 PM
|
Please invoke ::SendMessage( hWnd, WM_NCPAINT, 0L, 0L ); to update the window caption.
|
|
tera tera
|
Apr 9, 2009 - 10:56 PM
|
Hello. In prof2.84, I was able to perform a print preview definitely as follows.
However, In prof2.85, it is displayed greatly.
Print and a preview are not possible normally.
I am troubled.
Please teach an improvement method http://ifreeta.dee.cc/20090410/SampleMuPrintGrid_GDIPlus2.lzh
About the method that we adopt
I make the wmf file of the dummy.
I acquire the dot domain that I can print from the dummy file.
I draw in the dot domain. CSize csSize;
CString csStr; csStr = MetafileCache_GetFolder();
csStr += "metafilesizeget123.emf"; if ( _access( csStr , 0) == 0 ) {
DeleteFile( csStr );
}
CMetaFileDC dcEMF;
if( ! dcEMF.CreateEnhanced(
NULL,
csStr,
rcEmfExtent,
NULL
)
)
{
//
ASSERT( FALSE );
throw 0;
}
dcEMF.SetBkColor ( RGB(255,255,255) );
dcEMF.SaveDC();
dcEMF.RestoreDC( -1 );
HENHMETAFILE hEMF = dcEMF.CloseEnhanced();
DeleteEnhMetaFile( hEMF ); WCHAR wszText[1024];
MultiByteToWideChar(
CP_UTF8, 0,
csStr.GetBuffer(256),
strlen(csStr.GetBuffer(256))+1,
wszText,
(int)sizeof(wszText)
); Gdiplus::Metafile metafile( wszText );
Gdiplus::MetafileHeader mtfHeader;
metafile.GetMetafileHeader(&mtfHeader); csSize.cx = mtfHeader.Width;
csSize.cy = mtfHeader.Height; return csSize;
|
|
Technical Support
|
Apr 13, 2009 - 1:17 PM
|
|
|
Eric Houvenaghel
|
Apr 9, 2009 - 11:25 AM
|
I am using RowCountGet() to get the number of rows in CExtReportGridWnd.
However, this function will not include filtered (or hidden) rows.
Any idea on how to get the actual count.
i.e. Shown and hidden rows.
|
|
Technical Support
|
Apr 9, 2009 - 12:15 PM
|
The CExtReportGridWnd report grid control is based on the CExtTreeGridWnd tree grid control. You should get access to the report tree data provider object first:
CExtReportGridWnd & wndRG = . . .
CExtReportGridDataProvider & _ReportDP = wndRG.GetReportData();
The report data provider manages report/tree grid rows, but internally it uses another instance of the CExtGridDataProvierMemory plain memory data provider containing all the rows in the expanded state and all the columns in the active state. You can get this memory cache of grid cells: CExtGridDataProvider & _DP = _ReportDP._Tree_GetCacheDP();
This data provider is the real two dimensional storage of grid cells. It contains all the rows and columns of then report grid. First rows from the top are outer header rows at the top side of the report grid, next rows are the outer header rows at the bottom, next are data rows in the unfiltered and expanded state. The first header row at the top contains the CExtReportGridColumn grid cells. First column from the left is the tree structure column containing the CExtReportGridItem grid cells, next rows are header columns at the left side of the report grid, next are headers at the right side, next are the inactive report columns and, finally, next are the active report columns. We just hacked the report grid for you. The CExtGridDataProvider::RowCountGet() method can tell you the entire count of rows in the memory data provider. You should subtract the count of header rows from the top and bottom and you will get the entire un-filtered row count including report group rows.
|
|
David Skok
|
Apr 8, 2009 - 6:33 AM
|
I would like to implement CExtShellDialogBrowseFor in my app. How can I set the root directory to a known location given a lpsz string or CString? I look at the ProfUIS_Controls sample and this uses another browse for path search and I am lost as to how to specify it directly. When this known directory is browsed, is it possible to filter the items in the directory based on their extension? The root directory that I set will contain directories with known extensions.
|
|
Technical Support
|
Apr 8, 2009 - 1:24 PM
|
You should initialize the CExtShellDialogBrowseFor::m_pidlRoot property before calling the dialog’s DoModal() method: CExtShellDialogBrowseFor dlg( . . . );
. . .
HWND hWndParentForMsgBoxex = ::AfxGetMainWnd()->GetSafeHwnd();
if( ! dlg.m_pidlRoot.FromFolder( _T("C:\\Your\\Folder\\Path\\Here"), hWndParentForMsgBoxex ) )
return . . . // incorrect folder path
. . .
INT nRetVal = dlg.DoModal();
. . .
There are two overloaded versions of the CExtPIDL::FromFolder() method: bool FromFolder( __EXT_MFC_SAFE_LPCTSTR pszPath, HWND hWndOwner );
bool FromFolder( UINT nSpecialFolder, HWND hWndOwner );
The first is used in the code snippet above and allows you to point the CExtPIDL object to the specified folder on the file system. The second enables you to create a CExtPIDL object referred to the standard shell folder and its first parameter is one of the CSIDL_*** constants defined in the SHLOBJ.H file.
|
|
David Skok
|
Apr 9, 2009 - 9:41 AM
|
Thank you for the quick response, setting the root directory directly works well. I would like to implement a filter for the items displayed in the CExtShellDialogBrowseFor tree. I looked at the documentation and source and there diesn’t seem to be anything that supports this. Am I missing something? SHBrowseForFolder implements such a function using a callback although I’ve never tried it.
|
|
Technical Support
|
Apr 9, 2009 - 11:54 AM
|
The CExtShellDialogBrowseFor:: m_wndShellTree public property is the CExtShellTreeCtrl shell tree control used in the browse for folder dialog. The CExtShellTreeCtrl class has the following public properties for filtering displayed shell items:
DWORD m_dwAttributeFilterAny, m_dwAttributeFilterAllPresent, m_dwAttributeFilterAllAbsent;
Each property contains combination of the SFGAO_*** flags for filtering shell items in the tree: // IShellFolder::GetAttributesOf flags
#define SFGAO_CANCOPY DROPEFFECT_COPY // Objects can be copied
#define SFGAO_CANMOVE DROPEFFECT_MOVE // Objects can be moved
#define SFGAO_CANLINK DROPEFFECT_LINK // Objects can be linked
#define SFGAO_CANRENAME 0x00000010L // Objects can be renamed
#define SFGAO_CANDELETE 0x00000020L // Objects can be deleted
#define SFGAO_HASPROPSHEET 0x00000040L // Objects have property sheets
#define SFGAO_DROPTARGET 0x00000100L // Objects are drop target
#define SFGAO_CAPABILITYMASK 0x00000177L
#define SFGAO_LINK 0x00010000L // Shortcut (link)
#define SFGAO_SHARE 0x00020000L // shared
#define SFGAO_READONLY 0x00040000L // read-only
#define SFGAO_GHOSTED 0x00080000L // ghosted icon
#define SFGAO_HIDDEN 0x00080000L // hidden object
#define SFGAO_DISPLAYATTRMASK 0x000F0000L
#define SFGAO_FILESYSANCESTOR 0x10000000L // It contains file system folder
#define SFGAO_FOLDER 0x20000000L // It’s a folder.
#define SFGAO_FILESYSTEM 0x40000000L // is a file system thing (file/folder/root)
#define SFGAO_HASSUBFOLDER 0x80000000L // Expandable in the map pane
#define SFGAO_CONTENTSMASK 0x80000000L
#define SFGAO_VALIDATE 0x01000000L // invalidate cached information
#define SFGAO_REMOVABLE 0x02000000L // is this removeable media?
#define SFGAO_COMPRESSED 0x04000000L // Object is compressed (use alt color)
#define SFGAO_BROWSABLE 0x08000000L // is in-place browsable
#define SFGAO_NONENUMERATED 0x00100000L // is a non-enumerated object
#define SFGAO_NEWCONTENT 0x00200000L // should show bold in explorer tree
Is that what you need?
|
|
tera tera
|
Apr 8, 2009 - 4:21 AM
|
Hello. I want to make this RibbonNode non-display.
Please teach a way.
|
|
tera tera
|
Apr 8, 2009 - 8:44 PM
|
Hello. __ECTN_TBB_SEPARATED_DROPDOWN type is not non-displayed.
Please check it. VERIFY( _iconTmp123.m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(ID_PB_ALL_BORDERS) ) );
_iconTmp123.m_bmpNormal.Make32();
_iconTmp123.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
pTempNode123 = new CExtCustomizeCmdTreeNode(
ID_PB_ALL_BORDERS, ID_PB_ALL_BORDERS, NULL, 0,
_T("&All Borders"), _T("&All Borders"), _T(""), 0L, &_iconTmp123 );
pTempNode123->CmdKeyTipSet( new CExtCustomizeCmdKeyTip( __EXT_MFC_SAFE_TCHAR( _T(’A’) ) ), false );
pNodeParagraphBorder->InsertNode( NULL, pTempNode123 );
pTempNode123->ModifyFlags( __ECTN_TBB_HIDDEN );
|
|
Technical Support
|
Apr 8, 2009 - 9:16 PM
|
Thank you for reporting us this issue. To fix it please update the source code for the following method:
bool CExtPopupMenuWnd::UpdateFromCmdTree(
HWND hWndCmdRecv,
CExtCustomizeCmdTreeNode * pNode,
bool bTopLevel // = true
)
{
ASSERT_VALID( this );
ASSERT_VALID( pNode );
m_pNode = pNode;
if( hWndCmdRecv != NULL )
m_hWndCmdReceiver = hWndCmdRecv;
ASSERT( m_hWndCmdReceiver != NULL );
ASSERT( ::IsWindow(m_hWndCmdReceiver) );
__EXT_MFC_SAFE_LPCTSTR strProfileName = g_CmdManager->ProfileNameFromWnd( m_hWndCmdReceiver );
bool bCustomizeMode = false;
CExtCustomizeSite * pSite =
CExtCustomizeSite::GetCustomizeSite( m_hWndCmdReceiver );
if( pSite != NULL )
bCustomizeMode = pSite->IsCustomizeMode();
INT iter = 0;
for( ; iter < m_items_all.GetSize(); iter++)
{
MENUITEMDATA & mi = ItemGetInfo( iter );
if( mi.IsPopup() )
{
CExtPopupMenuWnd * pPopup = mi.GetPopup();
pPopup->m_hWndCmdReceiver = m_hWndCmdReceiver;
INT nSaved = pPopup->m_nFadeOutAnimationStepCount;
pPopup->m_nFadeOutAnimationStepCount = -1;
pPopup->_OnCancelMode();
pPopup->m_nFadeOutAnimationStepCount = nSaved;
VERIFY( pPopup->_BuildItems( NULL, false ) );
mi.DestroyPopup();
}
}
m_items_all.RemoveAll();
if( pNode == NULL )
return true;
ASSERT_VALID( pNode );
m_bTopLevel = bTopLevel;
if( m_bTopLevel )
m_pWndParentMenu = NULL;
int nMruUpdateIndex = -1, nInsertedIndex = 0;
int nMenuItemCount = pNode->GetNodeCount();
m_items_all.RemoveAll();
bool bSeparatorMode = false;
for( int nItemIndex = 0; nItemIndex < nMenuItemCount; nItemIndex++ )
{
CExtCustomizeCmdTreeNode * pChildNode = pNode->ElementAt( nItemIndex );
ASSERT_VALID( pChildNode );
if( ( pChildNode->GetFlags() & __ECTN_GROUP_START ) )
{
if( ! bSeparatorMode )
{
bSeparatorMode = true;
VERIFY( ItemInsert( CExtPopupMenuWnd::TYPE_SEPARATOR, nInsertedIndex++ ) );
}
}
if( pChildNode->GetFlags() & __ECTN_TBB_HIDDEN )
continue;
UINT nMenuItemID = pChildNode->GetCmdID( false );
if( ID_FILE_MRU_FIRST <= nMenuItemID
&& nMenuItemID <= ID_FILE_MRU_LAST
&& (! bCustomizeMode )
)
{
if( nMruUpdateIndex < 0 )
nMruUpdateIndex = nInsertedIndex;
continue;
}
MENUITEMDATA mi( this );
mi.SetCmdReceiver( m_hWndCmdReceiver );
VERIFY( mi.UpdateFromCmdTree( m_hWndCmdReceiver, pChildNode, nInsertedIndex ) );
if( ! mi.IsSeparator() )
{
bSeparatorMode = false;
CExtCmdItem * pCmdItem = NULL;
if( mi.IsPopup() )
{
CExtPopupMenuWnd * pDesc = mi.GetPopup();
pDesc->m_hWndCmdReceiver = m_hWndCmdReceiver;
pDesc->UpdateFromCmdTree( hWndCmdRecv, pChildNode, false );
pDesc->m_pWndParentMenu = this;
}
else
{
pCmdItem = g_CmdManager->CmdGetPtr( strProfileName, mi.GetCmdID() );
if( pCmdItem != NULL )
mi.SetAccelText( pCmdItem->m_sAccelText );
}
mi.SetText( pChildNode->GetTextInMenu( pCmdItem ) );
mi.AccelCharInit();
mi.MeasureItem( NULL );
}
_InsertItem( -1, mi );
nInsertedIndex++;
}
int nMruInsertCount = 0;
if( nMruUpdateIndex >= 0 )
{
CRecentFileList * pRecentFileList = InternalFriendlyWinApp::_GetFriendlyApp()-> _GetRecentFileList();
if( pRecentFileList != NULL )
{
int nRecentCount = pRecentFileList->GetSize();
TCHAR sCurrDir[_MAX_PATH+1];
::memset(sCurrDir,0,sizeof(sCurrDir));
::GetCurrentDirectory(_MAX_PATH,sCurrDir);
int nLenCurDir = (int)_tcslen(sCurrDir);
for( int nItemIndex=0; nItemIndex<nRecentCount; nItemIndex++ )
{
CExtSafeString sDisplayName( _T("") );
CExtSafeString sDisplayNameFullPath( _T("") );
CExtSafeString sDisplayNameMenu( _T("") );
CExtSafeString sDisplayNameTipTool( _T("") );
sDisplayNameFullPath = ( ! pRecentFileList->m_arrNames[ nItemIndex ].IsEmpty() ) ? LPCTSTR( pRecentFileList->m_arrNames[ nItemIndex ] ) : _T("");
pRecentFileList->GetDisplayName( *((CString *)&sDisplayName), nItemIndex, sCurrDir, nLenCurDir, TRUE );
if( sDisplayName.IsEmpty() || sDisplayNameFullPath.IsEmpty() )
continue;
if( g_bMRU_UseFullPathsInMenu )
sDisplayNameMenu = sDisplayNameFullPath;
else
sDisplayNameMenu = sDisplayName;
if( g_bMRU_UseFullPathsInTipTool )
sDisplayNameTipTool = sDisplayNameFullPath;
else
sDisplayNameTipTool = sDisplayName;
UINT nCmdID = ID_FILE_MRU_FIRST + nItemIndex;
ASSERT( nCmdID <= ID_FILE_MRU_LAST );
CExtCmdItem * pCmdItem = g_CmdManager->CmdGetPtr( g_CmdManager->ProfileNameFromWnd( m_hWndCmdReceiver ), nCmdID );
if( pCmdItem == NULL )
pCmdItem = g_CmdManager->CmdAllocPtr( g_CmdManager->ProfileNameFromWnd( m_hWndCmdReceiver ), nCmdID );
ASSERT( pCmdItem != NULL );
if( pCmdItem == NULL )
return false;
int nDisplayIndex = nItemIndex+1;
if( nDisplayIndex < 10 )
pCmdItem->m_sMenuText.Format( _T("&%d %s"), nDisplayIndex, sDisplayNameMenu );
else
pCmdItem->m_sMenuText.Format( _T("%d&%d %s"), nDisplayIndex/10, nDisplayIndex%10, sDisplayNameMenu );
CExtSafeString sRecentFileFmt1,sRecentFileFmt2;
if( ! g_ResourceManager->LoadString( sRecentFileFmt1, IDS_RECENT_FILE_FMT_1 ) )
sRecentFileFmt1 = _T("Recent file %d");
if( ! g_ResourceManager->LoadString( sRecentFileFmt2, IDS_RECENT_FILE_FMT_2 ) )
sRecentFileFmt2 = _T("Recent file %d (\"%s\")");
pCmdItem->m_sToolbarText.Format( (LPCTSTR)sRecentFileFmt1, nItemIndex + 1 );
pCmdItem->m_sTipTool.Format( (LPCTSTR)sRecentFileFmt2, nItemIndex + 1, sDisplayNameTipTool );
pCmdItem->m_sTipStatus = pCmdItem->m_sTipTool;
BOOL bInsRetVal = ItemInsert( nCmdID, nMruUpdateIndex + nItemIndex );
if( ! bInsRetVal )
{
ASSERT( FALSE );
return false;
}
nMruInsertCount++;
}
}
if( nMruInsertCount == 0
&& nMruUpdateIndex > 0
&& nMruUpdateIndex < (ItemGetCount()-1)
&& ItemGetInfo( nMruUpdateIndex ).IsSeparator()
&& ItemGetInfo( nMruUpdateIndex-1 ).IsSeparator()
)
m_items_all.RemoveAt( nMruUpdateIndex );
}
_SyncItems();
return true;
}
|
|
Technical Support
|
Apr 8, 2009 - 6:43 AM
|
You should use the __ECTN_TBB_HIDDEN style and the CExtCustomizeCmdTreeNode::ModifyFlags method.
|
|
tera tera
|
Apr 7, 2009 - 8:24 PM
|
Hello
When the icon of the dialogue is unestablished, it is displayed.
I want to acquire this standard icon. Please teach a good method.
|
|
tera tera
|
Apr 8, 2009 - 6:45 PM
|
Hello. In a Dwm mode,
To draw Window caption in my application. Therefore I want to acquire this standard icon.
Is not there the command that can acquire this standard icon? I wonder if I cannot but prepare standard icon.
|
|
Technical Support
|
Apr 9, 2009 - 2:45 AM
|
You should use both the WM_GETICON message and GCL_HICON window class property: <pre>CWnd * pWnd = . . . HICON hIcon = NULL; if( pWnd->GetSafeHwnd() != NULL ) { hIcon = (HICON)(__EXT_MFC_DWORD_PTR) ::SendMessage( pWnd->m_hWnd, WM_GETICON, ICON_BIG, 0L ); if( hIcon == NULL ) { hIcon = (HICON)(__EXT_MFC_DWORD_PTR) ::SendMessage( pWnd->m_hWnd, WM_GETICON, ICON_BIG, 0L ); if( hIcon == NULL ) { hIcon = (HICON)(__EXT_MFC_DWORD_PTR) ::__EXT_MFC_GetClassLong( pWnd->m_hWnd, __EXT_MFC_GCL_HICON ); if(hIcon == NULL) hIcon = ::AfxGetApp()->LoadStandardIcon( IDI_WINLOGO ); } // if( hIcon == NULL ) } // if( hIcon == NULL ) } // if( pWnd->GetSafeHwnd() != NULL ) if( hIcon != NULL ) { . . . } <pre>
|
|
Technical Support
|
Apr 8, 2009 - 7:54 PM
|
You should use both the WM_GETICON message and the GCL_HICON window class property:
CWnd * pWnd = . . .
HICON hIcon = NULL;
if( pWnd->GetSafeHwnd() != NULL )
{
hIcon = (HICON)(__EXT_MFC_DWORD_PTR) ::SendMessage( pWnd->m_hWnd, WM_GETICON, ICON_BIG, 0L );
if( hIcon == NULL )
{
hIcon = (HICON)(__EXT_MFC_DWORD_PTR) ::SendMessage( pWnd->m_hWnd, WM_GETICON, ICON_BIG, 0L );
if( hIcon == NULL )
{
hIcon = (HICON)(__EXT_MFC_DWORD_PTR) ::__EXT_MFC_GetClassLong( pWnd->m_hWnd, __EXT_MFC_GCL_HICON );
if(hIcon == NULL)
hIcon = ::AfxGetApp()->LoadStandardIcon( IDI_WINLOGO );
} // if( hIcon == NULL )
} // if( hIcon == NULL )
} // if( pWnd->GetSafeHwnd() != NULL )
if( hIcon != NULL )
{
. . .
}
|
|
tera tera
|
Apr 10, 2009 - 2:53 AM
|
|
|
Technical Support
|
Apr 8, 2009 - 6:48 AM
|
You should assign a window icon or remove the WS_SYSMENU style.
|