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 |
|
yamapu
|
May 15, 2003 - 11:35 PM
|
please tell me how to implement redocking feature that doubleclicking the titlebar of a floating CExtControlBar causes it to be docked at previously docked position. just like VS.net. best regards.
|
|
Customer Support Team
|
May 17, 2003 - 6:22 AM
|
Dear Yasushi,
Prof-UIS allows you to toggle between the floating and docked states by double-clicking if you work with fixed-size bars (toolbars, menu bars) only. This feature is not currently supported for resizable bars: by double-clicking on the caption of the resizable bar, you can only detach it into its floating state (in fact, it is placed into a floating palette).
There are four lists of control bars in MFC (one for each frame side - top, bottom, left, and right). Each list stores pointers to the CControlBar objects and to the placeholders for floating bars that were previously docked to the corresponding side of the frame. When the user double-clicks on the caption, MFC uses the related place-holder to find where the bar was previously docked. This MFC technique is compatible only with the outer level Prof-UIS bars like the toolbar or the menu bar. The inner level bars (or resizable bars) are not fully compatible with the MFC docking mechanism. For example, MFC does not support these features: - dynamic count of inner levels (or inner rows/columns with the bars) - horizontal rows inside vertical rows and vice versa - tab containers - multiply bars inside one floating container
MFC does not even provide the developer with a ready-to-use class implementing the features of the resizable bar.
That made impossible to fully implement the double-clicking feature for redocking resizable bars. But we are working on this problem now.
|
|
yamapu
|
May 19, 2003 - 7:27 AM
|
Thank you for a reply. I understood the difficulty of that.. but,
> But we are working on this problem now.
now I have strong expectation for the new version by this statement. :-)
|
|
Rajneesh
|
May 9, 2003 - 5:29 AM
|
Ho do i remove the close button from my docking windows derived from CExtControlBar. Also please tell the functionality of the control button, does it closes the window or simply hides it.
|
|
Customer Support Team
|
May 13, 2003 - 1:25 PM
|
You should use your own class derived from CextControlBar ( or CExtToolControlBar, or CExtMenuControlBar ) and override the OnNcAreaButtonsReinitialize() virtual method. This is the source code of CExtControlBar::OnNcAreaButtonsReinitialize(): void CExtControlBar::OnNcAreaButtonsReinitialize() { INT nCountOfNcButtons = NcButtons_GetCount(); if( nCountOfNcButtons > 0 ) return; NcButtons_Add( new CExtBarNcAreaButtonClose(this) ); #if (!defined __EXT_MFC_NO_TAB_CONTROLBARS) NcButtons_Add( new CExtBarNcAreaButtonAutoHide(this) ); #endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS) NcButtons_Add( new CExtBarNcAreaButtonMenu(this) ); } If yop remove this line NcButtons_Add( new CExtBarNcAreaButtonClose(this) ); the "X" button will disappear. When the control bar window is in the floating state, it is inside a miniframe window which is created and destroyed automatically by Prof-UIS. The "X" on this frame just hides the window. All the non-client area buttons are instances of the classes which are derived from CExtBarNcAreaButton. You can write your own buttons and initialize them in OnNcAreaButtonsReinitialize().
Please feel free to contact us if you have any problems.
|
|
Rajneesh
|
May 8, 2003 - 5:20 AM
|
How do i add an icon (16x16) on the title bar of my dockable windows created from CExtControlBar. I want the icon to be displayed with the title of the control bar.
|
|
Customer Support Team
|
May 13, 2003 - 1:13 PM
|
You can fake the icons in the title-bar by implementing your own non-client buttons. Each control bar may have several non-client area buttons (like "X" button of a floating bar). The buttons may be aligned to the left or to the right. They also may paint their own areas. In the MDI sample you can see the "Task-Panel" bar with 2 buttons ("<-" and "->") which are located at the right part of the caption. They are clickable. You should write your own no clickable button, which will paint an icon in its area. All the buttons are instances of the classes derived from CExtBarNcAreaButton. Your button should be similar to the "<-" or "->" button in the MDI sample but the OnNcAreaDraw() method should paint an icon and OnNcAreaClicked() should do nothing. This button should return a false value in the OnQueryVisibility() method if the control bar is not in the floating state. To insert your button into the caption of the control bar you need your own class derived from CExtControlBar (or CExtToolControlBar, or CExtMenuControlBar). Your control bar should override the OnNcAreaButtonsReinitialize() virtual method: void CMyControlBar::OnNcAreaButtonsReinitialize() { CExtControlBar::OnNcAreaButtonsReinitialize() INT nCountOfNcButtons = NcButtons_GetCount(); if( nCountOfNcButtons > 0 ) return; NcButtons_Add( new CMyIconButton(this) ); }
As we mentioned before, CMyIconButton should be derived from CExtBarNcAreaButton. Please find the CBarNcTaskAreaBtn class in the MainFrm.h file of the MDI sample and use it as a guide of writing custom non-client buttons. Please note the vertical height of a floating mini-frame window is usually less than 16 pixels. You may need to paint icons with the height a little bit less than 16. These icons may be 16x16 or 32x32, but any meaningful image should be approximately 12x12. Otherwise your icon may not fit the caption height. Please contact us if you have any difficulties.
|
|
rajneesh
|
May 6, 2003 - 7:19 AM
|
Hi, Whenever i ma resizing my Atl Control ,the tab window that i have created using CExtTabWnd is not painted. But when i move mouse over scroll,it got painted.
What should i have to do
Regards, Rajneesh
|
|
Customer Support Team
|
May 6, 2003 - 9:39 AM
|
Dear Rajneesh,
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 solution we can suggest you is to include some of the Prof-UIS source files directly into your ATL project (e.g. ExtTabWnd.*, ExtPaintManager.*). But, in this case, you have to modify those files, i.e. to remove dependency of other library sources.
If you encounter any problems, we can make a test ATL project with the modified version of the tab window inside. BUT PLEASE NOTE: THIS PROJECT WILL NOT USE PROF-UIS DLL.
|
|
rajneesh
|
May 3, 2003 - 5:28 AM
|
Hi, I am inserting menu items in CExtMenuControlBar in my CMainFrame derived from CMDIFrameWnd at run time. To handle these menu command i have override the OnCommand virtual method of CMDIFrameWnd. The problem is that the menu items which i insert at run time are disabled and the menu bitmaps are not visible. The following code snipplet describes what i am doing. Please suggest some way to enable the menu item and show the menu bitmap.
class CMainFrame : public CMDIFrameWnd { CExtMenuControlBar m_wndMenuBar; UINT g_nNextCommandID;
BOOL InsertCustomMenu(LPCTSTR MenuTitle, LPCTSTR MenuItemTitle, HBITMAP MenuBitmap) { CMenu *pWindowMenu=m_wndMenuBar.GetMenu(); CMenu *pMainMenu=new CMenu;
if(pWindowMenu && pMainMenu->CreatePopupMenu()) { pMainMenu->AppendMenu(MF_STRING, g_nNextCommand, MenuItemTitle)) ::SetMenuItemBitmaps(pMainMenu->m_hMenu, g_nNextCommand, MF_BYCOMMAND, MenuBitmap, NULL);
pWindowMenu->AppendMenu(MF_POPUP, (UINT)pMainMenu->m_hMenu, MenuTitle);
g_nNextCommand++; m_wndMenuBar.UpdateMenuBar();
return TRUE; }
return FALSE; }
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam) { TRACE("COMAND : %d", wParam); return CMDIFrameWnd::OnCommand(wParam, lParam); } }
|
|
Customer Support Team
|
May 3, 2003 - 9:39 AM
|
Dear Rajneesh,
The technique you described cannot be used for inserting new menu items.
Instead you should override the CExtPopupMenuWnd::g_nMsgPrepareMenu registered message in the frame window so that you can modify menus. This message is generated each time any popup menu appears on the screen. Please add this line to the frame’s message map:
ON_REGISTERED_MESSAGE(CExtPopupMenuWnd::g_nMsgPrepareMenu,OnExtMenuPrepare)
You also should add this method to your frame window:
LRESULT CMainFrame::OnExtMenuPrepare(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 );
// HERE IS YOUR CODE TO MODIFY pPopup (insert or remove anything)
}
My suggestion is to add some commands to the menu in resources which will be replaced with other commands in the CMainFrame::OnExtMenuPrepare() method. If you don’t need to replace these commands, you may simply remove them.
For example, if we have added an ID_MY_REPLACE_CMD command to the File menu, you should use the following code in the CMainFrame::OnExtMenuPrepare() method:
INT nReplacePos = pPopup->ItemFindPosForCmdID(ID_MY_REPLACE_CMD);
if( nReplacePos >= 0 )
{
// USER SHOULD NOT SEE THIS COMMAND
VERIFY( pPopup->ItemRemove(nReplacePos) );
// YOU ALSO MAY INSERT SOME COMMANDS TO THIS POSITION
VERIFY( pPopup->ItemInsert( (UINT)CExtPopupMenuWnd::TYPE_SEPARATOR, nReplacePos) );
VERIFY( pPopup->ItemInsert( ID_SOME_COMMAND, nReplacePos) );
}
Please note, all commands should be registered in the command manager.The DRAWCLI sample carefully uses this technique to handle OLE menus and insert color-popup submenus.
If you encounter any difficulties, please send us your sample application to support@fossware.com so we can give you a solution.
|
|
rajneesh
|
May 3, 2003 - 1:16 AM
|
Hi, While using CExtTabWnd in ATL Composite control,my application crashes while accesing its functions i.e, ItemGetCount(),SelectionGet() etc.
It doesnot crashes on OnTabWndSelectionChange() but crashes while accesing functions ItemGetCount(),SelectionGet() on Handling Rbutton Down etc.
Below is the test code. CExtTabWnd* m_ProfTab;
m_ProfTab = new CDemoExtTabWnd(); m_ProfTab->Create( CWnd::FromHandle (m_hWnd), CRect(0,0,150,30), IDC_TAB3 , WS_CHILD | WS_VISIBLE, __ETWS_BOLD_SELECTION|__ETWS_ORIENT_TOP, NULL) ;
LRESULT OnRButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { long lSel = m_ProfTab->SelectionGet(); //crashes here long lCount =m_ProfTab->ItemGetCount();//crashes here
}
CString sFormat; //sFormat.Format (_T("%d ,%d "),lSel,lCount); //AfxMessageBox (sFormat);
return 0; }
|
|
Customer Support Team
|
May 3, 2003 - 9:04 AM
|
Dear Rajneesh,
Prof-UIS is an MFC extension library by definition and should be called from an MFC-based EXE program. In case your component is critical for your application, we could help you write a similar component based on CExtTabWnd, which is compatible with the ATL control project.
|
|
rajneesh
|
May 6, 2003 - 7:16 AM
|
Hi, I have to use the profuis in my ATL Controls. So what i have to do so that this dll can be used in ATL.
Regards, Rajneesh
|
|
Customer Support Team
|
May 6, 2003 - 9:37 AM
|
Dear Rajneesh,
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 solution we can suggest you is to include some of the Prof-UIS source files directly into your ATL project (e.g. ExtTabWnd.*, ExtPaintManager.*). But, in this case, you have to modify those files, i.e. to remove dependency of other library sources.
If you encounter any problems, we can make a test ATL project with the modified version of the tab window inside. BUT PLEASE NOTE: THIS PROJECT WILL NOT USE PROF-UIS DLL.
|
|
rajneesh
|
May 2, 2003 - 6:35 AM
|
Hi, I am using your Professional User Interface SDK in my application. I have written a class derived from Profuis CExtTabWnd class to create tab wnd control. I need to perform some lengthy operation when the user changes the tab selection. For this i have overwritten OnTabWndSelectionChange() virtual function, but i found that this method is called twice for a single selection, which i can’t afford as my processs takes a long time. I have also tried this with OnTabWndClickedItem() virtual function but the same thing happens. Suggest some remedy for this.
Also i wan’t to know if i can subclass my existing controls with Profuis classes.
|
|
Customer Support Team
|
May 3, 2003 - 8:44 AM
|
Dear Rajneesh,
Yes, you are right. Those functions are really called twice. Please take a look at their declarations: virtual bool OnTabWndClickedItem( LONG nItemIndex, bool bButtonPressed, INT nMouseButton,UINT nMouseEventFlags ); virtual bool OnTabWndSelectionChange( LONG nOldItemIndex, LONG nNewItemIndex, bool bPreSelectionTest ); When calling OnTabWndClickedItem for the first time, bButtonPressed is set to true and, if the function returns false, it will not be called for a second time. When it is called for a second time, bButtonPressed is false. This is similar to the OnLButtonDown/OnLButtonUp behavior. When calling OnTabWndSelectionChange for the first time, bPreSelectionTest is set to true too. In case the returned value is false, the second call of OnTabWndSelectionChange will not be done. This allows you to disable selection of some items when you need it. I think you should start performing your lengthy operation when OnTabWndSelectionChange is being called for a second time (with bPreSelectionTest = false). In this case, the long time operation will be started just after the tab item is repainted to a selected state.
|
|
Oliver
|
Apr 22, 2003 - 4:33 AM
|
When I change the menu font size with the public property CExtPaintManager::m_FontNormal, the height of popup menu items and the menu bar are not recalculated and they are uses a fixed height.
How can I solve this problem? Is there a way to set the height manually?
Best regards, Oliver
|
|
Customer Support Team
|
May 3, 2003 - 8:04 AM
|
Dear Oliver,
Indeed, in version 2.21 the size of any menu item is calculated automatically and cannot be set individually. The CExtPaintManager::m_FontNormal member specifies the system font used for drawing menu items. The reason for such rigid binding of menu sizes to the system font was to allow the developer create standard, well defined user interfaces.
Nevertheless, we have now improved the situation by enabling the developer to modify CExtPaintManager::m_FontNormal and values associated with it on-the-fly. This feature will be available in version 2.22.
Please, let us know if you need the feature immediately and we will send you renewed sources and a sample at once.
|
|
Oliver
|
May 6, 2003 - 8:58 AM
|
Thanks for your reply.
It is urgent for me th get a solution immediately. Can you mail me the renewed sources and the sample.
Best regards, Oliver
|
|
Customer Support Team
|
May 6, 2003 - 9:20 AM
|
Dear Oliver,
Today we will send you all the files you need.
|
|
Olaf Baeyens
|
Jan 13, 2003 - 7:56 AM
|
In CMainFrame::OnCreate() I call: m_wndResizableBarTree.AutoHideModeSet (TRUE,TRUE,TRUE,TRUE);
But this generates an debug assert error in following code cmd_t * p_cmd = CmdGetPtr( *pCommands ); if( p_cmd == NULL ) { ASSERT( FALSE ); bRetVal = false; // we find some error continue; } p_cmd->StateSetBasic( bOn );
of function CExtCmdManager::cmd_profile_t::SetBasicCommands()
I have a SDI view, how do I make this autohide operational?
|
|
olaf Baeyens
|
Jan 15, 2003 - 3:27 AM
|
I cannot say that I have a very fast response what is supposed to be a priority support. :-(
But I have my sollution, to add automatich tool bar with hide functionality for all your control bars.
First add this just after CExtControlBar::FrameEnableDocking() in de CMainFrame: ---------------- if( !CExtControlBar::FrameInjectAutoHideAreas(this)){ ASSERT( FALSE ); return -1; } ----------------
And now in you application viaw add this part of the code or your painting gets wierd.
---------------- BOOL CSDIDOCVIEWView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs cs.style |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
return CView::PreCreateWindow(cs); }
|
|
Olaf Baeyens
|
Jan 13, 2003 - 7:50 AM
|
I am creating a dialog CMaterialDlg class inherited from CExtResizableDialog.
Then in CMainFrame I define this.
CExtWRB<CMaterialDlg> m_wndDockedResizableModelDialog;
But when I show the dialog alle gets painted exept the buttons. It appears that a WM_PAINT for the button is missing, because if I click on it the the button gets correctly painted.
This problem exists only on Windows XP and works fine on Windows 2000.
Also, if I have 2 buttons on this dialog then both are black. If I click one then this one gets painted, and if I then click on the other that one gets painted but the other is black again...
Anyone have some ideas how to fix this?
|
|
olaf Baeyens
|
Jan 15, 2003 - 3:32 AM
|
It seems that some paint commands are lost to paint the dialog bars when running on Windows XP.
Also when I have multiple control bars in one control bar (tabs), sometimes I see the painting occur multiple times.
|
|
Yong Seok Kim
|
Jan 9, 2003 - 10:19 PM
|
Hello, I am trying to test the Prof-UIS sample code SDIDOCVIEW because I think the code is good for our new application. But, some bugs were found at your programs when I tested it in my computer which has dual monitors and uses Windows XP. The bugs are as follows. 1. The main menu items appeared at the most right side of the primary monitor when the sample progam "sdidocview.exe" is excuted on the second monitor. 2. "Assert failed" occures when the smaple program is started form any one monitor and move it to the other monitor and click the title bar of a docked control bar.
The "assert failed" occured at the line 12300 in ExtControlBar.cpp file. The line has "ASSERT( rcFrameWnd.left <= rcCircle0.left );".
The followings are call stack values when the assert is failed. CExtControlBar::InternalDraggingState_t::CalcStateDynamic(CPoint {x=1113 y=309}) line 12299 + 30 bytes CExtControlBar::_DraggingUpdateState(const CPoint & {x=1113 y=309}) line 8470 CExtControlBar::_DraggingStart(const CPoint & {x=1113 y=309}, const CPoint & {x=86 y=7}) line 8251 + 20 bytes CExtControlBar::OnLButtonDown(unsigned int 1, CPoint {x=1113 y=309}) line 6632 + 24 bytes CWnd::OnWndMsg(unsigned int 513, unsigned int 1, long -851886, long * 0x0012fb28) line 1964 CWnd::WindowProc(unsigned int 513, unsigned int 1, long -851886) line 1585 + 30 bytes CControlBar::WindowProc(unsigned int 513, unsigned int 1, long -851886) line 480 + 20 bytes CExtControlBar::WindowProc(unsigned int 513, unsigned int 1, long -851886) line 5470 AfxCallWndProc(CWnd * 0x00377ee8 {CExtControlBar hWnd=???}, HWND__ * 0x00090404, unsigned int 513, unsigned int 1, long -851886) line 215 + 26 bytes
You have to make a decison whether we use your product or not ASAP. Please, let me know what is wrong with my sample program ASAP.
Thanks, Yong Seok Kim
P.S. ; Yong Jin Shin who is in purchasement part bought your product Prof-UIS but I am the software team manager who is trying to test your program. So, please reply your answer to my e-mail adress.
|
|
Frédéric LOSACCO
|
Dec 12, 2002 - 2:18 AM
|
Hello,
I do not manage to put CExtToolControlBar into vertical on 2 columns in a MdiFrame ! How can one do that ?
Thanks,
Fred
|
|