Subject |
Author |
Date |
|
tera t
|
Apr 13, 2007 - 1:32 AM
|
Hi
In one application. When there is plural DIALOG. May I use plural CMD_PROFILE?
DialogA - __PROF_UIS_PROJECT_CMD_PROFILE_NAMEA
DialogB - __PROF_UIS_PROJECT_CMD_PROFILE_NAMEB
I do not understand a meaning to use well.
|
|
Technical Support
|
Apr 13, 2007 - 11:50 AM
|
Yes, you can create two dialogs and each of them will be based on its unique command profile name. In each dialog, invoke g_CmdManager->ProfileSetup() from its OnInitDialog() virtual method and specify its unique profile name and dialog’s window handle. Besides These unique command profiles for each dialog are also needed if the dialog has a menu bar. The CExtMenuControlBar class requires that the only one instance of this class should be used in scope of one command manager’s profile. If any of your dialog windows become destroyed and created again at runtime, you should also remove the command manager’s profile when the dialog gets destroyed (i.e. invoke g_CmdManager->ProfileRemove() both in OnOK() and OnCancel() of the dialog).
|
|
Ian McIntosh
|
Apr 12, 2007 - 6:03 AM
|
I get an ASSERT on the following line:
ASSERT_KINDOF( CExtTreeGridCellNode, pCell );
my code is as follows: if (ReportItemIsRegistered(data.pItem)) { ReportItemUnRegister(data.pItem); }
in that code, data.pItem is a CExtReportGridItem* and has previously been registered.
the assert happens only occasionally.
my call stack is: > ProfUIS264md.dll!CExtTreeGridCellNode::FromHTREEITEM(_TREEITEM * hTreeItem=0x03455968) Line 234 + 0x25 bytes C++ ProfUIS264md.dll!CExtTreeGridWnd::ItemEnsureExpanded(_TREEITEM * hTreeItem=0x03455968, bool bRedraw=false) Line 2661 + 0x9 bytes C++ ProfUIS264md.dll!CExtTreeGridWnd::ItemFocusSet(_TREEITEM * hTreeItem=0x03455968, long nColNo=-1, bool bRedraw=false) Line 2628 + 0x18 bytes C++ ProfUIS264md.dll!CExtTreeGridWnd::ItemFocusSet(_TREEITEM * hTreeItem=0x03455968, bool bRedraw=false) Line 2645 + 0x3a bytes C++ ProfUIS264md.dll!CExtReportGridWnd::_ReportItemUnRegisterImpl(CExtReportGridItem * pRGI=0x03455968, bool bResetFocus=true, bool bRedraw=true) Line 7591 + 0xe bytes C++ ProfUIS264md.dll!CExtReportGridWnd::ReportItemUnRegister(CExtReportGridItem * pRGI=0x0345580c, bool bResetFocus=true, bool bRedraw=true) Line 7801 + 0x1e bytes C++ GuiMdi.exe!CIndicatorGrid::IndicatorInfo(const char * szDisplay=0x03505368, const char * szComponent=0x03505310, const char * szDevice=0x035052b0, int nIndicatorId=9000, const char * szName=0x06e44fe0, CDeviceValueIndicator::t_Level eLevel=eIndicator_OK, const char * szMessage=0x0012e1a8, __int64 tTimeLastChanged=1176378414) Line 107 + 0x27 bytes C++
|
|
Technical Support
|
Apr 12, 2007 - 1:25 PM
|
There is not enough information in your message to understand what causes the assertion failure. This may be a corrupted data.pItem pointer or it may contain a pointer to a report row which in may have been already unregistered. In any case, you can try repeating the problem when the report grid control contains only one registered row. In this case, you could simply set breakpoints in the destructor of the CExtReportGridItem class and in the class which is the data object’s type. This should allow you to find out whether something that was destroyed continues using trash pointers.
|
|
Offer Har
|
Apr 12, 2007 - 4:43 AM
|
Dear Support,
I tried to use CExtPPVW in my project, but got a flickering problem; my original view is drawn and also the preview view is drawen. The original view is drawing on top of the menu and the preview view. If I remove the CExtPPVW template from my project, the default MFC preview works fine.
What else should I do beside templating my view so that the preview will work?
Thanks, Ron.
|
|
Technical Support
|
Apr 12, 2007 - 1:22 PM
|
You can see how CExtPPVW is used in the DRAWCLI sample and use it similarly in your project. There must be some differences which explain what causes the problem. If the problem persists, you can send us your view class so we can see what’s wrong.
|
|
Offer Har
|
Apr 12, 2007 - 1:28 PM
|
Dear Support,
I used the DRAWCLI as a reference, but no luck. Please let me know if there is anything else I should be aware of beside adding the template class. Sending you my view will be the last resort, because it depends on a lot of other items.
Regards, Ron.
|
|
Technical Support
|
Apr 13, 2007 - 4:41 AM
|
Please check once again the following in the DRAWCLI sample application and in your project(s):
1) How CExtPPVW is used in the CDrawView::OnScrollBy() method.
2) If you invoke the CExtPPVW < C_base_of_your_View > :: method_name() base class members instead of C_base_of_your_View::method_name() .
3) The CDrawView::OnPrepareDC() method should the C_base_of_your_View::OnPrepareDC() method and not CExtPPVW < C_base_of_your_View > :: OnPrepareDC() .
4) The view window and MDI child frame window in the MDI project should have the WS_CLIPSIBLINGS|WS_CLIPCHILDREN standard window styles.
|
|
Offer Har
|
Apr 16, 2007 - 9:24 AM
|
Dear Support,
Did you reproduce the problem in the project I sent you?
Regards, Ron.
|
|
Technical Support
|
Apr 16, 2007 - 11:38 AM
|
Your sample application is based on MFC’s print preview -- not on the CExtPPVW template class from Prof-UIS. Of course, we could convert it into CExtPPVW -based one, but this would be the same as you can see in the CDrawView class in the DRAWCLI sample.
|
|
Offer Har
|
Apr 16, 2007 - 11:47 AM
|
Exactly! Try it and you’ll see that it doesn’t work like the DRAWCLI. And if it does, then please let me know... because I did just that and it didn’t work. I also sent you via mail captures of the weird things that happen to me when i apply the CExtPPVW in this project.
Thanks, Ron.
|
|
Burak Petekkaya
|
Apr 12, 2007 - 2:24 AM
|
Hi,
in my mainframe class I add following code
in h. file
afx_msg LRESULT OnThemeChanged( WPARAM wParam, LPARAM lParam );
in cpp.file ,
BEGIN_MESSAGE_MAP(CMainFrame, CExtNCW < CMDIFrameWnd >) ............. ON_MESSAGE(__ExtMfc_WM_THEMECHANGED, OnThemeChanged) .......... END_MESSAGE_MAP()
and
LRESULT CMainFrame::OnThemeChanged( WPARAM wParam, LPARAM lParam ) { LRESULT lResult = Default(); // CExtPaintManager * pPM = g_CmdManager->PPmBridge_GetPM(); g_PaintManager.OnThemeChanged( this, wParam, lParam ); // g_CmdManager.OnThemeChanged( pPM, this, wParam, lParam ); return lResult; }
but when I was debugging application,there was no jumping to CMainFrame::OnThemeChanged(...) method above
I must access this code place .How can I do?
|
|
Burak Petekkaya
|
Apr 12, 2007 - 5:56 AM
|
Hi, I manage my application as sample, TabbedBars.But while compile project ,a compile errors occured.
error occured in code place (it is another class) where I create my MainFrameClass
CMainFrame* pMainFrame = new CMainFrame;
The error is :error C2259: aˆ™CMainFrameaˆ™ : cannot instantiate abstract class due to following members see declaration of aˆ™CMainFrameaˆ™
my mainframeclass h. file class CMainFrame : public CExtNCW < CMDIFrameWnd > , CExtPmBridge {.... this error occured after I derived CMainFrame from CExtPmBridge,
before I change declaration of aˆ™CMainFrameaˆ™ it was like below
class CMainFrame : public CExtNCW < CMDIFrameWnd > { ....
what can I do? I must do this.AA°taˆ™s very important for me
please help me!
|
|
Suhai Gyorgy
|
Apr 12, 2007 - 6:55 AM
|
I think you missed one important line from your class file:
IMPLEMENT_CExtPmBridge_MEMBERS( CMainFrame ); Check this FAQ and TabbedBars sample.
|
|
Burak Petekkaya
|
Apr 12, 2007 - 5:49 AM
|
Hi,
I manage my application as sample, TabbedBars.But while compile project ,a compile errors occured.
error occured in code place (it is another class) where I create my MainFrameClass
CMainFrame* pMainFrame = new CMainFrame; The error is :error C2259: ’CMainFrame’ : cannot instantiate abstract class due to following members see declaration of ’CMainFrame’
my mainframeclass h. file class CMainFrame : public CExtNCW < CMDIFrameWnd > , CExtPmBridge {.... this error occured after I derived CMainFrame from CExtPmBridge,
before I change declaration of ’CMainFrame’ it was like below
class CMainFrame : public CExtNCW < CMDIFrameWnd > { ....
what can I do? I must do this.A°t’s very important for me
please help me!
|
|
Suhai Gyorgy
|
Apr 12, 2007 - 3:44 AM
|
You are trying to catch the wrong message. I found this message handling in TabbedBars sample of ProfUIS. If you set a breakpoint in OnThemeChanged method of that sample’s MainFrame, you can see that changing ProfUIS theme on Theme Switcher toolbar won’t make that message fired. It is only fired when you change the theme of your Windows through Control Panel -> Display properties. What’s wrong with Support’s solution?
|
|
Suhai Gyorgy
|
Apr 12, 2007 - 3:51 AM
|
Check out same sample, TabbedBars. Set a breakpoint in CMainFrame::PmBridge_OnPaintManagerChanged and run application. Click on any button on ThemeSwitcher toolbar and you will see the code in CMainFrame::PmBridge_OnPaintManagerChanged accessed.
|
|
Brett Cook
|
Apr 11, 2007 - 5:49 PM
|
Dear Tech Support,
Is there a way to make my main CFrameWnd (CMainFrame) to come up initially hidden? I tried turning off the WS_VISIBLE flag in the PreCreateWindow call, but the frame window still shows up after OnCreate is finished.
Any ideas?
Thanks, -Brett
|
|
Suhai Gyorgy
|
Apr 12, 2007 - 1:38 AM
|
Look in your application class’ InitInstance method. There should be either a pFrame->ShowWindow(SW_SHOW) or an pFrame->ActivateFrame(SW_SHOW) call. If you have the ActivateFrame call, it probably means that your application is set to handle window placement persistence, which I guess you dont need in your case. You should have pFrame->ShowWindow( SW_HIDE ) and pFrame->UpdateWindow() calls instead. But this will mean that your application window won’t be seen as long as you call ShowWindow(SW_SHOW) somewhere else in your code. Another solution would be to have every other initialization code in your InitInstance method, before calling ShowWindow(SW_SHOW) in it. What exactly you’d like to achieve with this hidden window?
|
|
Brett Cook
|
Apr 12, 2007 - 12:54 PM
|
Indeed, I am in fact currently doing what you describe: In CWinApp::InitInstance, I call ShowWindow( SW_HIDE ) after CMainFrame::OnCreate() is done, and then call ShowWindow( SW_SHOW ) after the rest of my application is finished initializing.
The problem arises when CMainFrame::OnCreate() returns, but before control is given back to CWinApp::InitInstance(). The UI frame is drawn and shows up briefly, until control is returned back to CWinApp::InitInstance() at which point I call the ShowWindow( SW_HIDE ), while the rest of the application initializes.
It is that flash of the UI between when CMainFrame::OnCreate() returns and control comes back to CWinApp::InitInstance(), that I want to avoid.
Is there anyway to tell the CMainFrame to come up initially hidden, and only show itself after I call the ShowWindow( SW_SHOW ) call?
Thanks, -Brett
|
|
Suhai Gyorgy
|
Apr 12, 2007 - 2:46 PM
|
I tried it with SDI sample of ProfUIS. InitInstance code little changed in it: { ...
CMainFrame* pFrame = new CMainFrame;
m_pMainWnd = pFrame;
// create and load the frame with its resources
pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
NULL);
// The one and only window has been initialized, so show and update it.
pFrame->ShowWindow(SW_HIDE);
pFrame->UpdateWindow();
AfxMessageBox(_T("Initializing..."));
pFrame->ShowWindow(SW_SHOW);
pFrame->UpdateWindow();
return TRUE;
}
Testing it, mainframe doesn’t show up, not even for a blink, before pressing OK on MessageBox. So there must be something in your code that causes the window to show up.
|
|
Burak Petekkaya
|
Apr 11, 2007 - 1:14 PM
|
Hi,
I have a visual c++ mfc application with prof-UIS.
I init Theme Switcher Toolbar on my MainFrame OnCreated Method.
I want to realize Theme Changes permanently.So,my MainFrame should take message from Theme Switcher Toolbar control.
How can my MainFrame take message when Theme Switcher Toolbar Button Clicked At Runtime?
|
|
Suhai Gyorgy
|
Apr 12, 2007 - 1:51 AM
|
Go for Support’s solution, and forget about ThemeSwitcher_OnButtonInvoke. You can’t take a message. But I guess you’d use the message to associate a message-handler with it anyway. So if you use Support’s solution on your CMainFrame, your code would look something like this: // In .h file:
class CMainFrame
: public CFrameWnd
, public CExtPmBridge
{
public:
DECLARE_CExtPmBridge_MEMBERS( CMainFrame );
CMainFrame();
~CMainFrame();
virtual void PmBridge_OnPaintManagerChanged(
CExtPaintManager * pGlobalPM
);
. . .
};
// In .cpp file:
IMPLEMENT_CExtPmBridge_MEMBERS( CMainFrame );
CMainFrame::CMainFrame()
{
PmBridge_Install(); // Subscribe
...
}
CMainFrame::~CMainFrame()
{
...
PmBridge_Uninstall(); // Unsubscribe
}
void CMainFrame::PmBridge_OnPaintManagerChanged(
CExtPaintManager * pGlobalPM
)
{
// place code here that you’d like to put in you message-handler
...
//call base class method to have the theme changed
CExtPmBridge::PmBridge_OnPaintManagerChanged(
pGlobalPM
);
}
So PmBridge_OnPaintManagerChanged method could act like your message-handler method.
|
|
Burak Petekkaya
|
Apr 11, 2007 - 7:38 AM
|
Hi,
I init CExtThemeSwitcherToolControlBar where MainFrame class OnCreate method in.
When I run visual c++ 6.0 mfc application ,I clicked themeaˆ™s button over ThemeSwitcherToolBar.
I wan’t to catch selected themeaˆ™s button is clicked while I was debugging program. How can I do?
NOTE:
I Make a theme switcher toolbar class derived from CExtThemeSwitcherToolControlBar and override the following method in it: virtual void ThemeSwitcher_OnButtonInvoke( CExtThemeSwitcherToolButton * pTBB );
But I can’t find where I should call ThemeSwitcher_OnButtonInvoke function in my main frame or anywhere
|
|
Suhai Gyorgy
|
Apr 11, 2007 - 8:04 AM
|
I think you better go for Support’s solution, mine was only a guess. But just to answer your question: you don’t need to call ThemeSwitcher_OnButtonInvoke anywhere. It would be called from ProfUIS code when any of the buttons of that toolbar is clicked.
|
|
Burak Petekkaya
|
Apr 11, 2007 - 12:56 PM
|
Hi,
it is ok.it would be called from ProfUIS code.But, I want to send message to mainframe of my application at runtime(as soon as button clicked ).How can I do this?
|
|
Chris Anderson
|
Apr 10, 2007 - 6:04 PM
|
hi all,
I ran into an issue when integrating prof-ui 264 into a legacy MFC app, even though we figured out a solution, it seems more like a work around, and I would like to see whether it will be addressed inside prof-ui in the future.
In the legacy code, we will create a few toolbars inside CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) function, here is the code excerpt
class CMainFrame : public CMDIFrame { CToolBar m_wndToolBar1; ... }
// create toolbar 1 if (!m_wndToolBar1.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP, IDR_TOOLBAR1) || !m_wndToolBar.LoadToolBar(IDR_TOOLBAR1)) { TRACE0("Failed to create toolbar1\n"); return -1; // fail to create }
// create toolbar 2 ...
Later we need a reference to the toolbar
CControlBar* pBar = m_pToolbarFrame->GetControlBar(IDR_TOOLBAR1);
After the integration, it would look like this
class CMainFrame : public CExtNCW <CMDIFrameWnd> { CExtToolControlBar m_wndToolBar1; ... }
if ( !m_wndScrollToolBar.Create( _T( "ToolBar1" ), this,AFX_IDW_TOOLBAR) || !m_wndScrollToolBar.LoadToolBar( IDR_TOOLBAR1)) {
}
The problem : now I’m not able to get the reference to toolbar1 with this call
CControlBar* pBar = m_pToolbarFrame->GetControlBar(IDR_TOOLBAR1);
Even though it’s possible to hard coded and return a pointer of CExtToolControlBar, but the CControlBar pointer is used a lot, and I don’t want to change that.
After some debugging, it turns out that CExtToolControlBar::Create() doesn’t add itself to it’s parent’s control list. to make sure CFrameWnd::GetControlBar() still works with CExtToolControlBar, I have to manually add it to CFrameWnd’s m_listControls
_AfxSetDlgCtrlID(m_wndToolBar1.m_hWnd, IDR_TOOLBAR1); this->AddControlBar(&m_wndToolBar1);
Shoud these be done in CExtControlBar::Create( ) to maintain the compatibility with CFrameWnd::GetControlBar() ?
thanks
|
|
Technical Support
|
Apr 11, 2007 - 10:33 AM
|
CExtControlBar and all classes derived from it (including CExtToolControlBar and CExtMenuControlBar ) are added to the CFrameWnd::m_listControlBars list of CControlBar* pointers only if they are enabled for docking. We would like not to change this specific issue in Prof-UIS and ask you to add the pointer to the toolbar manually.
|
|
Burak Petekkaya
|
Apr 10, 2007 - 8:31 AM
|
Dear Sir/Madam,
We have a Visual C++ 6.0 Mfc project with Prof-UIS.
When we run application we can change current GUI Theme over Theme Switcher Toolbar
But I can’t realize the event of changing themes in the code. How can I do this? How can I use OnThemeChanged method? Hope to hear back from you as soon as possible.
Best regards.
|
|
Burak Petekkaya
|
Apr 11, 2007 - 1:21 AM
|
Dear Sir\Madam,
When we run our visual C++ 6.0 Mfc application ,At first, we can see all of the Theme (it must be thirteen) on the Theme Switcher Toolbar.But now there are only eight Theme on it.How did the other Theme leave?
|
|
Technical Support
|
Apr 11, 2007 - 10:30 AM
|
There is a CExtThemeSwitcherToolControlBar ::m_bEnableOffice2007r3 property, which when set to true, adds three additional themes. But these themes are relevant to the ribbon control only. So if you have no ribbon bar, there is no point to turn this option on.
|
|
Technical Support
|
Apr 10, 2007 - 9:56 AM
|
|
|
Suhai Gyorgy
|
Apr 10, 2007 - 9:10 AM
|
Make a theme switcher toolbar class derived from CExtThemeSwitcherToolControlBar and override the following method in it: virtual void ThemeSwitcher_OnButtonInvoke( CExtThemeSwitcherToolButton * pTBB ); In it you should call base class method first and then you can do whatever code you need. E.g.: void CMyThemeSwitcherToolControlBar::ThemeSwitcher_OnButtonInvoke(
CExtThemeSwitcherToolButton * pTBB
)
{
CExtThemeSwitcherToolControlBar::ThemeSwitcher_OnButtonInvoke(pTBB);
CRuntimeClass * pRTC = NULL;
if( ! m_mapCmd2RTC.Lookup( pTBB->GetCmdID(false), pRTC ) )
return;
if ( pRTC == RUNTIME_CLASS( CExtPaintManagerStudio2005 ) ) {
// do something here
}
}
The only problem is, this method is called also when the currently selected theme’s button is clicked in the toolbar. Check out base class implementation in ProfUIS source to see how they check for this.
|
|
Adam Keadey
|
Apr 9, 2007 - 3:15 PM
|
I want to modify the text and background color of my tooltip when hovering over a cell that is partially hidden.
|
|
Technical Support
|
Apr 10, 2007 - 10:00 AM
|
The background color of the cell’s content popup window is specified by the COLOR_INFOBK color. The text is painted in the CExtGridCell::OnPaintText() method, so the text color is the same as the color of the cell text. All the painting procedures are invoked from the CExtGridCell::OnPaintExpandedContent() virtual method when the client area of the content expand window is being painted. So you can override this method and modify the painting as you need.
|
|
Rado Manzela
|
Apr 8, 2007 - 10:37 AM
|
I’d like to remove the ribbon bar from the library to reduce size of my application, but it is not possible to compile it when I uncomment this line: #define __EXT_MFC_NO_RIBBON_BAR
Is it a bug or I need to exclude somethig else as well?
Thank you
|
|
Technical Support
|
Apr 9, 2007 - 1:00 PM
|
Thank you for reporting this bug. Please contact us via email for the source code update.
|
|
Rado Manzela
|
Apr 10, 2007 - 3:06 AM
|
Thank you, but it is not so important for me right now so I’ll wait to next stable release.
|
|
Christoph Luedi
|
Apr 6, 2007 - 1:23 PM
|
In the application I’m working with there is more than one Window derived from CMainFrame... it all works fine if I use CExtNCW<CFrameWnd>, the window frame gets the correct theme style. But if the style is changed at runtime, the nonclient icons are lost. Is there a solution for that problem or do I have to change the baseclass structure?
|
|
Christoph Luedi
|
Apr 6, 2007 - 2:02 PM
|
found it out myself... I derived CMyClass from CExtNCW<CFrameWnd> instead of instanciating a variable with CExtNCW<CMyClass>.
BTW - I have not found too much documentation of the template classes in ExtTempl... is there any?
Thanks
|
|
Technical Support
|
Apr 7, 2007 - 12:58 PM
|
The new features that were added in versions 2.63 and 2.64 will be fully documented in the next version that is coming soon.
|
|
Chris Anderson
|
Apr 5, 2007 - 6:14 PM
|
There is noticeable flicker when selecting any of the Office2007(release1/2/3) themes. This happens when moving the mouse over the title bar buttons (any of restore/minimize/close button). However if we select the theme other than that mentioned above it works fine.
I see that Prof UIS has fixed the problem. Could you please share the solution?
|
|
Chris Anderson
|
Apr 6, 2007 - 6:27 PM
|
We are having trouble finding out where the FTP site is. Can you provide some information. Is there any special login and password required for this FTP site? We downloaded 2.64 version from your site. Is there a version later than this? Please let us know.
|
|
Technical Support
|
Apr 7, 2007 - 1:08 PM
|
v.2.64 is the latest release and it is available at http://www.prof-uis.com/download.aspx. Besides any customer with a valid subscription can always download the latest stable source code via ftp, which is now marked as v.2.64.1. You can request the download information via email at support@prof-uis.com.
|
|
Technical Support
|
Apr 6, 2007 - 12:29 PM
|
Thank you for reporting the problem. It is fixed and you can download the latest source code from our ftp server.
|
|
Andrew Banks
|
Apr 5, 2007 - 3:20 PM
|
Have a ribbon bar with 2 CExtRibbonNodeTabPage. The first CExtRibbonNodeTabPage contains several groups, works fine and makes me smile.
However, the second has only two groups and the 2nd group has 3 buttons and is always collapsed.
I have played with RibbonILE_SetCollapsed and cant get both ribbon groups to open at the same time.
Cant find any documentation on how to deal with controlling these ribbon groups/button Collapsing.
Can you please help
|
|
Technical Support
|
Apr 6, 2007 - 12:26 PM
|
The documentation will be available in the next release. We are sorry for this inconvenience.
If all the ribbon nodes are configured to be collapsed at the same effective informativeness level (ILE), you should see all of them collapsed at the same time. Please let us take a look at the source code which initializes ribbon groups that should be collapsed synchronously.
|
|
Jia Hong Li
|
Apr 5, 2007 - 2:43 AM
|
Hi, tech. How can I disable and hide some default buttons on control bar in the print preview mode when I use CExtPPVW? Thanks... ˆ_ˆ
|
|
Suhai Gyorgy
|
Apr 5, 2007 - 3:33 AM
|
Hi! If your class is of template CExtPPVW, then you can reach that toolbar with m_pWndPP->m_pPpvWndToolBar . Best place to change the toolbar is if you override virtual void OnInitializePrintPreviewToolBar() method. In it, first call base class method, then you can customize toolbar. The default commands of the toolbar, if we look in ProfUIS resource file:
IDR_EXT_TOOLBAR_PPW TOOLBAR DISCARDABLE 16, 16 BEGIN BUTTON ID_EXT_PPV_PREV BUTTON ID_EXT_PPV_NEXT BUTTON ID_EXT_PPV_PAGE_MODE_1 BUTTON ID_EXT_PPV_PAGE_MODE_2 BUTTON ID_EXT_PPV_PAGE_MODE_3 BUTTON ID_EXT_PPV_PAGE_MODE_4 BUTTON ID_EXT_PPV_PAGE_MODE_5 BUTTON ID_EXT_PPV_PAGE_MODE_6 BUTTON ID_EXT_PPV_PAGE_MODE_7 BUTTON ID_EXT_PPV_VIEW_MODE_FIT_WIDTH BUTTON ID_EXT_PPV_VIEW_MODE_FIT_HEIGHT BUTTON ID_EXT_PPV_VIEW_MODE_FIT_PAGES BUTTON ID_EXT_PPV_VIEW_MODE_MAGNIFY BUTTON ID_EXT_PPV_VIEW_ZOOMIN BUTTON ID_EXT_PPV_VIEW_ZOOMOUT BUTTON ID_EXT_PPV_SHOW_MARGINS BUTTON ID_EXT_PPV_SETUP BUTTON ID_EXT_PPV_PRINT BUTTON ID_EXT_PPV_CLOSE END
But checking code of default OnInitializePrintPreviewToolBar() method (in exprint.cpp, look for CExtPPVW_Printable::OnInitializePrintPreviewToolBar() ), you can read from code that there are other commands inserted after LoadToolBar. So you should find out, which command you want to hide and actually you should remove them from toolbar. So if you want to remove let’s say ID_EXT_PPV_VIEW_MODE_FIT_WIDTH command, your code would be:
void CDemoGrid::OnInitializePrintPreviewToolBar()
{
CExtPPVW < CExtGridWnd >::OnInitializePrintPreviewToolBar();
m_pWndPP->m_pPpvWndToolBar->RemoveButton(m_pWndPP->m_pPpvWndToolBar->CommandToIndex(ID_EXT_PPV_VIEW_MODE_FIT_WIDTH));
}
To use ID_EXT_PPV_VIEW_MODE_FIT_WIDTH or other built-in command identifier of ProfUIS in your own code, you need to place this line in that file: #include <Resources/resource.h> Disabling would be little harder, I think, I’d go for removing the unwanted commands.
|
|
Jia Hong Li
|
Apr 5, 2007 - 4:40 AM
|
Thanks...It works...and another question: how to romove ZoomScrollBar that perform zoom-in and zoom-out if I do not want to change the Prof-UIS? this part of code inside Prof-UIS(ExtPrint.cpp) is to create the default ZoomScrollBar: if( m_pWndPP->m_bPpvUseZoomScrollBar ) { VERIFY( m_pWndPP->m_pPpvWndToolBar->InitZoomScrollBar() ); if( m_pWndPP->m_pPpvWndToolBar->m_wndZoomScrollBar.GetSafeHwnd() != NULL ) m_pWndPP->m_nPpvMagnifyLevel = (UINT)m_pWndPP->m_pPpvWndToolBar->m_wndZoomScrollBar.GetScrollPos(); }
Maybe it’s good way to reomve by marking this part but....any other way to do that?
Thanks a lot (ˆ_ˆ)
|
|
Suhai Gyorgy
|
Apr 5, 2007 - 4:48 AM
|
I didnt try it, but I guess it can be done like this: void CDemoGrid::OnInitializePrintPreviewToolBar()
{
m_pWndPP->m_bPpvUseZoomScrollBar = false;
CExtPPVW < CExtGridWnd >::OnInitializePrintPreviewToolBar();
m_pWndPP->m_pPpvWndToolBar->RemoveButton(m_pWndPP->m_pPpvWndToolBar->CommandToIndex(ID_EXT_PPV_VIEW_MODE_FIT_WIDTH));
}
Setting that boolean to false will skip the piece of code you mentioned.
|
|
Jia Hong Li
|
Apr 5, 2007 - 8:04 PM
|
Thank you, Suhai. It works ˆ_ˆ
|
|
Brian Horn
|
Apr 4, 2007 - 11:11 PM
|
We are using the CExtPropertyGridCtrl for displaying the proprties We have used the edit box type cell creation as below CExtGridCellString *pValue =
STATIC_DOWNCAST(
CExtGridCellString,
ValueActiveGetByRTC( RUNTIME_CLASS(CExtGridCellString) )
);
pValue->TextSet(_T("Edit text"));
pValue->ModifyStyle( iStyle );
When user attempt to enter a decimal point while using the grid it does not accept that as input.
It accepts digits and alphabets but not the decimal point as input from the user.
However the grid allows setting the value to something like aˆ? 0.01aˆ? by using the TextSet method in the code.
You can reply on ayubkhan.pathan@mscsoftware.com
Regards, Ayub/Ajit
|
|
Brian Horn
|
Apr 16, 2007 - 4:06 AM
|
We did modify the code and build it still the problem is there. Surprisingly it is working fine with sample application even without above changes. Identical code we added in our application and it is not accepting dot (.) character. It accepts all other special characters. Is there any method by which we can set property to enable this?
Please help.
Regards, Ayub
|
|
Technical Support
|
Apr 16, 2007 - 11:01 AM
|
The bug is fixed. Please open the CExtGridWnd::OnGbwBeginEdit() method and find the following code snippet at the end of the method: if( (!bCtrl) && (!bShift) && int(msg.wParam) == VK_DELETE )
{
::PeekMessage(&msg,NULL,msg.message,msg.message,PM_REMOVE);
if( msg.message == WM_KEYDOWN )
{
LPTSTR strEmpty = _T("");
INT nSelStart = 0, nSelEnd = 0;
::SendMessage( msg.hwnd, EM_GETSEL, reinterpret_cast < WPARAM > ( &nSelStart ),
reinterpret_cast < LPARAM > ( &nSelEnd ) );
if( nSelStart == nSelEnd )
::SendMessage( msg.hwnd, EM_SETSEL, WPARAM( nSelStart ), LPARAM( nSelStart + 1 ) );
::SendMessage( msg.hwnd, EM_REPLACESEL, 1, reinterpret_cast < LPARAM > ( strEmpty ) );
}
continue;
} Please replace it with this if( (!bCtrl) && (!bShift) && int(msg.wParam) == VK_DELETE )
{
if( msg.message != WM_CHAR )
{
::PeekMessage(&msg,NULL,msg.message,msg.message,PM_REMOVE);
if( msg.message == WM_KEYDOWN )
{
LPTSTR strEmpty = _T("");
INT nSelStart = 0, nSelEnd = 0;
::SendMessage( msg.hwnd, EM_GETSEL, reinterpret_cast < WPARAM > ( &nSelStart ),
reinterpret_cast < LPARAM > ( &nSelEnd ) );
if( nSelStart == nSelEnd )
::SendMessage( msg.hwnd, EM_SETSEL, WPARAM( nSelStart ), LPARAM( nSelStart + 1 ) );
::SendMessage( msg.hwnd, EM_REPLACESEL, 1, reinterpret_cast < LPARAM > ( strEmpty ) );
}
continue;
}
}
|
|
Technical Support
|
Apr 5, 2007 - 4:14 AM
|
This bug is already fixed. Please open the CExtGridWnd::OnGbwBeginEdit() method and find the following code snippet if( (!bCtrl) && (!bShift) && int(msg.wParam) == VK_DELETE )
{
::PeekMessage(&msg,NULL,msg.message,msg.message,PM_REMOVE);
if( msg.message == WM_KEYDOWN )
{
LPTSTR strEmpty = _T("");
INT nSelStart = 0, nSelEnd = 0;
::SendMessage( msg.hwnd, EM_GETSEL, reinterpret_cast < WPARAM > ( &nSelStart ), reinterpret_cast < LPARAM > ( &nSelEnd ) );
if( nSelStart == nSelEnd )
::SendMessage( msg.hwnd, EM_SETSEL, WPARAM( nSelStart ), LPARAM( nSelStart + 1 ) );
::SendMessage( msg.hwnd, EM_REPLACESEL, 1, reinterpret_cast < LPARAM > ( strEmpty ) );
}
continue;
} Replace it with the following code if( (!bCtrl) && (!bShift) && int(msg.wParam) == VK_DELETE )
{
if( msg.message != WM_CHAR )
{
::PeekMessage(&msg,NULL,msg.message,msg.message,PM_REMOVE);
if( msg.message == WM_KEYDOWN )
{
LPTSTR strEmpty = _T("");
INT nSelStart = 0, nSelEnd = 0;
::SendMessage( msg.hwnd, EM_GETSEL, reinterpret_cast < WPARAM > ( &nSelStart ), reinterpret_cast < LPARAM > ( &nSelEnd ) );
if( nSelStart == nSelEnd )
::SendMessage( msg.hwnd, EM_SETSEL, WPARAM( nSelStart ), LPARAM( nSelStart + 1 ) );
::SendMessage( msg.hwnd, EM_REPLACESEL, 1, reinterpret_cast < LPARAM > ( strEmpty ) );
}
continue;
}
}
|
|
Suhai Gyorgy
|
Apr 5, 2007 - 1:02 AM
|
First of all, would you show what’s value of iStyle ?
|
|
Dusan Gibarac
|
Apr 4, 2007 - 3:58 PM
|
On ProdUIS Controls sample, Tab Containers option, we have as a fifth tab a dialog with one edit field which definitions is in class PagePopupMenus. Why there? When I add one more exit control on the dialog and correspondng DDX statement, execution failes with ’An unsupported operation was attempted’. Many variations to do it failed on similar way. Please, can you give one simple example how to descriebe controls on dialog being on a tab page (CExtTabPageContainerWnd).
|
|
Suhai Gyorgy
|
Apr 5, 2007 - 1:12 AM
|
First it was strange what you wrote, but I also opened the same dialog’s resource in Resource Editor, to check ID of Edit. When I didn’t click in the ID field, just hovered above it, it showed value IDC_EDIT_IN_TAB_PAGE_DIALOG. But when I doubleclicked field, it changed to be IDC_EDIT_INCREASE_PERCENT!! It is because that field is a dropdown combo, and the dropdown list’s item directly below IDC_EDIT_IN_TAB_PAGE_DIALOG is IDC_EDIT_INCREASE_PERCENT. So for the first click of doubleclick, the list appeared very-very quickly and second click of doubleclick selected the next ID in list. I think this is also what happened in your case. So the solution: go back to Resource Editor, in ID field of Editbox, make the list drop down and select back IDC_EDIT_IN_TAB_PAGE_DIALOG. I think that will solve all your problems.
|
|
Rado Manzela
|
Apr 4, 2007 - 9:28 AM
|
I have CExtTreeGridWnd. It has 1 outer row at bottom (also one at top). It contains more rows than can be disabled so there is vertical scroll bar. Then I scroll it to bottom so that last inner row is close to bottom outer row. There is one row selected in the middle of grid. When I click at last inner row, the grid is not redrawn althought new selection was made. When I move the grid out of screen and then back then it is redrawn (old selection disappears and last row’s selection is drawn).
|
|
Rado Manzela
|
Apr 8, 2007 - 10:32 AM
|
Thank you, I’ve sent you te e-mail
|
|
Rado Manzela
|
Apr 5, 2007 - 3:27 AM
|
Thank for checking this. I wanted to try your project and modofy it but it seems you’ve used newer verision of prof-uis: ChildView.cpp(1147) : error C2065: ’ItemSortChildren’ : undeclared identifier I’m looking forward row sorting in tree grid ;)
After many trials I’ve found the problem - it is __EGBS_FIXED_SIZE_ROWS flag. Try to set it for your grid.
|
|
Technical Support
|
Apr 4, 2007 - 12:27 PM
|
We tried to reproduce the problem and failed. We used this project for testing (see this figure). Do we need to override some virtual functions in the tree grid and modify its behavior somehow? Would you tell more details about how to repeat the problem?
|
|
Rado Manzela
|
Apr 7, 2007 - 7:48 AM
|
It seems I’ve sent reply to my original message not your answer so I’m sending again:
Thank for checking this. I wanted to try your project and modofy it but it seems you’ve used newer verision of prof-uis: ChildView.cpp(1147) : error C2065: ’ItemSortChildren’ : undeclared identifier I’m looking forward row sorting in tree grid ;)
After many trials I’ve found the problem - it is __EGBS_FIXED_SIZE_ROWS flag. Try to set it for your grid.
|
|
Technical Support
|
Apr 7, 2007 - 1:36 PM
|
We would like to ask you to download the latest source code (we emailed you the ftp info) and check the problem again.
|
|
Rado Manzela
|
Apr 10, 2007 - 4:23 AM
|
|
|
Technical Support
|
Apr 11, 2007 - 10:08 AM
|
We have not received your email again. It seems it is filtered out somewhere. Would you send it to our gmail address or provide the code via some ftp?
|
|
Rado Manzela
|
Apr 12, 2007 - 2:41 AM
|
it is strange my message was not added into forum so I’m trying again:
Ok you can download modified sample here: http://rrrado.szm.sk/test_tree_grid_idea2.zip I’ve added flag __EGBS_FIXED_SIZE_ROWS and there is bug also with new library. There is also compiled debug version for case that it would work different in your compiler (I have VS6.0).
|
|
Technical Support
|
Apr 13, 2007 - 12:25 PM
|
We fixed this. Thank you for reporting this bug. You can download the updated version from our ftp server.
|
|
Michael Valentine
|
Apr 4, 2007 - 8:11 AM
|
How do I handle when a CExtGridCellButton is clicked from within a CEXTPropertyGridCtrl? For all the other types of grid cell I am overriding the Apply(CExtGridCell* pValue) function and handling the change here. However, this does not seem to be called when I use a CExtGridCellButton. The only example I could find was in the sample ProfUIS_Controls::PageGrid.cpp, but this does not handle the button press. For the time being I am overriding CExtPropertyGridCtrl::OnGbwAnalyzeCellMouseClickEvent function and checking the type of cell that is clicked on. Surely there is a better way than this?
Thanks
|
|
Technical Support
|
Apr 4, 2007 - 12:06 PM
|
|
|
Fransiscus Herry
|
Apr 3, 2007 - 8:00 PM
|
Dear Prof-UIS,
I am developing an application that has some similarity with "3d max" interface, I created a docking bar (using CExtCotrolBar). And inside this docking bar i put a tab page container (from CExtTabPageContainerWhidbeyWnd) to hold two page containers (from CExtPageContainerWnd) and 1 dialog (from CExtResizeabledialog).
The problem is when i switch the tab from 1 page containers to other page container it produced flicker, but when i switch the tab from a page container to dialog, it just run smoothly without annoyed flicker. Can you give me some solution to solve the flicker problem when i switch the tab between two page container inside a tab page container?
The second thing is, how can i have a scrolling function for a dialog inside a tab page container?
regards,
|
|
Fransiscus Herry
|
Apr 5, 2007 - 5:35 AM
|
Dear Prof-UIS, Thank you for your advice. my program works fine now. Thank you for your full support.
|
|
Fransiscus Herry
|
Apr 4, 2007 - 11:26 AM
|
just additional information, the flicker happens badly when the docking bar is located on the left side (which is the dark side) when i apply RUNTIME_CLASS(CExtPaintManagerStudio2005). hope this information can give you an insight as to how fixing the problem. Moreover, i just need to know if i use lots of icon on the child dialog it can contribute to more flicker when the tab page is switched?
regards,
|
|
Technical Support
|
Apr 4, 2007 - 1:31 PM
|
The resizable dialog in Prof-UIS is designed to be absolutely flicker free regardless of the controls inside it.
|
|
Fransiscus Herry
|
Apr 4, 2007 - 11:15 AM
|
Dear Prof-UIS,
I have sent the attached project to your support e-mail. I am hoping you could give me an idea how to solve it. thank you for your helping.
|
|
Technical Support
|
Apr 4, 2007 - 1:34 PM
|
We replied via email. Please note WS_CLIPCHILDREN|WS_CLIPSIBLINGS should always be applied if want to get flicker-free windows.
|
|
Fransiscus Herry
|
Apr 3, 2007 - 8:01 PM
|
an additional note, i have also applied the clip children and clip sibling to all child dialog in may application. thank you.
|
|
Technical Support
|
Apr 4, 2007 - 8:29 AM
|
Would you create a simple test project (with Whidbey tabs and page containers inside) reproducing the problem with flickering? For example, you can quickly do this by modifying our TabPages sample.
There is a project that demonstrates how to create a scrollable container for a resizable dialog. The resizable dialog in this sample becomes scrollable if it is less than its initial size. If it is greater than that size, then dialog’s anchoring mechanism is used to position its child controls.
|