Subject |
Author |
Date |
|
Thomas Maurer
|
Dec 16, 2005 - 4:16 AM
|
Hello
When I am autohiding a toolbar (containing two tabbed controlbars) I get the following assertion:
(extcontrolbar.cpp; line 16900)
ASSERT( ((CExtDockBar*)pWndParent)->_GetCircleNo() > 0 );
When I ignore the assertion everything seems to work fine, so I have no idea what’s happening. I also think that I only have this behaviour since version 2.50 (which I am currently using).
Thanks in advance
Thomas
|
|
Technical Support
|
Dec 16, 2005 - 8:51 AM
|
We guess you have used the CFrameWnd::DockControlBar() method to dock both toolbars and resizable control bars. But this method cannot be used for resizable bars. Please use only the CExtControlBar::DockControlBarInnerOuter() , CExtControlBar::DockControlBarLTRB() and CExtControlBar::DockControlBarIntoTabbedContainer() methods instead. The CExtControlBar::DockControlBarInnerOuter() methods will dock the resizable bar to a valid position in the inner part of the main frame window. Other two methods will dock one bar relative to another one.
|
|
Thomas Maurer
|
Dec 16, 2005 - 3:01 PM
|
Thank you for your answer. CExtControlBar::DockControlBar works also. I chose that one because I think this was the easiest to understand. Is there a problem with that? Will something go wrong some place else? Thomas
|
|
Technical Support
|
Dec 19, 2005 - 2:38 AM
|
The resizable control bar is a more advanced dockable window than any of control bars available in MFC. That is why we had to code our own version of those methods for specifying docked locations. The CExtControlBar::DockControlBar() method is supported only for compatibility with older Prof-UIS versions. We think the CExtControlBar::DockControlBarInnerOuter() and CExtControlBar::DockControlBarLTRB() methods are easier to understand and to use. You can simply dock several of your bars using the CExtControlBar::DockControlBarInnerOuter() method and organize a nested bars layout in the frame window. Then you can dock several next bars using the CExtControlBar::DockControlBarLTRB() method, which allows you to dock more than one bar into one row/column of bars and organize horizontal rows with bars inside vertical columns with bars and vice versa. We would like to ask you to read the Docking Mechanism Explained article (http://www.prof-uis.com/ArticleRead.aspx?AID=142). It may be helpful with regard to the CExtControlBar::DockControlBar...() methods.
|
|
George Ross
|
Dec 15, 2005 - 3:37 AM
|
Hi I have a dialog with many controls, it is actually a data entry dialog. I will include it in a CExtcontrolBar I arrange the controls either vertically or horizontally depending on the CExtcontrolBar position(bottom/top horizontally,Left/Right Vertically). I wonder if it is better to use a CFormView to get the ScrollBars in case the Panel is too small to fit all controls. I am not using CextResizableDialog since i do no need to resize controls but to change their position. regards George
|
|
Technical Support
|
Dec 15, 2005 - 9:04 AM
|
Our point of view is, if you have ten input editors, the property grid control would be more convenient. You should have some strong reasons to use the form view like ActiveX controls in it (a chart control, a media player control etc.). Of course, it is possible to use the form view inside the resizable control bar and Prof-UIS even features the CExtAFV template class adaptor which helps to make the background of the form view window painted like you see in CExtResizableDialog windows. You can use it in your form view classes: class CChildView
: public CExtWS < CExtAFV < CFormView > >
{
. . . You can send us a screenshot of your current data input form so we can discuss this issue further.
|
|
Sam Contapay
|
Dec 14, 2005 - 11:24 PM
|
I am using version 2.51 of Prof-UIS Visual Studio 2003 and when I create a simple DIALOG based application using the PROF-UIS wizard and do a straight build and compile I get this error:
ASSERT_VALID fails with illegal vtable pointer
Its a dialog based application with MFC and PROF-UIS linked statically.
Here’s the callstack:
skcbutler.exe!AfxAssertValidObject(const CObject * pOb=0x00afbab4, const char * lpszFileName=0x00a54ffc, int nLine=215) Line 92 C++ skcbutler.exe!CMapPtrToPtr::operator[](void * key=0x00afb3b8) Line 219 C++ skcbutler.exe!CMapPtrToPtr::SetAt(void * key=0x00afb3b8, void * newValue=0x00000000) Line 599 + 0x13 C++ skcbutler.exe!CTypedPtrMap<CMapPtrToPtr,CExtPmBridge *,void *>::SetAt(CExtPmBridge * key=0x00afb3b8, void * newValue=0x00000000) Line 1994 + 0x33 C++ skcbutler.exe!CExtPaintManager::CExtPaintManagerAutoPtr::Advice(CExtPmBridge * pPmBridge=0x00afb3b8) Line 1285 C++ skcbutler.exe!CExtPopupBaseWnd::PmBridge_Install() Line 3819 + 0x51 C++ skcbutler.exe!CExtPopupBaseWnd::CExtPopupBaseWnd() Line 3841 C++ > skcbutler.exe!CExtPopupMenuTipWnd::CExtPopupMenuTipWnd() Line 5202 + 0x40 C++ skcbutler.exe!CExtPopupMenuSite::CExtPopupMenuSite() Line 423 + 0x3b C++ skcbutler.exe!$E1() Line 137 + 0x28 C++ skcbutler.exe!_initterm(void (void)* * pfbegin=0x00aec5c8, void (void)* * pfend=0x00aec9cc) Line 600 C skcbutler.exe!_cinit(int initFloatingPrecision=1) Line 215 + 0xf C skcbutler.exe!WinMainCRTStartup() Line 229 + 0x7 C kernel32.dll!7c816d4f() ntdll.dll!7c915b4f() kernel32.dll!7c8399f3()
Any help would be appreciated. There is no error when I switch it to use MFC and Prof-UIS dynamically but I would like to compile it statically for smaller distribution size.
|
|
Sam Contapay
|
Dec 14, 2005 - 11:56 PM
|
If I step back uninstall and go back to 2.50 using the full install download from the website. The above applicaiton works fine with no errors.
|
|
Technical Support
|
Dec 15, 2005 - 8:52 AM
|
We cannot yet confirm this problem. We tried to create a sample project with the Prof-UIS Application Wizard and Visual Studio .NET 2003 and have not faced any assertions. Here is our generated project we used to test Prof-UIS 2.51: TestSimpleDlg2003.zip.
We guess you may have unpacked something incorrectly. Did you close the instance(s) of Visual Studio before replacing 2.50 with 2.51?
|
|
Olaf Reusch
|
Jan 3, 2006 - 3:47 AM
|
I have the same problem with Prof-UIS 2.51. The Stack is the same.
|
|
Technical Support
|
Jan 3, 2006 - 4:39 AM
|
We have already found out what produces the problem described in the top message by Sam. The problem was really added in 2.51 where the most of components are able to receive notifications from the global paint manager. All the components register their pointers for that. Both the paint manager (g_PaintManager ) and popup menu site (g_MenuSite ) are global variables. The CExtPopupMenuTipWnd object in the menu site is initialized before the paint manager is initialized. That is why the problem occurs. Please contact us to get the bug-free source code.
|
|
Olaf Reusch
|
Jan 3, 2006 - 4:29 AM
|
I have the same Error with your Test Dialog Application. I have switch the compile option from dynamic mfc to static mfc and then come the vtable pointer assert.
|
|
Olaf Reusch
|
Jan 3, 2006 - 4:31 AM
|
I use VS2003 with STLPort
|
|
Technical Support
|
Jan 3, 2006 - 4:59 AM
|
Any STL is not a problem. The discussed assertion is a "feature" which was added in 2.51 and is already removed in 2.52. We are sorry for any inconvenience and can provide you with the source code update. Please contact us by e-mail so we can tell you how to download the update by ftp.
|
|
Olaf Reusch
|
Jan 8, 2006 - 11:14 AM
|
|
|
Srinivasan Natarajan
|
Dec 13, 2005 - 9:31 PM
|
Hi, When i try to build the Dll (in VC++6.0) , i received the following error C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\transact.h(226) : error C2059: syntax error : ’constant’ C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\transact.h(271) : error C2143: syntax error : missing ’;’ before ’}’ C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oledb.h(17149) : error C2143: syntax error : missing ’;’ before ’}’ C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oledb.h(17149) : error C2143: syntax error : missing ’;’ before ’}’ C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oledb.h(17149) : error C2143: syntax error : missing ’;’ before ’}’ Prof-UIS is automatically linking with version.lib (Version info support) Error executing cl.exe. ExtCmdManager.obj - 5 error(s), 0 warning(s) regards sundar
|
|
Technical Support
|
Dec 14, 2005 - 9:58 AM
|
This build error may occur if you installed some new Platform SDK which had added its paths to the include folders list of Visual Studio 6.0. Please check the include paths and move Platform SDK include folders to the bottom of the list.
|
|
Ed Kennedy
|
Dec 12, 2005 - 7:05 PM
|
The app I’m starting on is a MDI app. Each view needs 4 tabs. Would you have any samples that could get me started? New sample with skins is SLICK! Thanks!
|
|
Technical Support
|
Dec 13, 2005 - 10:52 AM
|
You wrote: "Each view needs 4 tabs". So, we guess you plan to several types of views. Please let us know whether the MFC’s document/view architecture is needed? There are three ways to implement multi-view and/or multi-tab UI with Prof-UIS: 1) use MDI project and implement everything as an independent document/view. 2) use SDI project with Prof-UIS tab page container as the main view window and implement all other windows and tab pages. 3) use the project of type 1 or 2 and implement other windows as childs of Prof-UIS dynamic resizable bars. This is how it is done in Visual Studio .NET/2005. Any dynamic resizable control bar can be switched into the MDI document mode or into a child page in an SDI application. Your users may not even guess that the views are really dynamic resizable bars in the document mode. Everything will be able to be docked, floating or having a look of classic document/view. This approach is used in SDI_DynamicBars, MDI_DynamicBars and new Skinable sample applications. Please provide us with more details to let us advise you the appropriate solution.
|
|
Ed Kennedy
|
Dec 13, 2005 - 11:12 AM
|
I’m planning on using doc/view architecture presently. Basically the main window of the MDI app would be a tabbed interface. Somewhat like VS. But each of the views would themselves hold a tabbed view which breaks down the object into managable parts. For example, I could open several trucks and have several tabs across the top showing the route number. When I select route1 the view has several colored tabs across the bottom one of which is a form view that displays tractor-trailor information, one displays the manifest in a grid, one displays a map of the route and other displays the driver information. So I could select a route tab from the top and have several views I could switch between within that view. The route and it’s subtabs would be tied to the document. This is the direction I’m looking at now. Any suggestions would be welcome! Thanks for the quick response!
|
|
Technical Support
|
Dec 14, 2005 - 8:38 AM
|
You can start using the MDIDOCVIEW sample as a startup. First of all, create an MDI tab control in the CMainFrame class: // declaration
CExtTabMdiWnd m_wndMdiTabs;
// creation
if( ! m_wndMdiTabs.Create( this ) )
{
ASSERT( FALSE );
return -1;
} The creation of the MDI tab control should be the final operation performed by the CMainFrame::OnCreate() method. You can also use the CExtTabMdiFlatWnd , CExtTabMdiWhidbeyWnd() , or CExtTabMdiOneNoteWnd() class as the type of the m_wndMdiTabs property instead. The next step is to create a tab page container window as a child of the CMDIDOCVIEWView window. You need to add the CExtTabPageContainerWnd() (or CExtTabPageContainerWhidbeyWnd() or CExtTabPageContainerFlatWnd() or CExtTabPageContainerOneNoteWnd() ) property and the WM_CREATE and WM_SIZE message handler to the CMDIDOCVIEWView class. The CMDIDOCVIEWView::OnDraw() method should be left empty. Then, create the tab page container window and its children page windows in the OnCreate() method. Finally, to fit all the view’s client area, move the container window in the OnSize() method. Do not hesitate to contact us if you encounter any difficulties at any step.
|
|
Massimo Germi
|
Dec 12, 2005 - 9:39 AM
|
/* CExtGridWnd derived class */ I need to display a context menu when the user press right mouse button in a multiselected cell. I’ve tried to override .. void CGridSoftware::OnRButtonUp(UINT nFlags, CPoint point) { GetOwner()->SendMessage(WM_RCLICK,point.x,point.y); CExtGridWnd::OnRButtonUp(nFlags, point); } but multiselection disappears, there is a siple way to do this?
thanks
|
|
Technical Support
|
Dec 12, 2005 - 11:45 AM
|
In some of our projects we used the code below for handling context menus. This code handles the mouse up event and WM_CONTEXTMENU message. It changes the cell focus but not selection.
Header: virtual void OnShowContextMenu(
LONG nColNo,
LONG nRowNo,
CPoint ptTrack
);
virtual bool OnGbwAnalyzeCellMouseClickEvent(
UINT nChar, // VK_LBUTTON, VK_RBUTTON or VK_MBUTTON only
UINT nRepCnt, // 0 - button up, 1 - single click, 2 - double click, 3 - post single click & begin editing
UINT nFlags, // mouse event flags
CPoint point // mouse pointer in client coordinates
);
...
...
...
//{{AFX_MSG(CBaseGridWnd)
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
//}}AFX_MSG Source: BEGIN_MESSAGE_MAP(CBaseGridWnd,CExtGridWnd)
//{{AFX_MSG_MAP(CBaseGridWnd)
ON_WM_CONTEXTMENU()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
...
...
...
void CBaseGridWnd::OnShowContextMenu(
LONG nColNo,
LONG nRowNo,
CPoint ptTrack
)
{
nColNo;
nRowNo;
ptTrack;
// show you context menu here
}
bool CBaseGridWnd::OnGbwAnalyzeCellMouseClickEvent(
UINT nChar,
UINT nRepCnt,
UINT nFlags,
CPoint point
)
{
ASSERT_VALID( this );
ASSERT( 0 <= nRepCnt && nRepCnt <= 3 );
if( CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent(
nChar,
nRepCnt,
nFlags,
point
)
)
return true;
if( nChar == VK_RBUTTON
&& nRepCnt == 0 // 0 - button up
)
{
CExtGridHitTestInfo htInfo( point );
HitTest( htInfo, false, true );
if( (!htInfo.IsHoverEmpty()) && htInfo.IsValidRect()
&& htInfo.m_nRowNo >= 0
&& (htInfo.m_dwAreaFlags&__EGBWA_INNER_CELLS) != 0
)
{
CPoint ptFocus( htInfo.m_nColNo, htInfo.m_nRowNo );
SetFocus();
FocusSet( ptFocus, true, true, false );
CPoint ptTrack( point );
ClientToScreen( &ptTrack );
OnShowContextMenu(
htInfo.m_nColNo,
htInfo.m_nRowNo,
ptTrack
);
}
return true;
}
return false;
}
void CBaseGridWnd::OnContextMenu( CWnd * pWnd, CPoint point )
{
LONG nRowNo = SelectionGetLastRowInColumn( 0L );
if( nRowNo < 0 )
nRowNo = FocusGet().y;
if( nRowNo >= 0 )
{
CRect rcCell;
if( GridCellRectsGet(
0L,
nRowNo,
0,
0,
&rcCell
)
)
{
CPoint ptTrack( rcCell.left, rcCell.bottom );
ClientToScreen( &ptTrack );
OnShowContextMenu(
0L,
nRowNo,
ptTrack
);
}
}
}
|
|
Zhang KaiFeng
|
Dec 8, 2005 - 6:11 PM
|
1、I use the method BackColorSet(CExtGridCell::e_cell_state_t eCellState,COLORREF clr = COLORREF( -1L )) to change the color of thhe gridcell,when the first parameter is set to CExtGridCell::__ECS_ALL,it’s ok。But when the first parameter is set to the others ,there is a error when the program is running!The following is my code: CExtGCC<CExtGridCellString> ; CExtGridCellString * pCellString = STATIC_DOWNCAST( CExtGridCellString, GridCellGet (0L,nRowNo,0,0,RUNTIME_CLASS(CExtGridCellString))); pCellString->BackColorSet(CExtGridCell::__ECS_ALL,RGB(221,230,230));//it’s ok!! pCellString->BackColorSet(CExtGridCell::__ECS_SELECTED,RGB(221,230,230));//it’s not ok!!
|
|
Technical Support
|
Dec 9, 2005 - 9:50 AM
|
First of all, you don’t need to apply the CExtGCC template decorator to the CExtGridCellString class. It is derived from CExtGridCellEx , which already applies this template to CExtGridCell : CExtGridCellString : public CExtGridCellEx
CExtGridCellEx : public CExtGCC < CExtGridCell > Then, do not associate colors with the CExtGridCell::__ECS_SELECTED and CExtGridCell::__ECS_ALL modes simultaneously because, if you set colors to all the cell modes, other colors are ignored. Please take a look at the CExtGridCell::OnQueryBackColor() method so you can see how we select the appropriate color: COLORREF clrBackAll = BackColorGet( __ECS_ALL );
COLORREF clrBackNormal = BackColorGet( __ECS_NORMAL );
COLORREF clrBackSelected = BackColorGet( __ECS_SELECTED );
COLORREF clrBackHovered = BackColorGet( __ECS_HOVERED );
if( clrBackAll != COLORREF(-1L) )
return clrBackAll;
...
|
|
Timothy Anderson
|
Dec 8, 2005 - 4:45 PM
|
I simply created an app from app wiz, added a menu bar and a toolbar both using the IDR_MAINFRAME resource. No icons. What other step is required to get the icons displayed? I hate to say this, but it isn’t particularly obvious what calls need to be inserted into an app built from scratch with app wiz. I’ve gone over the MDI application and whatever it’s doing that I’m not doing isn’t obvious. I’m not doing any profile saving/restoring/whatever. I simply added a toolbar to a bare bones app.
|
|
Technical Support
|
Dec 9, 2005 - 7:11 AM
|
The application generated with the Prof-UIS Application Wizard should work without any problems, including displaying icons in toolbars. It seems you made some changes, if not, please let us know. You cannot see images in toolbars only if you forgot to initialize the command manager for your main frame or dialog window. If you don’t call g_CmdManager->ProfileSetup() and/or g_CmdManager->ProfileWndAdd() code during the application startup with specifying HWND of your main frame or dialog window in it, then both toolbars and popup menus will not be able to find command descriptions (with icons, menu texts, tip texts and etc.) in the command manager. So, just make sure that it has been done.
|
|
Timothy Anderson
|
Dec 9, 2005 - 2:10 PM
|
Oh boy, more dope slaps to self!
|
|
Timothy Anderson
|
Dec 8, 2005 - 6:13 PM
|
Apparently I can’t get away from using the profile entry points. I’m hoping the profile stuff is fairly straight forward as I have to be able to override all registry reads/writes because of rediculous security concerns from some overly paranoid users.
|
|
Technical Support
|
Dec 9, 2005 - 7:16 AM
|
Using the profile does not mean that it is automatically saved into the registry. Saving/Loading to/from the registry happens when you invoke the CExtControlBar::ProfileBarStateLoad() , CExtControlBar::ProfileBarStateSave() or g_CmdManager->SerializeState() methods. We have the StateInFile sample application that demonstrates how to load/save the user interface state from/to a disk file not using the registry. So, please take a look at it. That that may resolve the issue with the registry.
|
|
Timothy Anderson
|
Dec 9, 2005 - 2:10 PM
|
|
|
Suhai Gyorgy
|
Dec 7, 2005 - 1:53 PM
|
Hi! I was trying to find out the right way to initially start a dynamic control bar as tabbed document. I took the SDI_DynamicBars sample as sarting point, but the initialization part (the "for(i=0,j=0;i<...;j++)" block) was too difficult for me to understand completely. I start my code with initializing another, docked control bar: m_pMyBar1->DockControlBar(...); m_pMyBar1->BarStateSet(...DOCKED, true); after that I tab in the other bar: ShowControlBar(m_pBar2, true, true); m_pBar2->BarStateSet(...DOCUMENT, true);
My problem is: when I start the app, in the Menu it seems like m_pMyBar2 isn’t visible (the menuline is not checked), although I can see it tabbed. And when I click on that menuline, another instance of Bar2 appears docked outside the View (CExtTabPageContainerWhidbey). What am I doing wrong? Could you please send me a small sample with only two control bars in it and without using the array m_arrAllDynamicBars of CTypedPtrArray? Thank you very much: Chris.
|
|
Technical Support
|
Dec 8, 2005 - 9:04 AM
|
We have a sample application that seems to be what you are searching for. The "strange" part of code from our standard set of samples is required to make a funny docked bar layout with multiple nested bar levels at the top/bottom/left/right frame window sides. The sample application mentioned above does not have this code. It creates two bars and makes one of them switched into the document tab mode in the tab page container window initially.
|
|
Suhai Gyorgy
|
Dec 9, 2005 - 3:25 AM
|
I guess I figured out what caused the problem mentioned in the first post of this thread: Since I don’t want AutoHide feature in my app I made some steps eliminating it and probably that’s where I made the mistake. So what I would like to reach is this: in the menu I don’t want icons next to the DynamincBars’ names, rather I want them checked showing whether they are visible or not. If the user clicks the menuline, I want to hide the bar if it was visible, or show it if it was hidden. I made the following steps in the CMainFrame class of the sample code you’ve sent me:
a) commented out the declaration and definition of OnCmdMsg, OnBarCheck and OnUpdateControlBarMenu methods.
b) from OnCreate I commented out the calls of FrameInjectAutoHideAreas, LoadImage, AssignFromHICON methods, in BarAlloc I wrote NULL as second parameter instead of iconA and iconB.
c) in the MessageMap I inserted the following: ON_COMMAND_EX( 5000, OnBarCheck ) ON_UPDATE_COMMAND_UI( 5000, OnUpdateControlBarMenu ) for both DynamicBars (I don’t want the user to be able to hide the menu, so I removed the two lines refering to the menu from the MessageMap)
Compile and run. You should see what I wrote earlier: in the menu BarB is not checked, although it’s visible and when I click on the menuline, another BarB appears.
I know I will have to override OnInitDbsMenu to remove AutoHide entry from the context menu. But could you tell me what should I do to reach my goal (remove AutoHide feature)?
P.S.: Why don’t you call m_pDynamicBarA->EnableDocking( CBRS_ALIGN_ANY ); and m_pDynamicBarB->EnableDocking( CBRS_ALIGN_ANY ); nowhere in your sample? Isn’t it neccessary? Thank you for your help: Chris
|
|
Technical Support
|
Dec 10, 2005 - 11:35 AM
|
We improved the sample we’d sent you the previous time. Please download it and let us know whether it is what you need.
|
|
Suhai Gyorgy
|
Dec 12, 2005 - 2:09 AM
|
Hi! There’s an error in this code you’ve sent me the last time: in the messagemap of CMainFrame, the line ON_COMMAND_EX( ID_VIEW_MENUBAR, OnBarCheck ) is there twice, but there’s no ON_COMMAND_EX( 5001, OnBarCheck ) line in it. Could you check that? Thanks.
|
|
Suhai Gyorgy
|
Dec 12, 2005 - 1:53 AM
|
Hi! Unfortunately this is not exactly what I need. The context menu is fine, also removing the autohide feature is fine, but in the main menu I don’t want icons next to the menuline "Bar A" and "Bar B". Instead I want a checkmark indicating whether that ControlBar is visible or not, and clicking the menuline should hide/unhide the ControlBar. To reach that, I removed the declaration and definition for both OnUpdateControlBarMenu and OnBarCheck methods from CMainFrame class, and also I invoked BarAlloc like:
"CExtDynamicBarSite::BarAlloc( _T("Bar A"), NULL, 5000, RUNTIME_CLASS( CMyControlBar ), true );" instead of "CExtDynamicBarSite::BarAlloc( _T("Bar A"), iconA, 5000, RUNTIME_CLASS( CMyControlBar ), true );" to remove the icons.
If you could do these same steps, you would see that BarB is not visible (its menuline is not checked). Everything works fine with BarA, but not with BarB. Could you check that issue as well, please?
Thank you: Chris
|
|
Gevork Odabashyan
|
Dec 7, 2005 - 6:09 AM
|
Hi Can I use dynamic control bars in the "static MFC & static Prof-UIS" build configuration? Thanks
|
|
Technical Support
|
Dec 15, 2005 - 11:55 AM
|
We are working on this issue. If there is no pitfalls, this will be ready soon and we will notify you about this by e-mail.
|
|
Technical Support
|
Dec 7, 2005 - 9:41 AM
|
Unfortunately the dynamic control bars are not available in static configurations. They use a menu which is loaded from resources. If this is critical for you, we can change the code so that the control bars can be available in static configurations.
|
|
Gevork Odabashyan
|
Dec 15, 2005 - 9:44 AM
|
Yes, it’s critical for our needs. When can You provide us with changes?
|
|
Gevork Odabashyan
|
Jan 11, 2006 - 8:58 AM
|
Hellow We are changing our project plan. One part of the project needs Your update. To include this part in plan we need to now, is it possible for You to provide us with this changes till this weekend? Or we must delay this part? Thanks
|
|
Technical Support
|
Jan 12, 2006 - 12:59 PM
|
We have already implemented this feature in Prof-UIS 2.52. The static libraries are now absolutely similar to dynamic ones. Please send us e-mail to support@prof-uis.com so we can provide you with this update.
|
|
Gevork Odabashyan
|
Dec 6, 2005 - 12:41 PM
|
Hi I create simple Prof-UIS SDI application (VS7.1). All settings are by default. Add a CExtButton to the resizable dialog. Question 1. In the button’s settings set horizontal alignment = center. Button’s text is drown with left alingment. Question 2. I set an ahchor on this button: m_wndDockedResizableDialog.AddAnchor( IDC_BUTTON_TEST, __RDA_KEEP, __RDA_BOTH ); Then start to resize dialog’s control bar. When the width of the button become less then it’s text’s length, the right symbols are clipping (filling with the button’s surface color). Is this a bug?
Thanks
|
|
Technical Support
|
Dec 7, 2005 - 9:39 AM
|
Here are the answers to your questions.
#1 Thank you for the bug report. The problem was with detecting the button alignment. To detect whether the center alignment, we checked the BS_CENTER style, but in fact this style is a bit mask for the BS_LEFT and BS_RIGHT styles, so the alignment was always center when either the left/right alignment was applied. Here is the update for the CExtButton::PreSubclassWindow() method: void CExtButton::PreSubclassWindow()
{
CButton::PreSubclassWindow();
DWORD dwWndStyle = GetStyle();
DWORD dwWndType = dwWndStyle&0x0F;
m_nButtonType = INT(dwWndType);
SetButtonStyle( BS_OWNERDRAW );
bool bAlignLeft = (dwWndStyle&BS_LEFT) != 0 ? true : false;
bool bAlignRight = (dwWndStyle&BS_RIGHT) != 0 ? true : false;
INT nAlignHorz = CExtPaintManager::__ALIGN_HORIZ_CENTER;
if( bAlignLeft && bAlignRight )
nAlignHorz = CExtPaintManager::__ALIGN_HORIZ_CENTER;
else if( bAlignLeft )
nAlignHorz = CExtPaintManager::__ALIGN_HORIZ_LEFT;
else if( bAlignRight )
nAlignHorz = CExtPaintManager::__ALIGN_HORIZ_RIGHT;
else if( SupportsCommand() || (dwWndStyle&BS_PUSHLIKE) != 0 )
nAlignHorz = CExtPaintManager::__ALIGN_HORIZ_CENTER;
bool bAlignTop = (dwWndStyle&BS_TOP) != 0 ? true : false;
bool bAlignBottom = (dwWndStyle&BS_BOTTOM) != 0 ? true : false;
INT nAlignVert = CExtPaintManager::__ALIGN_VERT_CENTER;
if( bAlignTop && bAlignBottom )
nAlignVert = CExtPaintManager::__ALIGN_VERT_CENTER;
else if( bAlignTop )
nAlignVert = CExtPaintManager::__ALIGN_VERT_TOP;
else if( bAlignBottom )
nAlignVert = CExtPaintManager::__ALIGN_VERT_BOTTOM;
else if( SupportsCommand() || (dwWndStyle&BS_PUSHLIKE) != 0 )
nAlignVert = CExtPaintManager::__ALIGN_VERT_CENTER;
m_nAlign = (nAlignHorz | nAlignVert);
m_nCheck = GetCheck();
bool bEnabled = OnQueryWindowEnabledState();
PostMessage( // delayed repainting
WM_ENABLE,
(WPARAM) bEnabled ? TRUE : FALSE
);
} #2 We cannot say that this is a bug, but we agree that the text painting can be improved. Please open the CExtPaintManager::PaintPushButton() and CExtPaintManagerXP::PaintPushButton() methods. Find the following code snippet: CRect rcCenteredCaption( rectCaption );
rcCenteredCaption.OffsetRect(
( ( _ppbd.m_nDrawTextFlagsH & DT_CENTER ) != 0 )
? ( ( rectCaption.Width() - rcText.Width() ) / 2 )
: 0
,
( ( _ppbd.m_nDrawTextFlagsH & DT_VCENTER ) != 0 )
? ( ( rectCaption.Height() - rcText.Height() ) / 2 )
: 0
); and replace it with the following one: CRect rcCenteredCaption( rectCaption );
if( rcText.Width() < rectCaption.Width() )
rcCenteredCaption.OffsetRect(
( ( _ppbd.m_nDrawTextFlagsH & DT_CENTER ) != 0 )
? ( ( rectCaption.Width() - rcText.Width() ) / 2 )
: 0,
0
);
if( rcText.Height() < rectCaption.Height() )
rcCenteredCaption.OffsetRect(
0,
( ( _ppbd.m_nDrawTextFlagsH & DT_VCENTER ) != 0 )
? ( ( rectCaption.Height() - rcText.Height() ) / 2 )
: 0
);
|
|
Gevork Odabashyan
|
Dec 15, 2005 - 9:35 AM
|
|
|
Michael Valentine
|
Dec 6, 2005 - 8:08 AM
|
Hi, I need to programmatically expand/collapse items in my property grid. I am doing so in the following way: CExtPropertyCategory* pCat = new CExtPropertyCategory("Test"); VERIFY(PropertyStore()->ItemInsert(pCat); pCat->ExpandedSet(bExpanded); This seems to work, however if I then click on subitems of this category I get the following assert: ASSERT( m_nContentWeightExpanded >= nWeight ); This i
|
|
Michael Valentine
|
Dec 6, 2005 - 8:29 AM
|
Sorry the formatting is all messed up there, it looked fine in the preview! The assert is occuring in line 96 of exttreegridwnd.cpp. I am also calling PropertyStoreSynchronize and RecalcLayout functions after adding my items.
|
|
Technical Support
|
Dec 7, 2005 - 2:22 AM
|
The CExtPropertyGridCtrl window contains one or more tree grid windows which are instances of the CExtPropertyGridWnd -derived classes. By default, there are two grid windows created: the CExtPropertyGridWndCategorized and CExtPropertyGridWndSorted windows. Each of them contains tree items that correspond to the property items in the property store. By default, the CExtPropertyGridWndCategorized window contains all the property values and property categories and the CExtPropertyGridWndSorted window contains only property values and no property categories. Your code should assume that each tree window may or may not contain any property item from the property store. So, traverse all the tree grid windows, find >HTREEITEM lines corresponding to the property category, and expand/collapse them if needed: bool bExpand = true; // or false
CExtPropertyCategory * pPropertyCategory = . . .
CExtPropertyGridCtrl & wndPGC = . . .
CTypedPtrArray < CPtrArray, CExtPropertyGridWnd * > arrGrids;
wndPGC.OnPgcQueryGrids( arrGrids );
INT nGridIdx = 0;
for( ; nGridIdx < arrGrids.GetSize(); nGridIdx ++ )
{
CExtPropertyGridWnd * pGrid = arrGrids[ nGridIdx ];
ASSERT_VALID( pGrid );
HTREEITEM hTreeItem =
pGrid->PropertyItemToTreeItem(
pPropertyCategory
);
if( hTreeItem == NULL )
continue;
pGrid->ItemExpand(
hTreeItem,
bExpand ? TVE_EXPAND : TVE_COLLAPSE
);
} // for( ; nGridIdx < arrGrids.GetSize(); nGridIdx ++ )
|
|
Michael Valentine
|
Dec 7, 2005 - 3:47 AM
|
Thanks for your answer but I found that it only works for items that are at the root level, i.e. it is not recursive and hence I still get the same assert. However I realise now that the problem is that I needed to set all of the child items to be collapsed if their parent is. Calling the following code on the item to expand/collapse seemed to do the trick: void CPropertyGridCtrl::ExpandItem(CExtPropertyItem* pItem, bool expand) { for (int i=0;i<pItem->ItemGetCount();i++) { CExtPropertyItem* pChildItem = pItem->ItemGetAt(i); ExpandItem(pChildItem, expand); } pItem->ExpandedSet(expand); }
|
|
Technical Support
|
Dec 7, 2005 - 9:52 AM
|
We have carefully checked the CExtTreeGridWnd class item expanding code and not found the problem with visible item offset calculation. We would appreciate if you send us any test project with the CExtPropertyGridCtrl window where this assertion persists.
|
|
Michael Valentine
|
Dec 8, 2005 - 2:56 AM
|
Ok, I have sent you some code...
|
|
Suhai Gyorgy
|
Dec 6, 2005 - 3:43 AM
|
Some months earlier in a thread we asked about problems with customization when using statically linked library. That time you said the issue was not yet fully solved but you would be working on it following the next major release (that was 2.50). So now I would like to enquire about the progress of the matter. Thank you.
|
|
Technical Support
|
Dec 6, 2005 - 10:19 AM
|
Unfortunately we have not implemented that yet. We will release Prof-UIS 2.51 (an intermediate release), which includes the Skinning support (PNG-based GUI), in a few days. So we will return to this issue after that.
|
|
Suhai Gyorgy
|
Dec 6, 2005 - 3:30 AM
|
Hi!
My app is an SDI without the Document/View architecture. I have a CWnd-derived View but I don’t really use it. But I have five Resizable control bars and I’d like to make them occupy the whole client area. This way I would only see the view if all the control bars are closed. I was thinking to use CExtControlBar::DockControlBarLTRB method for the second, third etc. controlbars, but I should dock the first control bar so that it covers the client area and also grows/shrinks along with it in case the user resizes the window. How could I do that?
Thank you for your answer: Chris
|
|
Technical Support
|
Dec 7, 2005 - 1:48 AM
|
Please take a look at how it is done in the SDI_DynamicBars sample. There is a tab page container used as the main view window in it. This design allows you to get the content of dynamic control bars into tab pages inside the tab page container. So, using dynamic bars will help you avoid coding the child view window.
|
|
Suhai Gyorgy
|
Dec 6, 2005 - 2:41 AM
|
Hi!
I’ve read one thread in the other forum concerning the above problem. I’d like to ask some more about this issue. If I set the CExtPopupMenuWnd::g_bMenuExpanding and CExtPopupMenuWnd::g_bMenuHighlightRarely flags to false, I guess I can comment out the definition of statBasicCommands array and the call of g_CmdManager->SetBasicCommands method from my MainFrame’s OnCreate method. Is that correct? Or does SetBasicCommands set something else as well?
Thank you for your answer: Chris.
|
|
Technical Support
|
Dec 6, 2005 - 10:12 AM
|
The g_CmdManager->SetBasicCommands() just enables/disables the command statistics for the commands specified by pCommands . If the bOn parameter is set to true , the commands are always displayed in the menu; otherwise, they are hidden. So if you disable the most recently used menu items feature, then you don’t need to call this method.
|
|
Krzysztof Janik
|
Dec 5, 2005 - 7:56 AM
|
During reading your technical suport board, I have stumbled upon a demo of your work-in-progress Prof-UIS 2.51 (http://www.prof-uis.com/download/forums/2005-11-30/PNG-based-UI.zip). I’m actually pretty much excited about possibility of skinning the user interface. Would you please tell me when are you planning to release any version with custom skinning capabilities and tell me what functionality we can expect with regard of this?
|
|
Technical Support
|
Dec 6, 2005 - 10:34 AM
|
The ProfSkin project is 90% done and ready to be released right now. Unfortunately we have only one skin at the moment (contains 299 PNG files). This skin was used for testing and debugging. We need some more time for testing and creating at least one more skin. If you need the Prof-UIS 2.51 right now, please drop us a line by e-mail so we can tell you how to download it.
|
|
Timothy Anderson
|
Dec 2, 2005 - 5:53 PM
|
If I have a floating menu put up by right mousing on (in my case) a node in a tree view. When I cancel the popup by left mousing anywhere I get a magical disabled floating menu with my application name in it at the location of the left mouse up. How can I go about trying to figure out where this popup is coming from? This happens with plain old MFC CMenu’s and also with the newfangled CExtPopupMenuWnd’s I switched to. This ONLY happens after a trackpopupmenu and after the menu has already been cleaned off. It’s pretty weird, I must admit.
|
|
Timothy Anderson
|
Dec 2, 2005 - 6:13 PM
|
Should we be getting wm_contextmenu’s as a result of lmouse clicking to dismiss a popup menu? The wm_contextmenu is plowing into the window message hook and creating this popup menu tracker.
|
|
Timothy Anderson
|
Dec 2, 2005 - 6:23 PM
|
My tree control is indeed drag/drop enabled if this is of any help.
|
|
Technical Support
|
Dec 3, 2005 - 1:17 PM
|
We know that the tree control does not send the WM_CONTEXTMENU standard windows message after the right mouse click. The KB222905 article just proves this issue. We may guess you simply forgot to specify the TPMX_DO_MESSAGE_LOOP flag when invoking the CExtPopupMenuWnd::TrackPopupMenu() method.
|
|
Timothy Anderson
|
Dec 5, 2005 - 11:59 AM
|
No, I’m doing the tpmx_do_message_loop thing. It flat doesn’t work unless you have this flag set.
|
|
Timothy Anderson
|
Dec 5, 2005 - 11:53 AM
|
Someone is sending it. This worked perfectly fine until I switched to using the prof-uis toolkit.
|
|
Technical Support
|
Dec 6, 2005 - 10:09 AM
|
It seems we need to take a look at your project to come to any conclusion. Could you send us a test project that demonstrates the problem?
|
|
Timothy Anderson
|
Dec 6, 2005 - 3:43 PM
|
Here’s a zipped up project for you. VC710, from scratch MDI application with all the defaults. Switched doc’s view to a ctreeview, added in some default items for fun, added in rclick menu to tree view (worked OK), switched to prof-uis menu and status bar in main frame, broke. Just click on the "tree" when it first starts, then right click, then left click anywhere. This actually demonstrates two problems of a similar nature I’m having. The phantom wm_contextmenu popup and some weirdness added to the tree control’s popup menu. ftp://ftp.predator-software.com/support/TreeControlTest.zip Let me know what you find.
|
|
Technical Support
|
Dec 7, 2005 - 6:57 AM
|
The answer is simple. The problem is in the CTreeControlTestView::OnNMRclick() method. You forgot to mark the message as handled and to suppress the default handling. You need to assign 1 to the *pResult parameter if you handled the message successfully or 0 otherwise: *pResult = 1; // handled
*pResult = 0; // not handled With the standard menu, the problem does not occur because Prof-UIS adds its own built-in popup menus if there is no user implementation.
|
|
Timothy Anderson
|
Dec 7, 2005 - 4:52 PM
|
I have administered a dope slap to myself on your behalf!
|
|
Timothy Anderson
|
Dec 6, 2005 - 3:34 PM
|
When I left the original frame menu alone and added just the rclick popup everything worked fine. When I added in the prof-uis status and menu bar to the main frame then I got a weird double-menu in the rclick menu popup and the fantom wm_context came flying around again. Where can I post my sample app?
|
|
Timothy Anderson
|
Dec 6, 2005 - 1:20 PM
|
I’ll see if I can build a small example. I got stuck on something else yesterday, but I was able to verify the wm_context menu isn’t coming into the tree control at least. I’m sure you guys are better at tracking down all these goofball windows messages than I am, however.
|
|
Technical Support
|
Dec 7, 2005 - 1:53 AM
|
|
|
Emil Pop
|
Dec 2, 2005 - 5:36 AM
|
Hi, On November 21st you sent to Thomas Roeder a sample of a grid embedded in a dialog box. (See the message Need an example pls) Would it be possible for me to get a copy of that sample? I need to build a grid in a modal dialog box. Thank you, Emil
|
|
Technical Support
|
Dec 2, 2005 - 7:54 AM
|
The following sample demonstrates how to implement a grid in the dialog. Please contact us in case of any questions.
|
|
Emil Pop
|
Dec 2, 2005 - 11:41 AM
|
|
|
George Ross
|
Dec 1, 2005 - 11:44 AM
|
Hi again thank you for the reply but did not solve the problem. Just to see what happens pse download the program from www.elcom.gr/sv2agw/beta/AGWTracker.msi Run the program and from the file menu select properties select from the tree view Miscelaneous and check "Separate windows for each view". Restart the program you will see that the left panel does not work correctly while in autohide mode. It behaves like it does not belong to the panel regards George
|
|
Technical Support
|
Dec 2, 2005 - 2:34 AM
|
This effect with the auto-hidden window occurs because the child view window in each top-level frame window does not have the WS_CLIPSIBLINGS style applied. So, just add this style with the PreCreateWindow() virtual method of each child view.
|
|
George Ross
|
Nov 30, 2005 - 11:27 AM
|
Hi My Application has two user interfaces it is sdi, the first interface is a TAB and the second is multiframe. Each view is opened in a new CMainFrame. When in TAB GUI the CExtControlBar with the CExtPropertyGrid inside it works fine (since there is just a MainFrame window). When in multiframe then CExtcontrolbar is corrupted opens like it has been transparent and is overwritten by the view in the mainframe. From what i can see the problem is with the CExtControlBar and not with the PropertyGrid regards George
|
|
Technical Support
|
Dec 1, 2005 - 7:14 AM
|
Yes, you can use Prof-UIS in the multi-frame application but please check the following issue: there must be only one instance of Prof-UIS menu bar (the CExtMenuControlBar class) in the scope of one command profile in the command manager. This means each top-level frame in your application should initialize its own command profile in the command manager using its unique profile name. You can rename the command profile before/after loading/saving the command manager and control bar states. This will make all your top-level frames use the same single registry location for the state persistence. So, you need to invoke the g_CmdManager->ProfileSetup() code in the frame’s OnCreate() method and specify a unique profile name which can be formatted using some global counter or frame’s this pointer value and %p string format flag (see MSDN for printf or CString::Format() functions). You can rename a profile with g_CmdManager->ProfileRename() .
|