Subject |
Author |
Date |
|
Kosuke Kamei
|
Nov 29, 2006 - 7:44 AM
|
How do I create Built-in functions and variables with Scripting ? Is it possible?
|
|
Technical Support
|
Nov 29, 2006 - 12:37 PM
|
You should use COM interfaces defined in Active Scripting SDK. The CScriptHost class in the SimpleScripting sample demonstrates can be a simple solution. The CScriptHost::Initialize() method in it invokes the IActiveScript::AddNamedItem() interface method of the CScriptHost::m_pEngine() property for exporting the AutoWindow variable into the script context.
|
|
Offer Har
|
Nov 28, 2006 - 2:34 PM
|
Dear Support, This is another bug of the same family. I suggest that for the next release you’ll do some extensive QA of this feature, as it is full of bugs.
This is the bug: 1) I set CExtControlBar::g_bCloseOnlyOneBarInTabGroup to true 2) I override NcButtons_HandleClick for catching the close button 3) I place two docked bars tabbed. 4) I press the ’X’ - the NcButtons_HandleClick is called, the first bar is closed 5) I press the ’X’ again for the seconds bar that is left open, NcButtons_HandleClick is NOT called <-- THIS IS THE BUG
Please fix this ASAP, as we need to release this week.
Thanks, Ron.
|
|
Offer Har
|
Dec 18, 2006 - 8:12 PM
|
Dear Support,
Any change this bug will be solved in the near future?
Regards, Ron.
|
|
Offer Har
|
Nov 28, 2006 - 3:04 PM
|
I forgot an important step:
In NcButtons_HandleClick i create a timer that calls KillBar later (becuase if i call it from the NcButtons_HandleClick the application crash...)
If i remove this timer and KillBar is not called, NcButtons_HandleClick is called correctly.
|
|
Technical Support
|
Nov 30, 2006 - 1:17 PM
|
This issue should be fixed if you update the CExtDynamicControlBar::NcButtons_HandleClick() method in the ExtDockBar.cpp file as we suggested you by e-mail and the timer is no longer needed.
|
|
Offer Har
|
Nov 30, 2006 - 1:24 PM
|
Dear Support, I have the latest version, including all the fixes you sent me - still, the bug is there. Please check it again. Please look into all the posts i sent regarding this issue. I think that you still have to take a good look into these fixes that do not fix the problem completely! Regards, Ron.
|
|
Offer Har
|
Nov 28, 2006 - 11:04 AM
|
Hi,
I have a dialog that i don’t want the user to make smaller then a pre-defined size. Is there a way to do it in CExtResizableDialog?
Thanks.
|
|
Offer Har
|
Dec 18, 2006 - 8:16 PM
|
Dear Support,
Any change this bug will be fixed in the coming version?
Regards, Ron.
|
|
Technical Support
|
Nov 30, 2006 - 9:08 AM
|
The CExtResizableDialog class is based on the CExtWA template decorator class and all the methods of CExtWA can also be found in CExtResizableDialog . There are two methods in CExtWA which allows you to limit the dialog’s size: SetMinTrackSize() and SetMaxTrackSize() . By using both methods, you can even make a dialog that can be resized only horizontally or vertically.
|
|
Offer Har
|
Nov 30, 2006 - 9:11 AM
|
I tried with no success. I have a following implementation: A dock-bar containing a dialog derived from CExtResizableDialog. I call SetMinTrackSize (tried before and after the dialog was created) And i can still drag the dialog to be of no size. Am i missing something? Do you have a sample that does that? Is there a bug? Thanks.
|
|
Suhai Gyorgy
|
Nov 30, 2006 - 9:28 AM
|
My guess is: It is not the dialog that you are dragging, but the dock-bar, so you should disable sizing of dock-bar, not sizing of dialog. But sorry, I couldn’t find anything on disabling that in Help. I’m not even sure if by dock-bar you mean CExtControlBar or some other class.
|
|
Suhai Gyorgy
|
Nov 30, 2006 - 9:29 AM
|
Sorry, I meant restricting the sizing, not disabling it.
|
|
Offer Har
|
Nov 30, 2006 - 9:31 AM
|
Exactly, I want an example of a CExtControlBar with a dialog inside, which is how all my dialogs are created.
|
|
Suhai Gyorgy
|
Nov 29, 2006 - 1:34 AM
|
You can get the answer to your problem in this feature article of Prof-UIS. The important part for you: ---BEGIN QUOTE--- The Prof-UIS dialog has a resizing gripper, which can be turned on or off with the ShowSizeGrip() method. For example, you may pass FALSE to it in the OnInitDialog handler to turn it off.
As in the standard MFC dialog application, the resizing of the dialog is enabled/disabled in the Border field of the dialog resource’s properties. ---END QUOTE---
|
|
Offer Har
|
Nov 29, 2006 - 6:39 AM
|
What i mean is that i don’t want the dialog to become smaller then some predefined value, something like SetMinSize(400,200) This will prevent the dialog from becoming smaller then 400 units on the X axe, and 200 on the Y axe. Any idea?
|
|
Suhai Gyorgy
|
Nov 29, 2006 - 8:18 AM
|
CExtResizableDialog class is derived from some CExtWA < SomeBaseClass >, so you can use SetMinTrackSize on it. From Help: CExtWA::SetMinTrackSize Sets the minimum size to which the window can be shrunk. void SetMinTrackSize( const CSize & size);
|
|
Offer Har
|
Nov 29, 2006 - 8:47 AM
|
Deosn’t work. I have a dialog inside a dock bar, and i called the SetMinTrackSize function, and nothing changed. What am i missing?
|
|
Technical Support
|
Nov 30, 2006 - 12:19 PM
|
In a CExtControlBar -derived class, please override the following virtual method(s): 1) CExtControlBar::_CalcDesiredMinHW() (an internal virtual method) is invoked to query the minimum control bar’s width in pixels. 2) CExtControlBar::_CalcDesiredMinVH() (an internal virtual method) is invoked to query the minimum control bar’s height in pixels.
|
|
Offer Har
|
Nov 30, 2006 - 12:29 PM
|
Another bug: When i try do dock the bar to the left, it limits the size in a very strange behavior, which is absolutly not related to the limit size i set in the H size. Please fix this issue as well. Regards, Ron.
|
|
Offer Har
|
Nov 30, 2006 - 12:27 PM
|
Thanks, This works, BUT, as always, a tab problem... When the dialog is tabbed, still the same size apply, which means than now the tab control obscures the content of the docked dialog. If the dialog is tabbed, the V size must be bigger by the size of the tab control. Regards, Ron.
|
|
Technical Support
|
Dec 1, 2006 - 7:30 AM
|
A tabbed container for control bars is an instance of CExtDynTabControlBar which in turn is derived from CExtControlBar . So you can override CExtDynTabControlBar and implement any custom restrictions in it. When this custom class is ready and you need to use it in Prof-UIS, you can do this by handling the CExtControlBar::g_nMsgCreateTabbedBar registered windows message in your main frame window: class C_YOUR_DynTabControlBar : public CExtDynTabControlBar
{
. . .
};
ON_REGISTERED_MESSAGE( CExtControlBar::g_nMsgCreateTabbedBar, OnMsgCreateTabbedBar )
LRESULT CMainFrame::OnMsgCreateTabbedBar( WPARAM wParam, LPARAM lParam )
{
lParam;
CExtDynTabControlBar ** ppBar = (CExtDynTabControlBar **)wParam;
(*ppBar) = new C_YOUR_DynTabControlBar;
return 0L;
}
|
|
Offer Har
|
Dec 1, 2006 - 7:34 AM
|
I don’t understand what you are saying.
You think that this is not a bug, but a desired behavior?
I don’t think that this is true.
Please try and explain to me why i need to implement this myself.
|
|
Scott Moore
|
Nov 28, 2006 - 8:44 AM
|
I just implemented a CExtResizablePropertySheet with 3 pages and noticed the tabs are not skinned correctly. Then I read in the docs:
NOTE: In the tabbed mode (non-wizard mode) this class is compatible with the Office 2000 theme only implemented in the CExtPaintManager class because the tab control inside the property sheet window is the standard tab common control that is not compatible with modern UI themes like Office XP, Office 2003, and Studio 2005.
So - where does this leave me? What are my alternatives? Nothing in the help gave me any options to use a tab control that will match the rest of the application.
Thanks, Scott
|
|
Scott Moore
|
Nov 28, 2006 - 2:51 PM
|
Okay, I fixed the bleeding by associating a CExtLabel control with all statics. Still, I would like to know how to get a properly painted tab control.
|
|
Scott Moore
|
Nov 28, 2006 - 8:49 AM
|
Also, I’ve noticed some bleeding from the other pages on my first static control on the first page. If I grab the dialog and move it off screen and then back on, the static label paints correctly.
|
|
Technical Support
|
Nov 29, 2006 - 12:49 PM
|
We recommend you use the CExtResizablePropertySheet and CExtResizablePropertyPage classes only with the CExtPaintManagerNativeXP and CExtPaintManager paint managers only. These are the only classes in Prof-UIS having this limitation. If you want to a create property sheet consistent with all Prof-UIS themes, we would recommend create a CExtResizableDialog dialog window with the following set of anchored child windows: one CExtTabPageContainerWnd window, several CExtButton buttons like OK, Cancel and etc. You could use a number of child dialog pages in the tab page container.
|
|
Offer Har
|
Nov 27, 2006 - 5:50 PM
|
I would like to write my own control in the status bar. How do i get the status-bar font? I see that between skins it’s a different font. Thanks.
|
|
Technical Support
|
Nov 28, 2006 - 11:19 AM
|
We recommend you use CExtPaintManager->m_FontNormal . Please note that you should not set this font using CWnd::SetFont() method because it is recreated each time the paint manager or system settings change.
|
|
Offer Har
|
Nov 28, 2006 - 1:00 PM
|
So how can I do it without using SetFont?
|
|
Technical Support
|
Nov 29, 2006 - 12:31 PM
|
If you are going to code a custom control, you don’t have to assign the font to the window. You can simply use the font handle we suggested (e.g., for outputting some text).
|
|
Offer Har
|
Nov 29, 2006 - 12:35 PM
|
It’s not a custom control, it’s a CExtLabel derived class.
|
|
Technical Support
|
Nov 30, 2006 - 11:20 AM
|
Why don’t you simply redraw the status pane by overriding of the CExtStatusControlBar::OnPaintPane() and set the needed pane width using the CExtStatusControlBar::SetPaneWidth() method? We believe that in many cases a handleless UI solution is preferable in comparison with HWND-based windows.
|
|
Offer Har
|
Dec 1, 2006 - 5:30 AM
|
OK. I dropped this try. Will just use plain text.
|
|
Scott Moore
|
Nov 27, 2006 - 7:46 AM
|
I’m trying to setup my application to remember window and toolbar positions. I found the help docs which mentioned the steps you should take to do this, but I get an error with one of my toolbars on this line:
if(!CExtControlBar::ProfileBarStateLoad( this, pApp->m_pszRegistryKey, pApp->m_pszProfileName, pApp->m_pszProfileName, &m_dataFrameWP ) ) { DockControlBar( &m_wndMenuBar ); DockControlBar( &m_wndContentViews, AFX_IDW_DOCKBAR_RIGHT ); DockControlBar( &m_wndCollectionToolbar, AFX_IDW_DOCKBAR_RIGHT ); }
The call stack is this:
> ProfUIS261ud.dll!CExtControlBar::InternalDockStateBar::StateSet(CFrameWnd * pDockSite=0x025f1fd8, CExtControlBar::InternalDockStateBar * pParentState=0x00000000) Line 4555 C++ ProfUIS261ud.dll!CExtControlBar::InternalDockStateSite::StateSet(bool bPresetWP=true) Line 3980 C++ ProfUIS261ud.dll!CExtControlBar::InternalFriendlyFrameWnd::SetDockState(const CExtControlBar::InternalDockStateSite & state={...}, bool bPresetWP=true) Line 3093 C++ ProfUIS261ud.dll!CExtControlBar::ProfileBarStateSerialize(CArchive & ar={...}, CFrameWnd * pFrame=0x025f1fd8, tagWINDOWPLACEMENT * pFrameWp=0x025f4174, bool bSerializeFixedBarsState=true, bool bSerializeResizableBarsState=true, bool bEnableThrowExceptions=false) Line 5540 C++ ProfUIS261ud.dll!CExtControlBar::ProfileBarStateLoad(CFrameWnd * pFrame=0x025f1fd8, const unsigned short * sSectionNameCompany=0x025f1f80, const unsigned short * sSectionNameProduct=0x025f0a60, const unsigned short * sSectionNameProfile=0x025f0a60, tagWINDOWPLACEMENT * pFrameWp=0x025f4174, bool bSerializeFixedBarsState=true, bool bSerializeResizableBarsState=true, HKEY__ * hKeyRoot=0x80000001, bool bEnableThrowExceptions=false) Line 2478 + 0x20 C++ NwAnalyticsD.exe!CMainFrame::OnCreate(tagCREATESTRUCTW * lpCreateStruct=0x0012f624) Line 205 + 0x35 C++
It fails on this line: ASSERT_VALID( m_pHelperBar );
m_pHelperBar is NULL.
If I comment out the ProfileBarStateLoad() call and just dock the toolbars, my app loads fine.
I believe I have followed the necessary steps according to the docs:
CMainFrame::CMainFrame() { ::memset( &m_dataFrameWP, 0, sizeof(WINDOWPLACEMENT) ); m_dataFrameWP.length = sizeof(WINDOWPLACEMENT); m_dataFrameWP.showCmd = SW_HIDE; }
void CMainFrame::ActivateFrame(int nCmdShow) { if( m_dataFrameWP.showCmd != SW_HIDE ) { SetWindowPlacement(&m_dataFrameWP); CExtNCW < CFrameWnd >::ActivateFrame(m_dataFrameWP.showCmd); m_dataFrameWP.showCmd = SW_HIDE; return; } CExtNCW < CFrameWnd >::ActivateFrame(nCmdShow); }
BOOL CMainFrame::DestroyWindow() { TRACE("CMainFrame::DestroyWindow()\n"); CWinApp * pApp = ::AfxGetApp(); ASSERT( pApp != NULL ); ASSERT( pApp->m_pszRegistryKey != NULL ); ASSERT( pApp->m_pszRegistryKey[0] != _T(’\0’) ); ASSERT( pApp->m_pszProfileName != NULL ); ASSERT( pApp->m_pszProfileName[0] != _T(’\0’) ); VERIFY(CExtControlBar::ProfileBarStateSave( this, pApp->m_pszRegistryKey, pApp->m_pszProfileName, pApp->m_pszProfileName ) );
}
BOOL CNwAnalyticsApp::InitInstance() { ... //pFrame->ShowWindow(SW_SHOW); //pFrame->UpdateWindow(); pFrame->ActivateFrame(SW_SHOW); return TRUE; }
Thanks for any help.
Scott
|
|
Scott Moore
|
Nov 27, 2006 - 8:57 AM
|
That isn’t the problem. I deleted the registry data and it didn’t help. Actually, I should be more specific in my error:
I have 2 toolbars in my app. Both toolbars are only displayed when certain tabs show up in the app. Both toolbars are created in the mainform and docked, but just aren’t shown until the appropriate tabs are displayed.
The 2nd toolbar seems to be the problem. If I close the app while the 2nd toolbar is displayed (the user navigated to the tab that shows it), when I restart the app - that’s when I get the error.
bEnableThrowExceptions = true does not prevent the error. Nor does it throw an exception. It just asserts. In release mode, none of my toolbars ever show up.
|
|
Technical Support
|
Nov 27, 2006 - 12:41 PM
|
Would you send us a project that demonstrates the problem?
|
|
Suhai Gyorgy
|
Nov 27, 2006 - 8:40 AM
|
ProfileBarStateSave method saves the last state of the toolbars and controlbars and menubar in the registry, in binary format. If, during development, you change the IDs or the number of the commands or the bars, ProfileBarStateLoad won’t be able to load the state back from the registry. But both ProfileBarStateSave and ProfileBarStateLoad now have a parameter, bEnableThrowExceptions, if you set this to true, you can catch the thrown exception and load a default state. I just usually delete the saved state from the registry when I change anything like that in my controlbars.
|
|
Scott Moore
|
Nov 27, 2006 - 7:18 AM
|
I downloaded the white paper Prof-UIS_WhitePaper.pdf from your website and on page 23, it says "Text support for toolbar buttons: You can customize any toolbar button so that the toolbar can display its icon, its text, or both its icon and text (see Figure 25)."
For the life of me, I can’t figure out how to do this. And I haven’t found any examples that demo this.
Thanks.
|
|
Suhai Gyorgy
|
Nov 27, 2006 - 8:31 AM
|
To display the text for the command in the toolbar, your code should be something like this: bool bHasText = true;
CExtCmdItem *pCmdItem = g_CmdManager->CmdGetPtr(pApp->m_pszProfileName, yourCmdId);
ASSERT_VALID(pCmdItem);
pCmdItem->m_sToolbarText = bHasText ? pCmdItem->m_sMenuText : _T(""); // or any other text instead of pCmdItem->m_sMenuText
|
|
Technical Support
|
Nov 27, 2006 - 12:39 PM
|
|
|
Andrew Cochran
|
Nov 27, 2006 - 5:53 AM
|
Hi, It seems to me that something is wrong here. I write an MDI Application. I want it does’t have minimized, maximized and close buttons and SysMenu in it’s child frame, and I also want all child windows to be always maximized. I try to remove them by the following code in PreCreateWindow()
cs.style &= ~(WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU);
But the following problems appear: 1. All child windows are not maximized when switching using tabs, and they aren’t become (I need them always be maximized). But if I left WS_MAXIMIZEBOX style - everything is OK, but the button appears. 2. Close button is disabled in the tabwindow and I cannot close any child window using it (I need it be active and work)
Please, help. Where am I wrong?
|
|
Andrew Cochran
|
Nov 30, 2006 - 12:48 AM
|
I’m sorry for my persistence, but there are no any answer from you for hole 3 days.
Is there any problem? May be there ara problems in my question formulation?
I just need to resolve the problem as soon as possible...
Best regards!
|
|
Technical Support
|
Nov 30, 2006 - 8:56 AM
|
We are really sorry for the delay. The only reason is that we were a bit busy with releasing 2.62.
It is not a bug. We would suggest you that you use another way for making the child window maximized.
First, use the following CExtMenuControlBar -derived class for the menu bar: class CMyMenuBar : public CExtMenuControlBar
{
public:
CMyMenuBar()
{
}
bool IsDisplayMdiDocumentButtons() const
{
ASSERT_VALID( this );
return false;
}
virtual BOOL TranslateMainFrameMessage(MSG* pMsg)
{
ASSERT_VALID( this );
if( WM_KEYFIRST <= pMsg->message && pMsg->message <= WM_KEYLAST )
{
BOOL bAlt = HIWORD(pMsg->lParam) & KF_ALTDOWN;
BOOL bCtrl = GetKeyState(VK_CONTROL) & 0x80000000;
if( ( pMsg->wParam == VK_SUBTRACT
|| pMsg->wParam == 189
)
&& bAlt
)
return TRUE;
if( pMsg->wParam == VK_F4
&& bCtrl
)
return TRUE;
}
return CExtMenuControlBar::TranslateMainFrameMessage(pMsg);
}
}; Second, insert the following lines to the CChildFrame::PreCreateWindow method: cs.style |= WS_MAXIMIZE; Finally, override the ActivateFrame method: void CChildFrame::ActivateFrame(int nCmdShow)
{
nCmdShow = SW_SHOWMAXIMIZED;
CMDIChildWnd :: ActivateFrame( nCmdShow );
}
|
|
Andrew Cochran
|
Dec 1, 2006 - 2:09 AM
|
Thank you very much for exhaustive answer.
Now it’s working according to my needs.
:) Good luck!
|
|
Suhai Gyorgy
|
Nov 27, 2006 - 3:55 AM
|
Dear Support,
In your FormEditor sample, after closing all documents, the main window gets into an inactive kind of state. Although the caption of the window shows as if it was active, there’s no highlighting over the menu and toolbars. If at this point I click anywhere in the window, only then I get the higlighting back on. But this means if (after closing all documents) I want to open a new document, I have to click on the icon twice: once for activating the window and only on the second click I get the new document.
Please check this issue. Thank you, Chris
|
|
Technical Support
|
Nov 27, 2006 - 1:26 PM
|
Yes, this is known issue related to the behavior of the Close button in the MDI tab window. Please let us know the approximate date of your release is scheduled for so we can do this by that time.
|
|
Suhai Gyorgy
|
Nov 28, 2006 - 1:31 AM
|
We don’t find this bug so very disturbing. If you have it in your TO-DO list, it is fine by us. Thank you.
|
|
Andreas Werner
|
Nov 27, 2006 - 3:28 AM
|
Hello all,
I want to disable/customize the context menu in my custom property grid. I have subclassed the CExtPropertyGridCtrl class. In my derived class I have overwritten the OnPgcContextMenuTrack method. If I do a right click on an item in the name column of the property grid then the overwritten method is invoked and the context menu for the name column does not appear. If I do a right click on an item in the value column the overwritten method is not invoked and the default context menu for the value column appears.
I have also overwritten the OnPgcContextMenuReconstruct method in my CExtPropertyGridCtrl derived class but it never gets invoked.
How can I disable or customize the context menu for the value column of a property grid?
With best regards Andreas Werner
|
|
Technical Support
|
Nov 28, 2006 - 9:17 AM
|
There is the following property in the CMainDlg class in the PropertyGrid sample: CExtPropertyGridCtrl m_PGC; We replaced it with: CMyPGC m_PGC; We also defined the following class in this sample and set two break points on both ASSERT_VALID( this ); lines: class CMyPGC : public CExtPropertyGridCtrl
{
public:
virtual void OnPgcContextMenuTrack(
CWnd * pWndHit,
CPoint ptScreen,
CExtGridHitTestInfo * pHtInfo, // can be NULL
CExtPropertyItem * pPropertyItem, // can be NULL
CExtPropertyGridWnd * pPGW // can be NULL
)
{
ASSERT_VALID( this );
CExtPropertyGridCtrl::OnPgcContextMenuTrack(
pWndHit,
ptScreen,
pHtInfo,
pPropertyItem,
pPGW
);
}
virtual bool OnPgcContextMenuReconstruct(
CExtPopupMenuWnd * pPopup,
CWnd * pWndHit,
CPoint ptScreen,
CExtGridHitTestInfo * pHtInfo, // can be NULL
CExtPropertyItem * pPropertyItem, // can be NULL
CExtPropertyGridWnd * pPGW // can be NULL
)
{
ASSERT_VALID( this );
bool bRetVal =
CExtPropertyGridCtrl::OnPgcContextMenuReconstruct(
pPopup,
pWndHit,
ptScreen,
pHtInfo,
pPropertyItem,
pPGW
);
return bRetVal;
}
}; // class CMyPGC After that we rebuilt the PropertyGrid sample application and debugged it. Regardles of where context menus were invoked, we saw both break points invoked in the debug session. So, we guess the problem described in your message may be specific to your project only. Please provide us with more details about your project and property grid control in it. Did you implement any other virtual methods and/or windows message handlers in your property grid class?
|
|
Andreas Werner
|
Nov 28, 2006 - 10:18 AM
|
Hallo support Team,
After comparing your code line by line with my code I found my error. I copied the method signature for the OnPgcContextMenuTrack method form the API specification. In the API specification the 4th parameter is described as reference but in the implementation it as a pointer:
bool CPropertyGridLayerConfig::OnPgcContextMenuReconstruct( CExtPopupMenuWnd* pPopup, CWnd* pWndHit, CPoint ptScreen, CExtGridHitTestInfo& htInfo, <== Referenze in the API documentation CExtPropertyItem* pPropertyItem, CExtPropertyGridWnd* pPGW )
In the implementation the signature is: bool CPropertyGridLayerConfig::OnPgcContextMenuReconstruct( CExtPopupMenuWnd* pPopup, CWnd* pWndHit, CPoint ptScreen, CExtGridHitTestInfo* pHtInfo, <== Pointer in the implementation CExtPropertyItem* pPropertyItem, CExtPropertyGridWnd* pPGW )
For this reason I have overloaded the function instead of overwriting it. With the correct signature the overwritten method OnPgcContextMenuReconstruct also gets invoked in my project.
I still have the problem that the overwritten methods only get invoked if the context menu with the "Reset" item is shown. If I click into an editor in the value column and do a right click in an active editor, then the context menu with undo, cut, copy ... etc is shown and the overwritten methods are not invoked. What is necessary to influence the context menu of the editors in the value column?
I only implement the window message OnCreate.
With best regards Andreas Werner
|
|
Technical Support
|
Nov 30, 2006 - 8:44 AM
|
Thank you for the interesting question. Here are some important notes that should clarify the issue. When some in-place editor is active (so you can actually edit something, e.g. text ) for any grid cell in any grid control, this means the following: 1) The grid control is tracking a local in-thread message loop until the editor is not closed. 2) Everything outside the editor window is considered to be inactive and not relating to it. 3) The context menu displayed by the editor window has to do only to the editor window. The feature of resynchronization/integration of both context menus (parent control’s menu and editor’s menu) is not supported in Prof-UIS. So if you need to disable the context menu in the editor, you should do this in the editor.
|
|
Andreas Werner
|
Nov 30, 2006 - 9:35 AM
|
Dear support team,
Thank for your explanation of the issue. I have already suspected that the answer would point to this direction. How can I access the context menu of the editor? The CExtGridCell class does not provide overwritable methods like OnContextMenuTrack or OnContextMenuReconstruct. Please give me a short instruction of the steps I have to take.
With best regards Andreas Werner
|
|
Technical Support
|
Nov 30, 2006 - 12:25 PM
|
You should use one of the following solutions: 1) Code a custom cell class which implements the CExtGridCell::OnInplaceControlCreate() virtual method. 2) Override the CExtGridWnd::OnGridInplaceControlCreate() virtual method. Both methods return an HWND handle which is used as the in-place editor for a cell. The instance of the CExtGridInplaceEdit class is created by default. In a CExtGridInplaceEdit -derived class, implement the CWnd::WindowProc() virtual method for handling the WM_CONTEXTMENU standard Windows message.
|
|
Nitesh Singh
|
Nov 27, 2006 - 3:19 AM
|
Hi support.........
I want to mention that my solution is having a total of 10 projects. And I am using the prof-UIS classes in 2 projects.. that too only 30 files. But as u have directed that we should include #include <Prof-UIS.h> in stdafx.h...... I have included the file in stdafx.h....
now my project takes huge amount of compilation time just because of that (More that double of the earlier...)
Will it not work if I don’t include prof-uis.h in stdafx.h..... and only include where prof-uis classes are used....
|
|
Nitesh Singh
|
Nov 27, 2006 - 4:56 AM
|
sorry 4 de typing mistake
|
|
Technical Support
|
Nov 27, 2006 - 12:45 PM
|
You should include the Prof-UIS.h file only once in each project. The best place is the StdAfx.h file. Please also make sure that the precompiled headers are used in your projects. This should greatly decrease the compilation time.
|
|
Nitesh Singh
|
Nov 30, 2006 - 2:15 AM
|
I have 1 main project three DLL project and rest of them as static lib project.................
Now I use classes of Prof-UIS only in 3 projects.....
1. 4 files of 1st Project 2. In 3 header file and about 30 cpp files of the 2nd Project 3. In 1 header file and 1 cpp file of the third project.....
so I have added #include <Prof-UIS.h> in the stdafx.h of those three projects. ..................................................................................................
In one project(some other project) I use the classes declared in these header files......... Now when I compile the solution. Many cpp files when they get complied displays the message
Prof-UIS multiple monitor support: built-in Automatically linking with Prof-UIS library: ProfUIS261md.lib (Professional User Interface Suite)
And takes much longer time to compile.
I want this to be displayed as minimum as possible..... And since I am not using prof-uis classes in most of the cpp files of the project (1st, 2nd and 3rd).... then why do I need to add in stdafx.h
Is is not better to have #include <Prof-UIS.h> in invidual files... or instead of declaring whole prof-uis.h can’t I include the specific files like CExtGrdWnd.h where I am using only this file’s classes....
Please suggest.. Because It is greatly decreasing the performance.. thank you...
|
|
Technical Support
|
Nov 30, 2006 - 1:00 PM
|
The best way to include Prof-UIS is to do this in StdAfx.h. Please make sure that all the .cpp files are using precompiled headers and the StdAfx.cpp file generates a precompiled header database. If this is not configured correctly, the Prof-UIS.h file will be included the same number of times as the StdAfx.h file and the files in your project will be compiled slowly. You can easily check if the precompiled headers are used: "Automatically linking ..." should appear only once. Otherwise, it will appear each time a source file is compiled.
|
|
Offer Har
|
Nov 30, 2006 - 6:19 AM
|
Use pre-compile headers - this will decrease the compile time but a lot. I had the same problem, and it is solved by pre-compiled headers.
|
|
Nitesh Singh
|
Dec 1, 2006 - 2:05 AM
|
thanks Offer.................... But when I am changing my project settings (for precompiled headers) from "Automatically generate" to "Pre-complied headers" then it is giving me compilation error. ’Debug\MyProject.pch’ is not a valid precompiled header file
I also did a clean rebuild. whats the problem
|
|
Nitesh Singh
|
Dec 1, 2006 - 5:33 AM
|
Thanks I succeeded... now I am using "Create PreCompiled header" option. And I have included Prof-UIS.h in stdafx.h. Actually one of my project was not having stdafx.h. Now I have stdafx.h for that project also...
thanks 4 da help
|
|
Offer Har
|
Dec 1, 2006 - 5:32 AM
|
My settings are:
Use Precompiled Header (/Yu) StdAfx.h $(IntDir)/$(TargetName).pch
And it works fine. Try to go and make sure the debug directory is empty, and then try and build. It looks to me as some project property problems...
|
|
Nitesh Singh
|
Dec 1, 2006 - 3:19 AM
|
when I am changing my project settings (for precompiled headers) from "Automatically generate" to "Use Pre-complied headers" then it is giving me compilation error. āDebug\MyProject.pchā is not a valid precompiled header file
I also did a clean rebuild. whats the problem
anybody can tell me about the right approach.. so that my compilation time reduces.. and how to support the "Use pre compiled header" for my case
|
|
Offer Har
|
Nov 23, 2006 - 10:15 AM
|
Hi,
I have docking bars that i want to destroy when they are closed. I override the NcButtons_HandleClick function, and if it’s time to kill my dialog, i call Destroy on the bar, and not call the default CExtControlBar::NcButtons_HandleClick.
This all works fine until i get to the tabbed scenario (AGAIN...) What happens is that the NcButtons_HandleClickis called of each docked dialog, i destroy them all, but then it crashes in CExtDockDynTabBar, in the funtion _RepositionTabbedChilds line 185: ASSERT( hDWP != NULL );
This is the stack:
ProfUIS262md.dll!CExtDockDynTabBar::_RepositionTabbedChilds(bool bLockChilds=true) Line 185 + 0x19 C++ ProfUIS262md.dll!CExtDynTabControlBar::OnRepositionSingleChild(int cx=-1, int cy=-1, bool bRedraw=true) Line 1184 C++ ProfUIS262md.dll!CExtDynTabControlBar::UpdateBarVisibility(CExtControlBar * pBar=0x0797d620) Line 1963 + 0x16 C++ ProfUIS262md.dll!CExtControlBar::_UpdateVisibilityInRow() Line 20287 C++ ProfUIS262md.dll!CExtControlBar::_UpdateVisibilityInChain() Line 20170 + 0x10 C++ ProfUIS262md.dll!CExtControlBar::OnShowWindow(int bShow=0, unsigned int nStatus=0) Line 20078 + 0x10 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=24, unsigned int wParam=0, long lParam=0, long * pResult=0x0012f49c) Line 2031 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=24, unsigned int wParam=0, long lParam=0) Line 1745 + 0x1e C++ mfc71d.dll!CControlBar::WindowProc(unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 503 + 0x14 C++ ProfUIS262md.dll!CExtControlBar::WindowProc(unsigned int message=24, unsigned int wParam=0, long lParam=0) Line 8435 C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x0797d620, HWND__ * hWnd=0x00371c84, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00371c84, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00371c84, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 209 + 0x15 C++ user32.dll!77d48734() user32.dll!77d48816() user32.dll!77d618f4() user32.dll!77d4b4c0() user32.dll!77d4b50c() ntdll.dll!7c90eae3() user32.dll!77d4daf6() mfc71d.dll!CWnd::DestroyWindow() Line 988 + 0xd C++ mfc71d.dll!CControlBar::DestroyWindow() Line 597 C++ ProfUIS262md.dll!CExtControlBar::DestroyWindow() Line 8022 C++ CCC.exe!CPropertiesDocBarsManager::RemoveBar(CBaseDockBar * pBar=0x0797d620) Line 98 C++
|
|
Technical Support
|
Nov 27, 2006 - 1:37 PM
|
Please make a search for the KillBar word in this forum. The results will show how to use a KillBar() function in your code.
|
|
Offer Har
|
Nov 27, 2006 - 1:54 PM
|
I’m sorry, but this solution is not working. I still get a crash in my application. Please find below the stack.
ntdll.dll!7c901230() > msvcr71d.dll!_CrtDbgBreak() Line 93 C msvcr71d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x7c14ebfc, int nLine=207, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...) Line 427 C mfc71d.dll!AfxAssertFailedLine(const char * lpszFileName=0x7c14ebfc, int nLine=207) Line 28 + 0x14 C++ mfc71d.dll!CWnd::GetStyle() Line 207 + 0x29 C++ mfc71d.dll!CControlBar::IsVisible() Line 853 + 0x13 C++ mfc71d.dll!CDockBar::GetDockedVisibleCount() Line 98 + 0x14 C++ mfc71d.dll!CDockBar::OnPaint() Line 606 + 0x20 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=15, unsigned int wParam=0, long lParam=0, long * pResult=0x0012a0dc) Line 2023 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=15, unsigned int wParam=0, long lParam=0) Line 1745 + 0x1e C++ mfc71d.dll!CControlBar::WindowProc(unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 503 + 0x14 C++ ProfUIS262md.dll!CExtDockBar::WindowProc(unsigned int message=15, unsigned int wParam=0, long lParam=0) Line 3629 C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x07ad6468, HWND__ * hWnd=0x000d2430, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x000d2430, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x000d2430, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 209 + 0x15 C++ user32.dll!77d48734() user32.dll!77d48816() user32.dll!77d4b4c0() user32.dll!77d4b50c() ntdll.dll!7c90eae3() user32.dll!77d4bf78() mfc71d.dll!CWnd::RedrawWindow(const tagRECT * lpRectUpdate=0x00000000, CRgn * prgnUpdate=0x00000000, unsigned int flags=389) Line 172 + 0x4a C++ ProfUIS262md.dll!CExtMiniDockFrameWnd::OnNcActivate(int bActive=1) Line 1209 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=134, unsigned int wParam=1, long lParam=533210, long * pResult=0x0012a500) Line 1899 + 0xd C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=134, unsigned int wParam=1, long lParam=533210) Line 1745 + 0x1e C++ ProfUIS262md.dll!CExtMiniDockFrameWnd::WindowProc(unsigned int message=134, unsigned int wParam=1, long lParam=533210) Line 1992 + 0x14 C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x07ac45f8, HWND__ * hWnd=0x00072526, unsigned int nMsg=134, unsigned int wParam=1, long lParam=533210) Line 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00072526, unsigned int nMsg=134, unsigned int wParam=1, long lParam=533210) Line 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00072526, unsigned int nMsg=134, unsigned int wParam=1, long lParam=533210) Line 209 + 0x15 C++ user32.dll!77d48734() user32.dll!77d48816() user32.dll!77d4b4c0() user32.dll!77d4b50c() ntdll.dll!7c90eae3() user32.dll!77d548d9() user32.dll!77d56323() user32.dll!77d6aa51() user32.dll!77d48734() user32.dll!77d5418d() kernel32.dll!7c80bde6() user32.dll!77d53fd9() user32.dll!77d6e54f() MSCTF.dll!74724636() user32.dll!77d6e571() user32.dll!77d48734() user32.dll!77d6e54f() user32.dll!77d6e54f() user32.dll!77d48816() user32.dll!77d6e54f() user32.dll!77d6e54f() kernel32.dll!7c830c88() user32.dll!77d4c63f() user32.dll!77d6e54f() user32.dll!77d4e905() user32.dll!77d6e54f() mfc71d.dll!_AfxActivationWndProc(HWND__ * hWnd=0x0012a960, unsigned int nMsg=1223268, unsigned int wParam=2083503115, long lParam=0) Line 449 + 0x1a C++ user32.dll!77d6e54f() user32.dll!77d48734() user32.dll!77d48816() user32.dll!77d4b4c0() user32.dll!77d4b50c() ntdll.dll!7c90eae3() user32.dll!77d494be() user32.dll!77d4d4e4() user32.dll!77d4b903() comctl32.dll!773f7344() comctl32.dll!773f7426() comctl32.dll!773f972b() mfc71d.dll!AfxGetMainWnd() Line 36 + 0x11 C++ mfc71d.dll!CWinThread::ProcessMessageFilter(int code=0, tagMSG * lpMsg=0x0012acec) Line 872 + 0x5 C++ mfc71d.dll!_AfxMsgFilterHook(int code=2010416948, unsigned int wParam=730106, long lParam=514) Line 817 C++ 0012ac68() user32.dll!77d48816() user32.dll!77d4eaad() user32.dll!77d489cd() user32.dll!77d61b4d() user32.dll!77d48a10() user32.dll!77d5e097() user32.dll!77d5e1d4() user32.dll!77d561c6() user32.dll!77d6a92e() ntdll.dll!7c911bff() ntdll.dll!7c911dac() ntdll.dll!7c949b34() ntdll.dll!7c92a67e() ntdll.dll!7c926abe() ntdll.dll!7c9131dc() ntdll.dll!7c913281() ntdll.dll!7c913288() ntdll.dll!7c913288() ntdll.dll!7c916315() ntdll.dll!7c91b686() ntdll.dll!7c91b298() ntdll.dll!7c9106eb() ntdll.dll!7c96e0f0() ntdll.dll!7c96e0d4() user32.dll!77d484fc() user32.dll!77d4ba0e() user32.dll!77d4b96b() user32.dll!77d6a294() ntdll.dll!7c910945() ntdll.dll!7c91094e() ntdll.dll!7c926abe() ntdll.dll!7c91440e() ntdll.dll!7c910970() ntdll.dll!7c914481() ntdll.dll!7c919bd3() ntdll.dll!7c910895() ntdll.dll!7c919a9c() ntdll.dll!7c919b3f() ntdll.dll!7c919aeb() user32.dll!77d95fbb() user32.dll!77d96060() user32.dll!77d80577() user32.dll!77d8052f() msvcr71d.dll!__crtMessageBoxA(const char * lpText=0x0012b420, const char * lpCaption=0x10268444, unsigned int uType=73746) Line 119 C msvcr71d.dll!CrtMessageWindow(int nRptType=2, const char * szFile=0x7c14ebfc, const char * szLine=0x0012c464, const char * szModule=0x00000000, const char * szUserMessage=0x0012c484) Line 617 + 0x16 C msvcr71d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x7c14ebfc, int nLine=207, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...) Line 516 + 0x4c C mfc71d.dll!AfxAssertFailedLine(const char * lpszFileName=0x7c14ebfc, int nLine=207) Line 28 + 0x14 C++ mfc71d.dll!CWnd::GetStyle() Line 207 + 0x29 C++ mfc71d.dll!CControlBar::IsVisible() Line 853 + 0x13 C++ mfc71d.dll!CDockBar::GetDockedVisibleCount() Line 98 + 0x14 C++ ProfUIS262md.dll!CExtDynControlBar::CalcDynamicLayout(int nLength=-1, unsigned long nMode=10) Line 5818 + 0x1e C++ ProfUIS262md.dll!CExtDynTabControlBar::CalcDynamicLayout(int nLength=-1, unsigned long nMode=10) Line 1131 + 0x14 C++ mfc71d.dll!CDockBar::CalcFixedLayout(int bStretch=1, int bHorz=2) Line 418 C++ mfc71d.dll!CControlBar::CalcDynamicLayout(int __formal=-1, unsigned long nMode=7) Line 229 + 0x20 C++ mfc71d.dll!CControlBar::OnSizeParent(unsigned int __formal=0, long lParam=1243896) Line 797 C++ mfc71d.dll!CDockBar::OnSizeParent(unsigned int wParam=0, long lParam=1243896) Line 567 + 0x10 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=865, unsigned int wParam=0, long lParam=1243896, long * pResult=0x0012f83c) Line 2013 + 0x11 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=865, unsigned int wParam=0, long lParam=1243896) Line 1745 + 0x1e C++ mfc71d.dll!CControlBar::WindowProc(unsigned int nMsg=865, unsigned int wParam=0, long lParam=1243896) Line 503 + 0x14 C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x07ac46dc, HWND__ * hWnd=0x0008251c, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1243896) Line 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x0008251c, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1243896) Line 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x0008251c, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1243896) Line 209 + 0x15 C++ user32.dll!77d48734() user32.dll!77d48816() user32.dll!77d4b4c0() user32.dll!77d4b50c() ntdll.dll!7c90eae3() user32.dll!77d494be() user32.dll!77d4d4e4() user32.dll!77d5f3e3() mfc71d.dll!CWnd::RepositionBars(unsigned int nIDFirst=0, unsigned int nIDLast=65535, unsigned int nIDLeftOver=59648, unsigned int nFlags=2, tagRECT * lpRectParam=0x07ac4668, const tagRECT * lpRectClient=0x0012fb44, int bStretch=1) Line 2982 C++ mfc71d.dll!CFrameWnd::RecalcLayout(int bNotify=1) Line 2012 C++ mfc71d.dll!CMiniDockFrameWnd::RecalcLayout(int bNotify=4) Line 824 C++ ProfUIS262md.dll!CExtMiniDockFrameWnd::RecalcLayout(int bNotify=4) Line 2027 C++ mfc71d.dll!CFrameWnd::OnIdleUpdateCmdUI() Line 1969 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=867, unsigned int wParam=1, long lParam=0, long * pResult=0x0012fdb0) Line 2023 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=867, unsigned int wParam=1, long lParam=0) Line 1745 + 0x1e C++ ProfUIS262md.dll!CExtMiniDockFrameWnd::WindowProc(unsigned int message=867, unsigned int wParam=1, long lParam=0) Line 1992 + 0x14 C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x07ac45f8, HWND__ * hWnd=0x00072526, unsigned int nMsg=867, unsigned int wParam=1, long lParam=0) Line 241 + 0x1a C++
|
|
Technical Support
|
Nov 28, 2006 - 8:36 AM
|
Because you are using a modified version of the control bar, we would you to modify one of our samples so it would reproduce the crash and send it to us.
|
|
Offer Har
|
Nov 28, 2006 - 9:51 AM
|
I have sent you a project re-creating the bug. Please let me know if it’s enough. Regards, Ron.
|
|
Offer Har
|
Nov 28, 2006 - 8:49 AM
|
What modified version am i using? I just have a CExtControlBar derived classes.
|
|
Technical Support
|
Dec 1, 2006 - 8:15 AM
|
What we actually mean is we do not really know which methods you have overridden in your CExtControlBar -derived class except for those we discussed. So we cannot guess what causes the problem.
|
|
Offer Har
|
Dec 1, 2006 - 8:50 AM
|
Dear Support,
I did not change anything but overriding the CBaseDockBar::NcButtons_HandleClick. This is what i did there:
if( pNcAreaButton->IsKindOf(RUNTIME_CLASS(CExtBarNcAreaButtonClose))) { // We want to destroy the dialog, and not hide it: KillBar(this); return true; }
That’s all.
Please note that there is a new thread i started today regarding this bug plus a fix for it.
|
|
Offer Har
|
Nov 23, 2006 - 8:32 AM
|
Hi, When i added CExtNCW support to my CMDIChildWnd derived class, the tile & cascade commands stopped working correctly. Please verify and fix for the next version.
|
|
Offer Har
|
Dec 18, 2006 - 8:17 PM
|
Dear Support,
Is there is any knowledge when this feature will be implemented?
Regards, Ron.
|
|
Suhai Gyorgy
|
Nov 23, 2006 - 8:43 AM
|
Here’s Support’s answer for almost the same question from Oct 17th: ---Begin quote--- You should not use the CExtNCW template class with child windows and MDI child frames. First, CExtNCW currently supports captions of popup frame and dialog windows only. Second, the CExtNCW template class is not compatible with MDI child frames because the standard Windows MDI interface cannot work with windows which implement the custom non-client area. The custom NC area requires the WS_BORDER|WS_CAPTION styles to be removed from the window to make Windows API unable to overdraw the non-client area. The Windows MDI interface does not work with MDI child frames that do not have the WS_BORDER|WS_CAPTION style. We plan to recode the MDI interface from scratch to solve this problem. ---End Quote---
|
|
Offer Har
|
Nov 23, 2006 - 10:15 AM
|
Bug this means that i cannot fully theme my application, doesn’t it?
|
|
Technical Support
|
Nov 27, 2006 - 1:04 PM
|
You cannot use CExtNCW for that. But this already is in our to-do list.
|
|
Offer Har
|
Nov 27, 2006 - 2:27 PM
|
When will this feature be ready?
|
|
Offer Har
|
Nov 23, 2006 - 8:30 AM
|
Dear Support,
I have been waiting for support for the bugs in the docked tabbed bars for a while now. Please let me know what a solution will be available, because we have a product to deliver, and will need it to pass customer’s tests.
Regards, Offer
|
|
Technical Support
|
Nov 23, 2006 - 12:03 PM
|
We answered all your questions about optionally closeable control bars. You should receive the e-mail notifications.
|
|
Offer Har
|
Nov 27, 2006 - 2:33 PM
|
Dear Support,
Thanks, now my problem are solved.
I have a questions regarding _ClosingIsEnabled: When is it called? If I want to invalidate the NC area so that the ’X’ button will be enabled/disabled, how do i do it?
Also still have problem with killing bars when tabbed - crashes the application.
|
|
Technical Support
|
Nov 28, 2006 - 10:31 AM
|
We would recommend you update the caption button by overriding CExtControlBar::OnUpdateCmdUI() .
|
|
Offer Har
|
Nov 23, 2006 - 8:28 AM
|
Hi, I have docking bars that i don’t want to be displayed in the right click menu which displays all the bars. What function controls this? Thanks.
|
|
Suhai Gyorgy
|
Nov 23, 2006 - 8:41 AM
|
I use this code to remove MenuBar’s entry from all right-click popup menus: in MainFrm.h: afx_msg LRESULT OnConstructPopupMenuCB(WPARAM wParam, LPARAM lParam);
in MainFrm.cpp: BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
...
ON_REGISTERED_MESSAGE(CExtControlBar::g_nMsgConstructPopupMenu, OnConstructPopupMenuCB)
...
END_MESSAGE_MAP()
...
LRESULT CMainFrame::OnConstructPopupMenuCB(WPARAM wParam, LPARAM lParam)
{
ASSERT_VALID( this );
lParam;
CExtControlBar::POPUP_MENU_EVENT_DATA * p_pmed =
CExtControlBar::POPUP_MENU_EVENT_DATA::FromWParam( wParam );
ASSERT( p_pmed != NULL );
ASSERT_VALID( p_pmed->m_pPopupMenuWnd );
if( p_pmed->m_bPostNotification )
{
VERIFY( p_pmed->m_pPopupMenuWnd->ItemRemove( p_pmed->m_pPopupMenuWnd->ItemFindPosForCmdID(AFX_IDW_DIALOGBAR))
);
}
return 0;
}
You can customize it by writing different ID in place of AFX_IDW_DIALOGBAR.
|
|
Offer Har
|
Nov 23, 2006 - 10:16 AM
|
|
|
Technical Support
|
Nov 23, 2006 - 11:01 AM
|
In addition to what Chris said, there is another solution: set the CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property to false . This is applicable to any control bar (toolbar, menu bar, resizable control bar, and panel bar).
|
|
Offer Har
|
Nov 23, 2006 - 11:06 AM
|
Another question - what is the sort order in this menu? It is not alphabetical.
|
|
Technical Support
|
Nov 27, 2006 - 12:59 PM
|
The control bars are shown in the order of creation (the order of constructor calls). For example, if you declare control bars in the following order: CExtControlBar m_wndResizableBar0;
CExtControlBar m_wndResizableBar1;
CExtControlBar m_wndResizableBar2;
CExtControlBar m_wndResizableBar3;
CExtControlBar m_wndResizableBar4; they will be shown in this order: m_wndResizableBar0;
m_wndResizableBar1;
m_wndResizableBar2;
m_wndResizableBar3;
m_wndResizableBar4;
|
|
Offer Har
|
Nov 27, 2006 - 1:32 PM
|
Is there any way of changing it to be sorted? I have limited control over the order, the bars are plug-ins.
|
|
Technical Support
|
Nov 28, 2006 - 10:37 AM
|
You can modify and rebuild any of the built-in Prof-UIS menus. This is demonstrated in the ProfStudio sample, where you can see menus with lists of control bars organized into groups. So you could do this in a similar way, using the CExtControlBar::g_nMsgConstructPopupMenu message (it is handled in the CMainFrame::OnConstructPopupMenuCB() method in ProfStudio).
|
|
Offer Har
|
Nov 23, 2006 - 11:05 AM
|
|
|
Gevork Odabashyan
|
Nov 23, 2006 - 5:22 AM
|
Hellow
I need to show and edit multiline strings in data grid. But I can’t find how this can be done. Is it possible and what I need to do?
|
|
Technical Support
|
Nov 23, 2006 - 11:37 AM
|
|
|
Andrey Karavashkin
|
Nov 23, 2006 - 4:20 AM
|
Function BestFitColumn (defined in CExtGridWnd) works incorrect for CExtTreeGridWnd.
1. For first column - left extend (for tree lines) is not consider in column width calculation.
2. BestFitColumn finction parameter bDoBestFitByVisibleRowRangeOnly (false as default) doesn’t works. All Sub items of _unexpanded_ item is ignored in column width calculation
|
|
Technical Support
|
Nov 23, 2006 - 10:29 AM
|
We agree that the best fit actually works as you described but we do not think the current implementation of this feature is buggy. You could specify a minimum width for the header column (tree outline), in pixels, to avoid these problems. Both best fitting and proportional resizing will work properly for such a column and there will be no problem with the outline
|
|
Andrey Karavashkin
|
Nov 25, 2006 - 3:06 PM
|
Can’t agree with you.
Default behavior of BestFitColumn() function in CExtGridWnd - resize column to size of longest cell. The absolutely same bahavior must be in CExtTreeGridWnd. If there is no additional manipulation with cells required to best fit column in CExtGridWnd, why those manipulation required in CExtTreeGridWnd ?????
About recomended workaroud. [QUOTE: You could specify a minimum width for the header column] CExtGridCellHeader* pHeaderCell = (CExtGridCellHeader*)m_grd.GridCellGetOuterAtTop(0, 0,RUNTIME_CLASS(CExtGridCellHeader)); pHeaderCell->ExtentSet( 18, -1 ); It doesn’t works. Minimum width for header column - is just a _minimum_width_, no more. With minimal width, user can’t set column width less, than specified. But there is no correlation between _minimum_width_ and BestFitColumn().
Also, I found that pHeaderCell->ExtraSpaceSet( 18, false ); has strange effect in CExtTreeGridWnd. At code above, I add free 18 pixel space at left of grid (before first column). After that, BestFitColumn() increase column size for 18 pixels!! But if you’ll see to grid, column size is was not changed!! Only empty space _before_ column was added. Try to pHeaderCell->ExtraSpaceSet( 180, false ) and you will see, that BestFitColumn() will resize column with about 180 free white pixels after end of content of longest cell.
IMHO, CExtTreeGridWnd should has own version of BestFitColumn(), because tree outline size different in diferrent depth... Cell with very short text at depth-20 can be longer that cell with grid-wide-lognest-text at depth-1, isn’t it?
|
|
Technical Support
|
Nov 28, 2006 - 8:43 AM
|
We agree with you that the tree window should have its specific best fitting algorithm. However in some cases, like a very deep level of expanded rows, the best fitting is not applicable at all, especially if the proportional resizing is turned on and all the columns are stretched to the client area’s width. Besides, the tree grid window can display outline in any column and in more than one column at the same time. Please let us know when you need this feature (how urgent it is)?
|
|
Andrey Karavashkin
|
Dec 7, 2006 - 3:18 PM
|
I’m really sorry, for long delay with answer.
What about my needs - I only need workaround for BestFitColumn() issue in CextTreeGrid. As far as I understand, in my case, I just need to override function, that calculates cell with, and just add 18*depth_level pixels to width, isn’t it? (there is no proportional resize, outlines only in first column, only text cells in first column).
Also, I need to know how to show/hide tree outlines? (in some cases TreeGrid is not necessary at this time, but it will be very usefull in future extetions) And is it possible to have outlines in second (or other) column instead of default first. I found no any information about it in help.
|
|
Technical Support
|
Dec 13, 2006 - 6:25 AM
|
Yes, you can implement the custom best fitting in that way. The CExtTreeGridWnd::OnTreeGridQueryDrawOutline() virtual method is invoked to detect which column(s) display the tree outline. It is possible to hide the outline at all, display it for any column or even for several columns. The CExtGridBaseWnd::OnGbwPaintCell() virtual method is implemented in the CExtTreeGridWnd class and performs outline painting. You should override this method to repaint the tree outline and use the source code of the CExtTreeGridWnd ::OnGbwPaintCell() method as a sample.
|
|
Nitesh Singh
|
Nov 22, 2006 - 11:39 PM
|
Hi..
I have a dialog box on which I have 4-5 dialogboxes added as tabs. Now to manage those tabs we have a derived class CMyTabCtrl derived from CTabCtrl. Now I wanted to have the themes on the tab control.. as my dialog boxes are derived from CExtResizableDialog and are having themes.. but not the tab control portion...
I just want the tab control to be painted as same as other parts.. please suggest me. Is it possible to do without taking help of CExtTabWnd and CExtTabContainerWnd.. thnks..
|
|
Technical Support
|
Nov 23, 2006 - 10:36 AM
|
It is not possible to use CTabCtrl and have a consistent look at the same time. We can only recommend you using CExtTabContainerWnd instead.
|
|
Juri Tsjornoi
|
Nov 22, 2006 - 2:38 PM
|
Is it possible to add Prof-UIS classes into the MFC ClassWizard? For example, I created a control on the form and, to initialize it in the ClassWizard, I must choose variable type (a class of the control) in the "Add Member Variable" dialog box (I included a screenshot: http://www.zone.ee/skytech/mfc.bmp). And besides standart MFC classes, like for example CButton, CEdit, CStatic and so on, also I’d like to see there and to have opportunity to choose between Prof-UIS classes (CExtButton, CExtEdit, CExtLabel and so on...). I think, that it would be much more conveniently to choose Prof-UIS classes in the ClassWizard at once than to replace in the source code standart MFC classes with Prof-UIS one. Can you tell me, please, is it possible to do so?
|
|
Technical Support
|
Nov 23, 2006 - 10:02 AM
|
Unfortunately this feature is not supported.
|
|
Alexander Kool
|
Nov 21, 2006 - 4:39 AM
|
hey, i’ve got 2 questions about CExtReportGridWnd
1. How can I get my columns grouped the moment when I start my application without doing it myself. I want 2 columns grouped. I tried to use the code in OnRgColumnCtxCmdGroupByContextField, it worked partially. 2 columns are set in the GroupArea but they aren’t grouped yet. As soon as is sort a column (doesn’t matter which column, also columns outside the grouparea). the 2 columns in the GroupArea are grouped.
is there another way to group columns at the start of the running of my application. if not how can I be sure the columns are grouped right away.
2. Is it possible to have a function besides, Sort Ascending and Sort Desending, like UnSort. That the cells get their original state of position back. if so, how can i do that?
|
|
Alexander Kool
|
Nov 29, 2006 - 2:09 AM
|
thanks for your support.
I got it now. I just realized it when I saw my previous message. I called the function ’ReportSortOrderUpdate’ right after the columns were created. but than the columns didn’t have anything to sort, so its logical they didn’t appaer in tree form.
so when I called that function after the cells were created it worked fine.
|
|
Alexander Kool
|
Nov 27, 2006 - 6:04 AM
|
How can I change the gridcell state then?, I can change the griditem state but not the cell.
I want to correct myself: It isn’t the column that is in a form of a tree but the cells IN the column.
for example i’ve got 2 columns named ’section’ and ’side’ both containing information then my result should is(in tree form).
- Section: And .... + Side: Left .... + Side: Right .... + Side: Top .... + Side: Bottom
- Section: PWR .... + Side: Left .... + Side: Right .... + Side: Top .... + Side: Bottom
I’ve got this result already and it is OK but now I want to run my program with the above right at the start.
|
|
Technical Support
|
Nov 28, 2006 - 11:42 AM
|
When initializing the grid, please try ReportGridModifyStyle( __ERGS_COLLAPSE_AFTER_REGROUPING, 0, false );
|
|
Alexander Kool
|
Nov 27, 2006 - 3:52 AM
|
I’m sorry if I expressed myself wrong because I don’t think you understood what I meant.
I do want sorting for grouped columns and I do want those columns first followed by the rest of the data.
The only thing I want is that my first two columns are in a form of a tree. That’s bassicaly all.
for example if I drag one column to the grouparea my datagrid will become in form of a tree. thats what I want as soon as I start my program without dragging the columns myself. I accomplished to move the columns to the grouparea so the only thing I want more is that they are in a from of tree.
|
|
Suhai Gyorgy
|
Nov 27, 2006 - 4:25 AM
|
My guess is that you want to make the tree items initially expanded. I could’t find an easy solution for that, what might work is setting all gridcell’s state to __EEBS_EXPANDED, but it seems unfairly big work.
|
|
Alexander Kool
|
Nov 22, 2006 - 2:30 AM
|
thanks for your help. i replaced your code with mine and it worked. But I still got the same problem that the the 2 columns are in the grouparea, but aren’t grouped in form of a tree. I mean I have to sort one of the columns first and only then the columns are in form of a tree. eventualy I don’t want to show the grouparea. So I want to skip the part to sort first (because if the GroupArea isn’t visible the columns aren’t in the grid and it looks like they disappeared) and have the form of a tree right away. How can I do that?
Jordi Hoogeweegen
|
|
Technical Support
|
Nov 23, 2006 - 10:20 AM
|
It is hardly possible to implement high performance row grouping without sorting by grouped columns. Both the CExtReportGridWnd window and supergrid window in MS Outlook sort data by grouped columns first and only then optionally sort data by several additional columns. It is essential. We could implement such a feature but this would significantly slow down the performance. So we think it is unreasonable.
|
|
Technical Support
|
Nov 21, 2006 - 11:33 AM
|
You should specify a sort order information object for the report grid control. Here is the sample code: CExtReportGridWnd & wndReportGrid = . . .
// grouping by two columns
CExtReportGridColumn * pRGC1 = . . .
CExtReportGridColumn * pRGC2 = . . .
bool bAscending1 = . . .
bool bAscending2 = . . .
CExtReportGridSortOrder rgso;
rgso.ColumnInsert( pRGC1, -1, bAscending1 );
rgso.ColumnInsert( pRGC2, -1, bAscending2 );
rgso.ColumnGroupCountSet( 2 );
wndReportGrid.ReportSortOrderSet( rgso, false, true );
// removing sort order
CExtReportGridSortOrder rgsoEmpty;
wndReportGrid.ReportSortOrderSet( rgsoEmpty, false, true ); rgsoEmpty is empty and has no columns, so it specifies that there should not be any sorting/grouping.
|