Subject |
Author |
Date |
|
Wilhelm Falkner
|
Aug 29, 2006 - 11:10 AM
|
Hi, I have a MDI-Application with some CExtControlBar. Inside these I use CExtResizableDialog classes. I have to know, when such dialog is activated. I tried OnActivate(...), but this message is never fired. What have I done wrong? Is there another message??
TIA Willi
|
|
Suhai Gyorgy
|
Aug 30, 2006 - 2:17 AM
|
When overriding OnActivate, did you have the ON_WM_ACTIVATE() line in your dialog’s Message Map? That’s the only thing I can think of why it wouldn’t work (you have to have that line to catch the message in OnActivate).
Or maybe you can try catching WM_SETFOCUS with OnSetFocus method. But it’s just a guess really. This time you need the have ON_WM_SETFOCUS in the message map.
|
|
Wilhelm Falkner
|
Aug 30, 2006 - 2:30 AM
|
I have in my message map both ON_WM_ACTIVATE() and ON_WM_ACTIVATEAPP(), but the message is never fired. And: also in Spy++ I do not see this message. In another Modal CDialog I get the message. I tried to get the message in CExtControlBar, no success. I would need this message, it is replacing an old CTabControl messages TCN_SELCHANGE and TCN_SELCHANGING.
|
|
Technical Support
|
Aug 31, 2006 - 9:31 AM
|
The WM_ACTIVATE standard Windows message is used only with popup windows and has little to do with your task. The WM_ACTIVATEAPP standard Windows message allows you to catch the event when some app is activated. It is not what you need. You should translate the WM_SETFOCUS and WM_KILLFOCUS standard Windows messages in the PreTranslateMessage() virtual method of your main frame window and analyze if the focused window is inside the particular dialog using the ::IsChild() Win32 API.
|
|
Wilhelm Falkner
|
Aug 31, 2006 - 11:13 AM
|
Sounds easy, but neither in MainFrame, nor in the ChildFrame I get the message WM_SETFOCUS. PreTranslateMessage is set up Ok, because I got lot of other messages, but never WM_SETFOCUS. What can be wrong? TIA Willi
|
|
Technical Support
|
Sep 3, 2006 - 11:42 AM
|
We are sorry for giving you the wrong advice. Please create a CExtControlBar -derived class and override the CExtControlBar::OnUpdateCmdUI() virtual method in it: void CYourControlBar::OnUpdateCmdUI( CFrameWnd * pTarget, BOOL bDisableIfNoHandler )
{
bool bControlBarWasActive = IsBarWindowActive();
CExtControlBar::OnUpdateCmdUI( pTarget, bDisableIfNoHandler );
bool bControlBarIsNowActive = IsBarWindowActive();
if( bControlBarWasActive != bControlBarIsNowActive )
{
. . .
}
}
|
|
Wilhelm Falkner
|
Sep 4, 2006 - 4:43 AM
|
Works perfect! Lot of thanks for your work and fast reply Willi
|
|
Wilhelm Falkner
|
Sep 3, 2006 - 7:40 AM
|
Another question, but in same area: The CExtControlBar are grouped into TabbedContainer. How can I activate each by programm? TIA Willi
|
|
Technical Support
|
Sep 3, 2006 - 1:27 PM
|
You should invoke the control bar’s activation command in the main frame window to activate the bar in any state: CFrameWnd * pMainFrame = . . .
CExtControlBar * pBar = . . .
pMainFrame->SendMessage( WM_COMMAND, WPARAM( pBar->GetDlgCtrlID() ) );
|
|
Wilhelm Falkner
|
Sep 4, 2006 - 4:52 AM
|
Seems that I miss some code. The bars do not switch. I send the message to the mainframe, also to the childframe, but no reaction. What have I done wrong? Do I need some messagehandler? Another question: I use SetWindowText to write some text to the titlebar of the bar. Works good. But also the text in the TabbedContainer is modified, and there I would need an static text. How can I manage, the the titlebar is updated, but not the tabs? TIA Willi
|
|
Technical Support
|
Sep 4, 2006 - 11:59 AM
|
We guess you forgot to add the following main frame’s message map entries for each of your control bars: ON_COMMAND_EX( ID_SOME_CONTROL_BAR, OnBarCheck )
ON_UPDATE_COMMAND_UI( ID_SOME_CONTROL_BAR, OnUpdateControlBarMenu ) The command should be sent to the main frame window only. You can control all the text strings related to the control bar. You should use your own CExtControlBar -derived class and override the CExtControlBar::OnGetBarCaptionText() virtual method. This method is declared as follows: virtual void OnGetBarCaptionText(
e_bar_caption_text_t eBCT,
CExtSafeString & strCaptionText
) const; The e_bar_caption_text_t enumeration is declared locally in scope of the CExtControlBar class: enum e_bar_caption_text_t
{
__EBCT_SINGLE_CAPTION_DOCKED = 0,
__EBCT_SINGLE_CAPTION_FLOATING = 1,
#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
__EBCT_TAB_GROUP_CAPTION_DOCKED = 2,
__EBCT_TAB_GROUP_CAPTION_FLOATING = 3,
__EBCT_TAB_ITEM_CAPTION = 4,
__EBCT_AUTOHIDE_ITEM_CAPTION = 5,
__EBCT_AUTOHIDE_SLIDER_CAPTION = 6,
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
#if (!defined __EXT_MFC_NO_DYNAMIC_BAR_SITE)
__EBCT_DOCUMENT_CONTAINER_CAPTION = 7
#endif // (!defined __EXT_MFC_NO_DYNAMIC_BAR_SITE)
}; So, you can display different strings in the control bar caption in the docked state ( __EBCT_SINGLE_CAPTION_DOCKED ), control bar caption in the floating state ( __EBCT_SINGLE_CAPTION_FLOATING ), tabbed group caption in the docked state __EBCT_TAB_GROUP_CAPTION_DOCKED ), tabbed group caption in the floating state ( __EBCT_TAB_GROUP_CAPTION_FLOATING ), tab item text ( __EBCT_TAB_ITEM_CAPTION ), auto hide area tab item text ( __EBCT_AUTOHIDE_ITEM_CAPTION ), auto hide slider window caption displayed from the auto hide tabs ( __EBCT_AUTOHIDE_SLIDER_CAPTION ) and, for of dynamic control bars, caption in the document mode ( __EBCT_DOCUMENT_CONTAINER_CAPTION ).
|
|
Wilhelm Falkner
|
Sep 4, 2006 - 12:53 PM
|
Question with CaptureText now works very good, thanks for your help! I think, I have explaind wrong, what I mean with "activate Bar". The code you suggested, switch teh bar On and Off. What I would need is, bring it to top window, make it the active window. I try to explain in other word: when using a CTabControl I would use the function SetCurSel(...). TIA Willi
|
|
Suhai Gyorgy
|
Sep 5, 2006 - 2:54 AM
|
Seems like it’s CExtControlBar::DoFrameBarCheckCmd method what you need. Many Samples show usage of this, let’s just take BitmapEditor for instance.
After adding message map entries mentioned above, override default OnBarCheck and OnUpdateControlBarMenu: void CMainFrame::OnUpdateControlBarMenu(CCmdUI* pCmdUI)
{
// CFrameWnd::OnUpdateControlBarMenu( pCmdUI );
CExtControlBar::DoFrameBarCheckUpdate(
this,
pCmdUI,
false
);
}
BOOL CMainFrame::OnBarCheck(UINT nID)
{
// return CFrameWnd::OnBarCheck( nID );
return
CExtControlBar::DoFrameBarCheckCmd(
this,
nID,
false
);
}
Help says the following about the last parameter of DoFrameCheckCmd: "Check mark mode (for resizable control bars only). If this mode is set to true, the show/hide command turns on or turns off visibility of the resizable bar. If false, the method shows the invisible bar wherever it is and sets focus on it." Same goes for last parameter of DoFrameBarCheckUpdate. So if you override those methods like shown above, it’ll work as required.
|
|
Wilhelm Falkner
|
Sep 5, 2006 - 4:07 AM
|
Overwriting the functions will not help, because than I|m not able to switch On/Off. But calling DoFrameBarCheckCmd direct solve the problem. Thanks Willi
|
|
Phil Davis
|
Aug 25, 2006 - 6:26 PM
|
I have a CExtTreeGridWnd tree of an arbitrary number of nodes and children with potential grandchildren. Portions of the tree may or may not be visible and portions may or may not be expanded. All of the cells are of type CExtGridCellString.
At this point in the code there is no knowledge of the size or shape of the tree.
The only information is a pointer to the root node obtained by calling ItemGetRoot();
Please could you give me some code which will walk every node in the tree returning a pointer so the text in the cell may be modified.
Thanks
|
|
Technical Support
|
Aug 26, 2006 - 7:18 AM
|
If the tree layout and depth is unknown, you can traverse all the tree items using the following recursive function:<pre>voidvoid WaCExtTreeGridWnddWnwndTreeTree, HTREEIhTreeItemParentrent = NULL ) { ASSERT_VALIDwndTreeTree) ); hTreeItemParentrent == NULL ) { hTreeItemParentrenwndTree.ItemGetRootRoot(); ASSEhTreeItemParentrent != NULL ); } LnChildItemIndexndnChildItemCountounwndTree.ItemGetChildCountouhTreeItemParentrent ); fnChildItemIndexndex =nChildItemIndexndenChildItemCountounChildItemIndexndex ++ ) { HTREEIhTreeItemChildhilwndTree.ItemGetChildAtldhTreeItemParentrenChildItemIndexndex ); ASSEhTreeItemChildhild != NULL ); LnColNoolNo = . . . CExtGridCellCelpCellCelwndTree.ItemGetCellCehTreeItemChildhinColNoolNo, 0, RUNTIME_CLACExtGridCellStringring ) ); ASSERT_VALpCellCell ); pCellCeTextSettSet( . . . ); WawndTreeTrhTreeItemChildhild ); } pre/pre>
|
|
Phil Davis
|
Aug 26, 2006 - 7:44 AM
|
Thank you for the response, but could you please post that code fragment again as it appears to have not been encapsulated in the [pre>[/pre> formating and is illegible.
Thanks
|
|
Technical Support
|
Aug 26, 2006 - 7:51 AM
|
We are sorry fo this typo. Here is the well-formatted code: void Walk( CExtTreeGridWnd & wndTree, HTREEITEM hTreeItemParent = NULL )
{
ASSERT_VALID( (&wndTree) );
if( hTreeItemParent == NULL )
{
hTreeItemParent = wndTree.ItemGetRoot();
ASSERT( hTreeItemParent != NULL );
}
LONG nChildItemIndex, nChildItemCount = wndTree.ItemGetChildCount( hTreeItemParent );
for( nChildItemIndex = 0; nChildItemIndex < nChildItemCount; nChildItemIndex ++ )
{
HTREEITEM hTreeItemChild = wndTree.ItemGetChildAt( hTreeItemParent, nChildItemIndex );
ASSERT( hTreeItemChild != NULL );
LONG nColNo = . . .
CExtGridCell * pCell = wndTree.ItemGetCell( hTreeItemChild, nColNo, 0, RUNTIME_CLASS( CExtGridCellString ) );
ASSERT_VALID( pCell );
pCell->TextSet( . . . );
Walk( wndTree, hTreeItemChild );
}
}
|
|
Sachin Gupta
|
Aug 25, 2006 - 3:00 PM
|
Hi, The size of my simple MFC application is 60KB. If I use ProfUIS as a dll <<ProfUIS254m.dll>>, the executable size remains at 60KB.
I want to statically link with ProfUIS lib <<ProfUIS254ym.lib>> [size=13.5MB]. For this I added the flag __STATPROFUIS_WITH_DLLMFC__ to the Preprocessor Definitions field in the C/C++ and Resources categories. With this the size of my application increased to almost 1.5MB [from the earlier 60KB]. This is a huge difference.
We are only using the CExtMenuControlBar and CExtToolControlBar classes of Prof-UIS, and not using any other feature.
I have also checked that the #defines __EXT_MFC_NO_GRIDBASEWND, __EXT_MFC_NO_GRIDWND, __EXT_MFC_NO_CUSTOMIZE are already commented in our licensed product.
Is there a way to further reduce the size of the lib <<ProfUIS254ym.lib>> so that the application size also reduces??
Please help.
Thanks, Sachin
|
|
Technical Support
|
Aug 26, 2006 - 7:16 AM
|
The most valuable thing in Prof-UIS 2.54 which affects the generated EXE/DLL size when using Prof-UIS statically is the collection of bitmaps in resources related to the Office 2007 themes (the total size is 1,703,482 bytes). If you do not want to use Office 2007 themes, just comment the BITMAP resource lines in the ..\Prof-UIS\Include\Resources\Res2007\Res2007.rc file. But in our opinion the EXE size is not really critical because it is not a large module which is loaded long but rather it is a module which contains many resources.
|
|
Sachin Gupta
|
Aug 26, 2006 - 8:20 AM
|
Yes you are right that EXE size should not matter. But in our applicaion we also have some OLE components and we want to reduce theor size also. I will try this option of removing Office2007 bitmaps and see if that helps.
Is there any other thing which needs to be done to reduce size of dll/exe?
|
|
Technical Support
|
Aug 27, 2006 - 9:36 AM
|
Another approach to decreasing the size is to exclude some code parts from the Prof-UIS library by uncommenting the //#define __EXT_MFC_NO_*** lines in the Prof-UIS.h file (see this FAQ for more details).
|
|
Suhai Gyorgy
|
Aug 29, 2006 - 6:29 AM
|
Dear Support!
Please, revise your above mentioned FAQ. Last sentence in it is: "For instance, if you do not need the grid control and your application is not customizable, just comment the lines below:"
It should be: "..., just uncomment the lines below:"
Thank you.
Best regards: Chris
|
|
Technical Support
|
Aug 29, 2006 - 8:02 AM
|
Thank you for reporting the issue. We updated the FAQ both on the site and in the documentation.
|
|
Sachin Gupta
|
Aug 28, 2006 - 7:49 AM
|
Hi,
As mentioned in my first post, all the __EXT_MFC_NO_* defines are already commented in the licensed version. My initial question was is there anything other than this also?
We really want to decrease the size of exe / dll when using Prof-UIS as a static lib.
Please help.
Thanks, Sachin
|
|
Suhai Gyorgy
|
Aug 29, 2006 - 1:48 AM
|
In your first post you only mention 3 of the many defines that can be commented or uncommented. These 3 defines were only examples in that FAQ mentioned above in this thread. Try reading that FAQ again more carefully. In your case you need to uncomment all the defines that correspond to parts of the Prof-UIS library you don’t need.
For example: Your Prof-UIS.h needs to be changed like this ( that’s only an example, you need to do the same with many other lines in that file):
You have now: //#define __EXT_MFC_NO_GRIDBASEWND
You should have : #define __EXT_MFC_NO_GRIDBASEWND
So it is now commented, but you need to uncomment it (and many other lines). As its name suggests, if you have this line uncommented (so that your compiler will compile that line as well), you will have NO GridBaseWnd. If you leave the line commented (so that the compiler ignores the line), that means the corresponding Classes (in this case GridBaseWnd) will be compiled into your application as well.
I hope my english is good enough to explain the situation clearly.
|
|
Technical Support
|
Aug 28, 2006 - 10:55 AM
|
The MSO.DLL file in Office 2007 beta has a size of aproximatelly 20 MB. So Prof-UIS actually has some space to grow.
|
|
Offer Har
|
Aug 25, 2006 - 2:30 PM
|
Hi,
I have a property grid with a CExtGridCellUpDown cell I create. I would like the etxt top be aligned to the left, so i call on the cell this line: pValue->ModifyStyle(__EGCS_TA_HORZ_LEFT); The text moves to the center... tried all other values, none of them moves the number to the left side.
Please rectify.
Regards,
Offer
|
|
Technical Support
|
Aug 26, 2006 - 7:06 AM
|
You can change the alignment in two steps. First, remove any applied by default styles: pGridCellUpDown->ModifyStyle( 0, __EGCS_TA_HORZ_MASK ); Second, apply the desired alignment: pGridCellUpDown->ModifyStyle( __EGCS_TA_HORZ_LEFT );
|
|
Offer Har
|
Aug 26, 2006 - 8:08 AM
|
|
|
Eric Houvenaghel
|
Aug 25, 2006 - 2:25 PM
|
Is there a way to tell the CExtReportGridWnd to update itself? For example, imagine I drag and drop several columns into the grouping area. Then, I add a new row to the grid. The row will be added at the bottom and the grouping structure won’t be applied to this new row. Now, if I click on one of the columns in the grouping area, the grid applies the grouping structure to the new row. Any ideas?
Thanks.
|
|
Technical Support
|
Aug 26, 2006 - 7:03 AM
|
The report grid does not update its tree layout automatically when sorting/grouping is applied and you added a new row. The reason is that adding several rows would greatly reduced the overall performance if the layout was updated after adding each row. So, to update the layout manually, just invoke the CExtReportGridWnd::ReportSortOrderUpdate() method.
|
|
Eric Houvenaghel
|
Aug 25, 2006 - 11:28 AM
|
When using CExtGridCellCheckBox with the __EGCS_READ_ONLY style, the cells checkbox is greyed out. Basically, is it posible to have a read only cell checkbox without them being greyed out? The only way I can think of is to block the click events on a non read only cell checkbox. Iām hoping for an easier way. If there is not can you point me in the right direction.
Thank you.
|
|
Technical Support
|
Aug 26, 2006 - 6:51 AM
|
You should create and use a CExtGridCellCheckBox -derived class and implement the CExtGridCell::OnPaintCheck() virtual method in it. Copy and paste the body of the original method except for the following lines at the beginning: bool bReadOnly =
( (dwCellStyle&__EGCS_READ_ONLY) != 0 )
? true : false; Replace these lines with: bool bReadOnly = false
|
|
Eric Houvenaghel
|
Aug 28, 2006 - 1:15 PM
|
Thanks, that works great! I’m guessing that most "specialized" functionalities should be solved in this manner? i.e. Via overriding virtual functions? I actually have several others functionalities to implement. I’ll let you know if I get stuck.
Thanks again.
|
|
Technical Support
|
Aug 29, 2006 - 10:12 AM
|
Yes, you are right. There are many virtual methods in the CExtGridCell cell class which you can override to achieve any custom behavior. These methods are marked as Overridables in the documentation.
|
|
Sachin Gupta
|
Aug 25, 2006 - 9:30 AM
|
Hi Tech Support,
We are contacting you for the problem of Activex integration in our projects.Please notice that We had been in discussion with you for quite a long period of time through your GENERAL FORUM through the login name of "Sanket".As we had some logistics issue in procuring the PROFUIS license and had been trial version users,so we had to communicate with you through the general forum . The thread ---" Using Prof-UIS to implement Toolbar in an ActiveX Control " in your general forum was created by us and please go through the entire trail of information that we exchanged.
We want you to look into this issue with utmost priority, because we have to meet our delivery deadlines very urgently.
We had sent you an email to you at support@prof-uis.com with the screen shots of the problem from the id: Debabrata_Mukherjee@G1.com ::Even though we have the same implementation of code both in non-activex and activex projects, we are not getting any desired output in the activex project.
Please find below a details of what has been followed:
The standalone SARS and SARS with the parent non-activex (when we drag drop report to the app) are working fine. What we have done for these cases we have followed all the steps here also in SARSX which is the ActiveX project for Activex report.
Here we have derived our toolbar from CSaRsXToolbar which is derived from CSaRsToolbarStd which is a child of CExtToolControlBar (Main Prof-UIS toolbar class). The same class CSaRsToolbarStd is being used in SARS. In CSaRsXToolbar::Create we are creating the toolbar and loading the toolbar as well. In the CSaRsXFrame which is the mainframe class of sarsx we have a member object of CSaRsXToolbar type. In the OnCreate method of CSaRsXFrame we are actually creating the toolbar by calling m_wndToolBar.Create(this), here m_wndToolBar is a member of CSaRsXFrame class of type CSaRsXToolbar. This is the present implementation. And we have made all our changes on top of that.
We have changed the code for CSaRsXToolbar::Create to see the effecta˦
Previously the code wasa˦
if (!CSaRsToolbarStd::Create(NULL,this,IDR_SARSX_TOOLBAR) || !CSaRsToolbarStd::LoadToolBar(IDR_SARSX_TOOLBAR))
return FALSE;
We made it as followsa˦
1. if (!CSaRsToolbarStd::Create(NULL,this,IDR_SARSX_TOOLBAR) || !CSaRsToolbarStd::LoadToolBar(IDR_SARSX_TOOLBAR))
return FALSE;
2. if (!CSaRsToolbarStd::Create(NULL,this,AFX_IDW_TOOLBAR) || !LoadToolBar(IDR_SARSX_TOOLBAR))
return FALSE;
But now also it was not coming properlya˦In the second case I used AFX_IDW_TOOLBAR like we used in Mainfrm.cpp of SARS.
We removed the derived class implementation of CSaRsXToolbar:;Create and used the CSaRsToolbarStd::Create from the CSaRsXFrame::OnCreate method. It is also not working.
In addition to that we are using IE version 6.0 .Does the IE version matter as we are creating a ProfUIS look toolbar in our application only.
I want to highlight again that as we have already discussed in your general forum, so please look into the thread for details.
We are expecting a quick response from you .You can send us emails also. Regards.
|
|
Sachin Gupta
|
Aug 28, 2006 - 8:28 AM
|
Hi,
Thanks for your response.
We can do a webex to demonstrate the problem and you can also debug the problem remotely. Please suggest a good time. We would prefer early morning EST time for this.
Thanks, Sachin
|
|
Technical Support
|
Aug 27, 2006 - 10:10 AM
|
We cannot help you resolve these ActiveX issues because of lack of information about your app. We can see two possible options that should help us resolve the issues faster: 1) you send us a test (compilable) project that shows the problem. 2) we can connect to your desktop (e.g using Webex) and debug the problem remotely.
|
|
Sachin Gupta
|
Aug 28, 2006 - 8:29 AM
|
Hi,
Thanks for your response.
We can do a webex to demonstrate the problem and you can also debug the problem remotely. Please suggest a good time. We would prefer early morning EST time for this.
Thanks, Sachin
|
|
Technical Support
|
Aug 28, 2006 - 11:09 AM
|
This time is perfect but we already set up another meeting for tomorrow. Please contact us via e-mail (at support@prof-uis.com) so we can arrange the details.
|
|
Wilhelm Falkner
|
Aug 25, 2006 - 5:51 AM
|
Hello, is it possiblem to insert CFrameWnd inside of CExtControlBar? Do you have some sample code?
TIA Willi
|
|
Wilhelm Falkner
|
Aug 25, 2006 - 6:11 AM
|
P.S. It is an SDI Application
|
|
Technical Support
|
Aug 25, 2006 - 7:09 AM
|
Unfortunately we have no such a ready-to-use sample, but it is not difficult to create a CFrameWnd window as a child of any other window and use dockable bars in the child frame. You should use the CWnd::Create() method for creating the child frame and specify the WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS standard window style, the window class should be registered with the CS_DBLCLICKS|CS_HREDRAW|CS_VREDRAW standard window class styles and NULL background brush. You should use a dynamic instance of the frame window created with the C++ new operator and do not delete this instance because the CFrameWnd::PostNcDestroy() virtual method invokes the delete this code. You can create a startup project with the required configuration, create the frame window as a child of a control bar window and send this project to us if you encounter any difficulties.
|
|
Arild Fiskum
|
Aug 24, 2006 - 3:44 AM
|
Hi, I have several problems with dual screen bugs. All examples with persistent mainframe have the following problem: Start app, move to second screen, close app. Start app again (it opens in screen 2), klikk maximize, and app disapears! If I move it to screen 1 and then clicks mximize, it maximizes onto screen 2. The nView command for "Move to screen 1" and "Move to screen 2" does not work with profui apps, nothing happens.
Arild
|
|
Technical Support
|
Aug 24, 2006 - 8:05 AM
|
We failed to reproduce this bug with the SDI sample. Please let us know more details about the versions of Windows, nView and Prof-UIS you are using.
|
|
Arild Fiskum
|
Aug 24, 2006 - 8:23 AM
|
WinXP SP2, Prof-UIS 2.54. nView 91.31. SDI has the same bugs here. Its important that it is started again non maximized on screen 2, if its starts on screen 1 and is moved to screen 2 before maximize, it works ok.
|
|
Technical Support
|
Aug 25, 2006 - 5:49 AM
|
Please give us a few days so we can reproduce the problem on nView 91.31.
|
|
Offer Har
|
Aug 23, 2006 - 8:04 PM
|
Dead support,
I have a dialog bar (derived from CExtResizableDialog) inside that dialog there is a static control derived class. This class programmatically loads a ’sub’-dialog into that static contol (the dialog loading is changes according to user inputs) The sub-dialog is also derived from CExtResizableDialog.
The dialogs contains controls that are not ProfUIS derived controls (3rd party controls and legacy controls).
The controls are not displayed correctly: 1) Their frame is not displayed. 2) When the dialog loses focus all controls disappear.
I am setting clip child & clip children the true in all dialog. I tried to make the static control transparent - no help.
Please note that without clipping all looks fine, but the dialog flickers like hell...
What can i do to fix this problem?
Regards,
Offer.
|
|
Technical Support
|
Aug 24, 2006 - 7:57 AM
|
lease let us know more details about the problem: 1) Whether the problem occurs in the child dialog only? 2) How is the child dialog created? Whether its parent window is the top dialog or the static control in the top-dialog? In the latter case whether the static control has the WS_CLIPCHILDREN|WS_CLIPSIBLINGS standard window styles? 3) It would be helpful to take a look at the part of .rc file with the dialog template resources for both dialogs and C++ classes corresponding to these dialogs.
|
|
Offer Har
|
Aug 25, 2006 - 8:25 AM
|
1) Yes - in the child-dialog only.
2) The parent is a dialog that is created inside a CExtControlBar. a stati constil does not have the WS_CLIPCHILDREN|WS_CLIPSIBLINGS - these are only dialog styles. Anyhow, i tried to add them to the statis using ModifyStyle in the OnInitDialog of the containing dialog - no change.
3) I will send you the RC by mail.
|
|
Technical Support
|
Aug 27, 2006 - 10:02 AM
|
The dialog template resource is correct. Please also send us the source code for the container dialog class. We need to see how the child dialog window is created with regard to the IDC_STATIC_SHAPE container window
|
|
Offer Har
|
Aug 27, 2006 - 5:03 PM
|
Dear Support,
I found out the problem - The child dialog was set with Transparent flag. When i removed that flag things look much better...
|
|
John Kiernan
|
Aug 23, 2006 - 3:59 PM
|
Hi, I have a strange problem I can’t seem to fix. I’m using Prof-UIS 2.54 and have a CExtTabPageContainerWnd that contains three (3) RichEdit controls that are used for messages from different parts of the main app.
At first, when text was written to tabs that were not the selected (visible) tab they would paint over the currently selected tab... Clicking on the tab that the data belonged to made the tabs redraw and look proper. I added a delayed update like the following:
bool CanDoUpdate(void)
{
int TabIdx = GetTabIndex(); // index of the current controls tab
int CurTab = m_TabCtrl->PageSelectionGet();
if (CurTab != TabIdx)
return false;
return true
}
if( CanDoUpdate() )
{
Invalidate();
UpdateWindow();
}
else
{
// Defer update until later
SetTimer(....)
}
This works EXCEPT when the application is hidden by another window. After the application gets focus again the currently selected tab contains text that was written to a non-visible tab.
Kind of confusing I know, I hope you can follow what I said.
Do you know what is going on? Do you have any suggestions on how to prevent this?
|
|
Technical Support
|
Aug 24, 2006 - 7:52 AM
|
Please make sure you create the tab page container window and all the rich edit controls with the WS_CLIPCHILDREN|WS_CLIPSIBLINGS standard window styles.
|
|
John Kiernan
|
Aug 24, 2006 - 10:11 AM
|
*sigh* Ok, I knew I was suppost to have those styles... I’m not sure why I didn’t do it though :( I hate obvious problems. Thanks for you help!!!
|
|
John Kiernan
|
Aug 24, 2006 - 3:55 PM
|
Hmm... This did fix the problem of redrawing when regaining focus.. But it seems that I still have another problem.
I have three tabs #1, #2, #3.... Each has richedit control and text is being written to all of them. I have tab #1 selected (visible) and everything looks fine. However, if I click on tab #3, I see data that _should_ be in tab #2. If I then click on #2 (data is right there) and then back to #3, the data in #3 is now correct.
I’m very confused now.
|
|
Technical Support
|
Aug 25, 2006 - 5:45 AM
|
Would you send us (at support@prof-uis.com) a project that shows the problem or the source code which creates and manages the tab page container and its child windows so we can help you faster and more effectively?
|
|
John Kiernan
|
Sep 13, 2006 - 1:54 PM
|
I just send a project that kind of demonstrates the problem.
|
|
John Kiernan
|
Aug 28, 2006 - 8:06 AM
|
I will see if I can create a project that reproduces the problem. I’m now on vacation so it will take a week or so. :)
|
|
jb lee
|
Aug 22, 2006 - 4:02 AM
|
Can I change the toolbar content with another toolbar resource dynamically?
I tried the code(below), It looks like working well(sometimes, the icons are not shown).
void CToolbartestView::OnButton1() { CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
pFrame->m_wndToolBar.LoadToolBar(IDR_TOOLBAR1); if(pFrame->m_wndToolBar .IsVisible() ){ pFrame->m_wndToolBar.GetParentFrame()->RecalcLayout(); pFrame->m_wndToolBar.Invalidate(); pFrame->m_wndToolBar.UpdateWindow(); } }
|
|
Technical Support
|
Aug 22, 2006 - 6:51 AM
|
The icons will be displayed OK if your toolbars have their own unique command identifiers for all their buttons. The alternative approach is to update your command manager from all the toolbar resources and invoke the CExtToolControlBar::SetButtons() and CExtToolControlBar::InitContentExpandButton() methods instead of the CExtToolControlBar::LoadToolBar() method. This will work faster.
|
|
jb lee
|
Oct 6, 2006 - 9:07 AM
|
Would you help me? It’s very urgent.
This code doesn’t refresh the toolbar. The changed icons are drawn when I resize the toolbar by dragging the boundary.
|
|
Technical Support
|
Oct 9, 2006 - 8:51 AM
|
Would you send us your test project which demonstrates the problem so we can figure out what is wrong?
|
|
Offer Har
|
Aug 21, 2006 - 11:09 PM
|
Dear Support,
I have a grid property grid control. I need according to user selection in another place to enable or disable an item or a full category. How do i do this operation?
Best Regards,
Offer
|
|
Technical Support
|
Aug 22, 2006 - 6:31 AM
|
The property grid control is based on a tree like data structure that contains property items: the CExtPropertyStore property store object (which is the root), CExtPropertyValue property values and CExtPropertyCategory property categories. All property items are derived from the CExtPropertyItem generic property item class. By default, all the property values and categories are enabled. You can emulate the disabled(grayed) state of the property values as it is demonstrated in the PropertyGrid sample (see the Window | Handle property value). You should simply set the __EGCS_READ_ONLY grid cell style for active/default grid cells of the property value: CExtPropertyStore * pPS = . . .
CExtPropertyGridCtrl * pPGC = . . . // get it somehow from pPS
CExtPropertyItem * pPropertyItem = . . .
CExtPropertyValue * pPropertyValue = DYNAMIC_DOWNCAST( CExtPropertyValue, pPropertyItem );
if( pPropertyValue == NULL )
return . . .
pPropertyValue->ValueDefaultGetRef.ModifyStyle( __EGCS_READ_ONLY );
pPropertyValue->ValueActiveGetRef.ModifyStyle( __EGCS_READ_ONLY ); Please note grid cells stored in the tree grid windows inside the property grid controls are exact copies of the active grid cells stored inside CExtPropertyValue objects in the property store’s tree. So finally do not forget to synchronize the property grid control’s content: pPGC->PropertyStoreSynchronize();
|
|
Offer Har
|
Aug 23, 2006 - 8:32 AM
|
Dear Support.
This solution works for items inside a category. When i try to call this on a category (CExtPropertyCategory) it crashes in ValueDefaultGetRef and in ValueActiveGetRef (the function ValueActiveGet() returns NULL).
I need also to disable a full category (or hide it, whatever is possible).
Regards,
Offer
|
|
Technical Support
|
Aug 24, 2006 - 7:51 AM
|
The disabled state of property values is emulated by the read-only state of the grid cells representing property values. Property categories do not contain grid cells, this is why it is not possible to make them looking disabled using the above described approach. We would recommend you switch to hidden property values and categories instead of disabled because this solution is more user friendly: you can only work with available properties. If this suits you, please use a CExtPropertyValue -derived class instead of CExtPropertyValue and override the CExtPropertyItem::CanBeInsertedIntoPropertyGrid() virtual method. This method should return false if the property value is supposed not to appear in the property grid although it exists inside the property store’s tree. If all property values inside some property category cannot be inserted into the property grid control, then the category also cannot be inserted into it.
|
|
Offer Har
|
Aug 25, 2006 - 7:29 AM
|
This sounds like a good idea. My only concert is weather CanBeInsertedIntoPropertyGrid is call when i call PropertyStoreSynchronize or only when the property is first inserted into the categor/store. I need to dynamically according to user selection elsewhere to change the content of the grid.
Thanks,
Offer
|
|
Technical Support
|
Aug 25, 2006 - 7:42 AM
|
The CExtPropertyItem::CanBeInsertedIntoPropertyGrid() virtual method is invoked both when assigning a new property store to the property grid control or synchronizing an existing one. You should not have any problems with this approach.
|
|
Offer Har
|
Aug 25, 2006 - 8:54 AM
|
|
|
Eddie Judson
|
Aug 21, 2006 - 9:39 PM
|
Support, Is there currentlya way to replace a CExtRibbonNode with a CExtBarColorButton? Regards, Eddie
|
|
Technical Support
|
Aug 22, 2006 - 12:04 PM
|
The latest version of the CExtRibbonBar class is derived from CExtCustomizeSite. This means the ribbon bar works like a small customizable application and all built-in toolbar menu items including text/combo fields and color picker items are available in it. The updated RibbonBar sample features color picker menus. Please contact us via e-mail so we can tell you how to download the updated source from our ftp site.
|
|
Eric Houvenaghel
|
Aug 18, 2006 - 10:51 AM
|
Hello,
We are using your controls (with a valid license) since 1 month in our VS6 projects. You have said that some MFC controls (CTreeCtrl, CComboBoxEx, CListBox, CListCtrl) will never be replace by a Prof-UIS controls because for you there’s no improvement to do.
What we need, is a CTreeCtrl-derived class that support the checkboxes (like MFC CTreeCtrl does) but with a 2-states/3-states options. VS6 doesn’t support the automatic 3-states. We are using the basic method (with images) to display a 3-states checkbox in a Tree, which is correct but this solution doesn’t reflect the XP look, and in future months we planning to use/make a special skin for our products.
Is the 3-states checkboxes Tree feature is not enough for you to begin to make your Tree? The skin-ability of your controls is also a good reason to provide equivalent controls for "all" MFC controls. Isn’t it?
Best Regards
|
|
Technical Support
|
Aug 18, 2006 - 12:09 PM
|
Thank you for the interesting question. We can offer you to use CExtTreeGridWnd class as a replacement for the tree view common control. You can use any of numerous grid cell classes available in Prof-UIS in it, including CExtGridCellCheckBox , which supports three states. In comparison with the standard tree view, the grid also features multiple columns.
|
|
Toshio Morita
|
Aug 18, 2006 - 10:13 AM
|
Hi, I need a docking panel with its title bar shown vertically at the left side. To do this, I overrid CExtControlBar::IsBarWithGripper(), and there set *pbGripperAtTop = false; *pbTextOnGripper = true. The problem is that the title string disappears when docked to the left/right of the frame window. Is this the correct way to get a vertical title bar? If so, how can I overcome this problem?
|
|
Technical Support
|
Aug 18, 2006 - 11:53 AM
|
You can achieve this by setting the CExtControlBar::m_bGripperStaticallyAtTop property to false.
|
|
Toshio Morita
|
Aug 19, 2006 - 7:28 AM
|
That’s what I was looking for. Thanks!
|
|
Michael Valentine
|
Aug 18, 2006 - 9:53 AM
|
How feasible would it be to modify the property grid so that pressing tab from within a cell moves to the next cell in the grid?
Thanks
|
|
Technical Support
|
Aug 18, 2006 - 11:49 AM
|
We have already implemented this feature. Please download this zip file that contains a new version of the CompoundProperties sample with the TAB-enabled version of the property grid control. Please run it and let us know if this is what you need. You can contact us by email so we can tell you how to download the latest source code.
|
|
YS Jang
|
Aug 18, 2006 - 2:52 AM
|
HI.
I want to change the text of the Static Control that is declared CExtLabel.
I used the SetWindowText() but the text is broken in English OS with MUI(Japanese) this problem only occurs at CExtLabel. Other controls is good.
ex) CExtLabel m_StaticControl;
m_StaticControl.SetWindowText(English text); // Good Work. English OS with MUI(Japanese) m_StaticControl.SetWindowText(Japanese text); // Text is broken. English OS with MUI(Japanese)
|
|
YS Jang
|
Aug 18, 2006 - 3:11 AM
|
The text of all controls in CExtGroupBox is broken
|
|
Suhai Gyorgy
|
Aug 18, 2006 - 7:04 AM
|
Hi!
In our application we call SetWindowText for CExtLabel with Hungarian text on English OS, without any problem.
I have a guess which you might try: Check in project properties whether the "Treat wchar_t as Built-in Type" setting is set to true or false. (In VS7.1 it’s under C++/Language.) For us it works fine only when this setting is set to false (value "No"). Of course the used Prof-UIS lib has to have the same value set (I guess you don’t have to change that in Prof-UIS project properties as value "No" is default.) This might have nothing to do with your problem, but give it a try! :-)
Regards: Chris.
|
|
YS Jang
|
Aug 18, 2006 - 7:29 AM
|
-My Dialog is derived CExtResizableDialog -Property:Clip Children, Clip Siblings = false -Compile OS:Korean(Compile Mode: MBCS) -Test OS:English with MUI -Test Text:Japanese
My problem occurs CExtLabel but If i change to CStatic from CExtLabel, Good work! CExtCheckBox and CExtButton occur the problem
|
|
YS Jang
|
Aug 18, 2006 - 7:48 AM
|
My Dialog have GroupBoxes derived CExtGroupBox(Style:STYLE_CAPTION) Ablsolutly, The problem(text is broken) occur...
then I tried to change the style to STYLE_FLAT from STYLE_CAPTION... Good Work...
What’s wrong?.. How to resolve this problem?
|
|
Suhai Gyorgy
|
Aug 18, 2006 - 8:33 AM
|
I think Clip Children, Clip Siblings properties should be set to true for your dialog’s properties and make sure that GroupBox has higher tab order value than those of the controls on that GroupBox.
|
|
YS Jang
|
Aug 18, 2006 - 9:22 AM
|
Thanks... In my dialog, The tab order of GroupBox is highest and I had tried that the property of dialog adjust
|
|
Technical Support
|
Aug 18, 2006 - 12:22 PM
|
The OS on which the app is compiled has nothing to with the problem. If use any of complex languages like Japanese and want to display strings correctly on any NT OS, just use Unicode and you have no problems with this. If you want to support old Win9X platforms, you should use MBCS and run your application only on OS with target language. We use DrawText() GDI API for painting the text. This API does not display MBCS Japanese strings correctly on non-Japanese OSes or if the default non-Unicode OS language is not Japanese.
|
|
YS Jang
|
Aug 18, 2006 - 9:18 PM
|
My project are consist of a EXE and DLLs. I tried to change from MBCS to Unicode the one Dll with problem (no problem?) A.exe, b.dll and c.dll are compiled to use MBCS and d.dll is compiled to use Unicode character set.
Both Debug and Release are Successfully and I executed My Application..
In Debug Mode, d.ll is created when I click the Button in A.exe But Release Mode, d.dll is not Created.
<Sample code> BOOL CSetup::CreateSetup() { CSetupDlg* pDlg; pDlg = new CSetupDlg(); // In Release Mode, pDlg is NULL if (!pDlg->Create(IDD_.........., this)) { return FALSE; } return TRUE; }
|
|
YS Jang
|
Aug 19, 2006 - 1:34 AM
|
My project are consist of a EXE and DLLs. I tried to change from MBCS to Unicode the one Dll with problem (no problem?) A.exe, b.dll and c.dll are compiled to use MBCS and d.dll is compiled to use Unicode character set.
Both Debug and Release are Successfully and I executed My Application..
In Debug Mode, d.ll is created when I click the Button in A.exe But Release Mode, d.dll is not Created.
<Sample code> BOOL CSetup::CreateSetup() { CSetupDlg* pDlg; pDlg = new CSetupDlg(); if (!pDlg->Create(IDD_.........., this)) { return false; }
CExtResDlg::Create() { g_ResourceManager->FindResourceHandle(); }
CExtResourceManager::FindResourceHandle() { HINSTANCE hInst = ::AfxFindResourceHandle(); //hInst is NULL(ReleaseMode)........In Debug Mode, is not NULL }
|
|
Technical Support
|
Aug 19, 2006 - 8:38 AM
|
If you use MFC and/or Prof-UIS in your EXE and DLLs and these modules are export methods and classes to each other, then you should switch to Unicode in all the projects.
|
|
Eddie Judson
|
Aug 17, 2006 - 11:07 PM
|
Is there a way to force certain nodes in the Ribbonbar to always use the small icon and display small?
|
|
Technical Support
|
Aug 19, 2006 - 7:58 AM
|
The behavior of each button in the ribbon button is controlled by two informativeness levels (info levels for short): effective and visual.
The visual info level determines the appearance of the button and can be one of the following values:
__EXT_RIBBON_ILV_SIMPLE_SMALL (=0) displays a small icon only.
__EXT_RIBBON_ILV_SIMPLE_NORMAL (=1) displays a small icon and text.
__EXT_RIBBON_ILV_SIMPLE_LARGE (=2) displays a large icon and text. The effective info level determines the button’s weight, which specifies when a button changes its visual appearance as the ribbon is resized. You can customize the behavior of the ribbon button programmatically by setting up a map that tells on which effective level the button changes its appearance. The effective levels are graded on a scale of 0 to __EXT_RIBBON_ILE_MAX (which is now 10). So, if you have two buttons and add to the map of the first button the pair
__EXT_RIBBON_ILE_MAX - 5 --- __EXT_RIBBON_ILV_SIMPLE_SMALL and for the second button
__EXT_RIBBON_ILE_MAX - 3 --- __EXT_RIBBON_ILV_SIMPLE_SMALL , then when making the ribbon smaller, the first button will get small first, the second later.
If you specify only one visual info level for the button, it will do not change its look when you resize the ribbon. Here is how the Paste button is initialized in the RibbonBar sample: CExtRibbonNode * pNodePaste =
new CExtRibbonNode( ID_EDIT_PASTE, 0, NULL, 0, _T("Paste") );
pNodePaste->RibbonILE_RuleArrayGet().RemoveAll();
VERIFY( pNodePaste->m_iconBig.m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(ID_EDIT_PASTE_BIG) ) );
pNodePaste->m_iconBig.m_bmpNormal.Make32();
pNodePaste->m_iconBig.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
pRibbonGroup->InsertNode( NULL, pNodePaste ); It will be constantly large because we removed all the default mapping rules using pNodePaste->RibbonILE_RuleArrayGet().RemoveAll() (when the map is empty, the button always has the large size). To make it always small, add this rule entry: pNodePaste->RibbonILE_RuleArrayGet().Add(
__EXT_RIBBON_MAKE_RULE_ARRAY_ENTRY(
__EXT_RIBBON_ILE_MAX,
__EXT_RIBBON_ILV_SIMPLE_SMALL,
false
)
); The __EXT_RIBBON_MAKE_RULE_ARRAY_ENTRY preprocessor function creates a mapping rule which contains the __EXT_RIBBON_ILE_MAX maximum effective info level, the __EXT_RIBBON_ILV_SIMPLE_SMALL small visual info level and a boolean wrap flag which determines whether the ribbon button is the last button it its column or row of buttons.
|
|
Eddie Judson
|
Aug 21, 2006 - 9:34 PM
|
Thanks that worked nicely
|
|
Eric Houvenaghel
|
Aug 17, 2006 - 8:47 AM
|
I’ve got a weird behavior with your CExtMenuControlBar. I have one menu in the main dialog and another one in a modal child-dialog.
The first display of the main dialog menu is correct (menu titles and menu items). Also the display of the child-dialog menu is always correct.
But once i close the child-dialog and move the mouse under the main dialog menu, menu display the titles of the child-dialog menu ; Menu items are still correct. Is it normal? I’m using g_CmdManager->ProfileWndAdd(__PROF_UIS_PROJECT_CMD_PROFILE_NAME, GetSafeHwnd()); twice in the main dialog and in the child-dialog. Am i ok? Or do i need to use CExtMenuControlBar::_UpdateMenuBar() to tell to the main dialog menu to rebuild itself?
What is the problem and what is the better solution? Regards
|
|
Technical Support
|
Aug 17, 2006 - 12:11 PM
|
There is a small restriction when using the CExtMenuControlBar window: there must be one instance of CExtMenuControlBar window in scope of one command manager’s command profile. This means you should have a separate command profile for your dialog with menu bar. This command profile can be initialized in the OnInitDialog() method and destroyed in the OnOK() (or OnCancel() ) method.
|