Subject |
Author |
Date |
|
Riadh Munjy
|
Jun 29, 2006 - 6:45 AM
|
I am using Visual 6.0 . How can I activate and use the Prof-UIS image editor and icon editor?
Thanks
|
|
Technical Support
|
Jun 29, 2006 - 11:07 AM
|
The image editor is represented by the CExtImageEditWnd class. It is used as the base class for the child view window in the BitmapEditor sample. The icon editor dialog is represented by the CExtIconEditDlg class which uses the CExtImageEditWnd window. You can see how it is used in the CMainDlg::OnButtonEdit() method of the IconEditor sample. Please let us know more details about your task so we can provide you with help and advice.
|
|
Raphael Gruaz
|
Jun 29, 2006 - 2:43 AM
|
Hi
I am using CExtGridWnd, but it is impressively slow when dealing with large amount of data. I added 5000 lines, and now it takes almost 1 second to select a row by clicking on it. It is a bit faster to scroll down, but It still take too much time. (I press the scrollbar, move, but have to wait to see the result)
My grid is simple, displays text only, and I don’t have any heavy process running. to make sure my code was not involved, I used a CListCtrl to display my 5000 lines instead of the grid. Everything went fine, the control does not seem to be bothered by this amount of data.
is this issue known, and is there something I can do about it?
regards,
Raph.
ps: You REALLY should change this forum. if we post a message after a search, the post will merely be lost.
|
|
Technical Support
|
Jun 29, 2006 - 7:04 AM
|
We tried to reproduce the problem with 20000 records but failed. Would you create and send us some test project that reproduces the problem? Anyway it is reasonable to use the virtual mode if you deal with large amount of data.
|
|
Eric Houvenaghel
|
Sep 20, 2006 - 3:33 PM
|
Hi, we are having the same problem. Is it possible to use virtual mode for CExtReportGridWnd?
|
|
Technical Support
|
Sep 21, 2006 - 6:04 AM
|
You should use the CExtGridWnd instead. The AdoRecordsetView sample is dedicated to the CExtGridWnd class in virtual and cacheable modes. The solution is based on coding your own CExtGridDataProviderRecordSet -derived class and implementing all the abstract methods.
|
|
Eric Houvenaghel
|
Sep 20, 2006 - 5:44 PM
|
Also ... did you mean that you managed to insert 20000 records without significant loss of speed? If yes could you tell me how? I based my code on the CExtReportGridWnd sample application. Which I guess is not the most effecient way of inserting records. Let me know. Thanks.
|
|
Technical Support
|
Jun 29, 2006 - 7:13 AM
|
As for the forum, we are aware at least of one problem with the forum, which is it is not very convenient to use the search feature (only in the Tree View mode and only by one word or phrase). We successfully posted a test message just after a search so we need more details about this problem. Anyway, we plan to improve this forum or find some other well-know asp.net search engine.
|
|
Christophe Guibert
|
Jun 28, 2006 - 3:32 PM
|
Hello,
I would like to programmatically set the language that is used in the pop up menu in the column header of CExtReportGridWnd (it currently appears in my language (French) whereas I chose English-US resource in the visual C++ project).
Looking at the language switcher sample, I tried something like : g_ResourceManager->SetLangIdDesired(__EXT_MFC_LANG_ID_ENGLISH_US); in the constructor of the CMainFrame, with no result (CExtReportGridWnd menu still appear in French).
The application is statically linked with Prof-UIS library.
Would have an advice ?
Best Regards,
C. Guibert
|
|
Technical Support
|
Jun 29, 2006 - 7:42 AM
|
We may only guess that you forgot to invoke the AllowCustomLang() method. Please check if the code looks like as follows: g_ResourceManager->AllowCustomLang();
g_ResourceManager->SetLangIdDesired( . . . );
|
|
Christophe Guibert
|
Jun 29, 2006 - 3:40 PM
|
Thank you, that was effectively missing.
|
|
John Kiernan
|
Jun 28, 2006 - 1:14 PM
|
Where would I find the source for the RibbonBar example?
Thanks,
John Kiernan
|
|
Technical Support
|
Jun 29, 2006 - 7:32 AM
|
Please contact us by e-mail at support@prof-uis.com so we can tell you how to download the latest source code via ftp.
|
|
LEANDRO GUZMAN
|
Jun 27, 2006 - 4:33 PM
|
Hi there, I have visual c++ 6.0 and i have no problem using prof uis (manual config), but the integration wizard did not detect my visual c++ Thanks!
|
|
Technical Support
|
Jun 28, 2006 - 10:01 AM
|
The Integration Wizard detects Visual C++ 6.0 by checking the following key in the system registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++ The ProductDir string value of this key should exist and point to the valid folder where Visual C++ 6.0 is installed. You can easily integrate Prof-UIS with Visual C++ 6.0 without the wizard: 1) Run Visual C++ 6.0 IDE. 2) Invoke the Tools | Options menu and select the Directories tab. 3) Add the .../Prof-UIS/Include folder to the Include folders list. 4) Add the .../Prof-UIS/Include and .../Prof-UIS/Src folder to the Source folders list. 5) Add the .../Prof-UIS/Bin_600 folder to the Library folders list. 6) Open the .../Prof-UIS/Workspace/ProfUIS_600.dsw workspace and compile the required configurations of the ProfUISDLL and/or ProfUISLIB projects. The LIB and/or DLL files will appear in the .../Prof-UIS/Bin_600 folder and will be available in other projects because we added this folder into the Library folders list. 7) Compile the required configurations of secondary projects if you need them (ProfAuto, ProfSkinLIB, ProfSkinDLL, LibPNG, Zlib). 8) Now you are able to compile the same configurations of your projects and our sample applications. 9) To integrate the Prof-UIS application Wizard into Visual C++ 6.0 you should copy the .../Prof-UIS/Support/ProfUisAppWizard.awx file into the same folder where other .AWX files can be found. Typically into the C:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin/IDE folder. The Prof-UIS Application Wizard become visible in the list of all wizards of Visual C++ 6.0.
|
|
delu qiu
|
Jun 27, 2006 - 9:33 AM
|
Hi,
I remember someone already ask how to apply skin to messagebox and afxMessagebox, but I can’t find it. and is it possible to apply skin to htmlhelp?
Thanks
|
|
Technical Support
|
Jun 28, 2006 - 9:58 AM
|
The message box can be replaced with a custom dialog created in scope of your application. Currently we do not hook any standard windows and do not repaint their parts like this is done in all Microsoft applications.
|
|
Simon DESEE
|
Jun 27, 2006 - 6:18 AM
|
Hello all,
How can I use toolbars on my application with two different size (the user choose the size with options dialog) ?
I created toolbar resources for 16x16 and for 32x32 resources and I call g_CmdManager->UpdateFromToolBar for all toolbars.
But many assertion appears on the starting of the program.
Could you explain me more about how to do this ?
|
|
Technical Support
|
Jun 28, 2006 - 7:28 AM
|
The solution depends on if the buttons in your two toolbar resources have equal resource identifiers. If they do but the images are different, you should update the command manager only from one of them at startup. To change the icons at run time, invoke g_CmdManager->CmdSetIcon( sProfileName, nCmdID, (CExtCmdIcon *) NULL, false ) for each command in your toolbar and then update the command manager from one of toolbar resources. This step is essential because the CExtCmdManager::UpdateFromToolBar() method does not replace icon commands. If your two toolbar resources have buttons with absolutely different command identifiers, you should update the command manager from both toolbars at startup and construct the toolbar using the CExtToolControlBar::SetButtons() method (pass an array of command identifiers in it) instead of CExtToolControlBar::LoadToolbar(). The toolbar will contain both small and large buttons. You can apply the TBBS_HIDDEN style for some of them to make only half of buttons visible. In both cases, do not forget to call the pToolBar->GetParentFrame()->RecalcLayout() code when the toolbar has been changed.
|
|
Simon DESEE
|
Jul 1, 2006 - 8:45 AM
|
Ok, with customization activate, how does your library manage the state information file (my application stores state information on a file instead of using registry) ?
Is it a difference between 16x16 and 32x32 toolbars ID on the file ?
Thanks
|
|
Technical Support
|
Jul 3, 2006 - 10:17 AM
|
The StateInFile, SDIDynamicBars and MDIDynamicBars samples demonstrate how control bars can be serialized to a file. Basically the state of any sub system is serialized with the CArchive object. If the archive is file-based, the state will be saved to/restored from a file. The registry serialization is based on a archive connected to a memory file. The contents of the memory file is saved to / loaded from registry sub trees.
|
|
Simon DESEE
|
Jun 28, 2006 - 3:29 PM
|
My two toolbars have same identifiers.
I adjust my code.
Thanks for your help
|
|
Christophe Guibert
|
Jun 26, 2006 - 4:07 PM
|
Hello,
I have a collection of objects, classicaly display their attribute members in a CGridCtrl (one object per row, one attribute per column), and I also would like to edit cell contents, be notified of the end of edition and store the changes in the correct attribute members of the correct objects that were used to populate the grid cells.
Subclassing CExtGridWnd class and overriding the virtual OnGridCellInputComplete() method gives the coordinates of any changed cell : however, user may have changed the column order or the row sort since the grid was initialized, and we get (wrong) coordinates that depend on the new order/sord of rows/columns that the application is not aware of.
Is there a preferred method to keep the origin of data so that we can easily propagate changes made to the grid into the objects ? For instance, in MFC CListCtrl, there are SetItemData()/GetItemData() methods. Is there a trick with the DataProvider object ? Do you have a sample ? (I guess this question is common, but did not find the answer in the forum, or missed something...).
Thanks in advance for your answer.
C. Guibert
|
|
Technical Support
|
Jun 28, 2006 - 7:28 AM
|
Yes, to override the OnGridCellInputComplete() virtual method is the right way to handle the event when a cell gets changed. You are right that the user may change the column/row position and column/row sort order. So something needs to be done to identify a cell. You can easily done this by assigning some data to column/row headers and to cells. All the cell classes have the LParamSet and LParamGet parameters which allow you to assign some user data. So just use these parameters to mark all the cells and column/row headers.
|
|
Christophe Guibert
|
Jun 28, 2006 - 2:59 PM
|
Hello,
Thank you for the prompt answer and for the tip : this works perfectly.
I have another question about GridCtrl : is it possible to serialize its current state (column widths and order) in order to retrieve it later as you did with the CExtReportGridWnd ?
An alternative for me would be to use the new CExtReportGridWnd : can we edit its cells and assign data (lParam) to its column headers ? Column/row headers seems to be managed differently and I guess that no data can be assigned to rows, but to inner cells.
Thanks a lot and Best Regards,
C. Guibert
|
|
Technical Support
|
Jun 29, 2006 - 7:40 AM
|
Unfortunately this feature is not supported for CExtGridWnd . But actually it is not difficult to do yourself. As for the second question, of course, you can assign user data to columns and rows. The CExtReportGridColumn class is derived from CExtGridCellHeader and the CExtReportGridItem class has CExtGridCell as one of the base classes. All the cell classes have the LParamSet and LParamGet parameters. This allows you to assign some user data. So just use these parameters to mark all the cells and column/row headers.
|
|
Christophe Guibert
|
Jun 29, 2006 - 3:42 PM
|
Thank you for your answer : I’ll switch to CExtReportGridWnd.
Best Regards,
C. Guibert
|
|
Richard Chaney
|
Jun 26, 2006 - 1:30 PM
|
The CExtControlBar dock windows behave differently to applications such as Visual Studio if docked into a tabbed container, then one of them is closed, then auto-hiding is enabled. The problem is produced like this :
1. Set CExtControlBar::g_bCloseOnlyOneBarInTabGroup = true. 2. Create 2 or 3 CExtControlBar dock windows and dock them into a tab contaniner using CExtControlBar::DockControlBarIntoTabbedContainer(). 3. Close one of the dock windows. 4. Press the auto-hide icon and let the dock window hide itself. Notice the margin now shows the window which was closed in step 3. 5. Put the mouse over the margin and let the dock window pop up. Press the auto-hide icon again to keep the window open. 6. The window which was closed in step 3 is now visible again.
If the same process is applied in Visual Studio the closed window does NOT appear in the margin after auto-hiding is switched on, and it does NOT reappear when auto-hiding is switch off again.
I think Prof-UIS would be better if it followed the same behaviour as Visual Studio. Is this possible with the current version, or could it be changed in future versions?
Richard Chaney
|
|
Technical Support
|
Jun 27, 2006 - 8:19 AM
|
Thank you for your comment. The current version treats control bars in the auto-hidden state differently from control bars in the invisible state. That is why the hidden bar has its tab item in the auto-hide tabs. We added your feature request to our to-do list.
|
|
Eddie Judson
|
Jun 25, 2006 - 6:14 PM
|
Hi, I am trying to replace my CMenu with a CExtMenuControlBar in a CExtResizablePropertySheet but am not having much luck getting it to work. Is this possible? Regards, Eddie
|
|
Technical Support
|
Jun 26, 2006 - 1:16 PM
|
We may suppose that the CExtResizablePropertySheet control cannot show the Prof-UIS menu bar directly. But you can replace the property sheet with a dialog and place the menu and tab control onto it. Anyway you can always send us your project so we can check it.
|
|
Simon DESEE
|
Jun 25, 2006 - 12:25 PM
|
Hello all,
How can I set a range (minimum/maximum date) value for the CExtDateTimeWnd component ?
Thanks
|
|
Technical Support
|
Jun 26, 2006 - 1:14 PM
|
This feature is not supported now. We can only regard you question as a feature request and implement it as soon as possible.
|
|
Simon DESEE
|
Jun 27, 2006 - 6:14 AM
|
|
|
delu qiu
|
Jun 23, 2006 - 2:07 PM
|
Hi,
I want to create a toolbar consist of buttons with multiple size, for example, the left five buttons use 72*48, and right two buttons use 43*32.
Is it possible?
Thanks
|
|
Technical Support
|
Jun 24, 2006 - 12:52 PM
|
Here is how to create a toolbar with buttons of custom size.
1) create two toolbar resources, the first one with 72x48 icons and the second with 43x32 icons; 2) update the command manager from both toolbar resources: g_CmdManager->UpdateFromToolBar( strCommandProfileName, ID_TOOLBAR_WITH_72x48_ICONS );
g_CmdManager->UpdateFromToolBar( strCommandProfileName, ID_TOOLBAR_WITH_43x32_ICONS ); 3) create a toolbar and assign an array of commands with icons of different size: UINT arrCommandIDs[] = { ID_CMD1, ID_CMD2, ID_CMD3, };
pToolBar->Create( . . . )
pToolBar->SetButtons( arrCommandIDs, sizeof(arrCommandIDs)/sizeof(arrCommandIDs[0]) );
pToolBar->InitContentExpandButton(); The CExtToolControlBar::SetButtons() and CExtToolControlBar::InitContentExpandButton() methods are used here instead of the CExtToolControlBar::LoadToolBar() method. Please note, the arrCommandIDs array should contain command identifiers which are used in toolbar resources. As a result, you will get the CExtToolControlBar window buttons centered vertically when the toolbar is docked horizontally or floating. The buttons will be centered horizontally when the toolbar is docked vertically.
|
|
Lynn Reid
|
Jun 22, 2006 - 10:45 PM
|
First, apologies for my simple questions as I am quite new to Prof-UIS. Here’s my basic layout:
A) I have a MDI Doc/View application. The Mainframe has a CExtTabMdiWnd m_wndMdiTabs, which nicely implements showing each open document with a class CPrimaryView. I can click on the tabs and all is well -- I can have, say, 4 open documents displayed in 4 open tabs.
B) I have created a CExtControlBar control bar m_wndBar within my Mainframe in the OnCreate function. I have also derived a class from CFrameWnd, call it CXCFrame. After the m_wndBar is created, I create a CXCFrame and attach it to the control bar ala (plus a bunch of error checking): m_pXCFrame = STATIC_DOWNCAST(CXCFrame, RUNTIME_CLASS(CXCFrame)->CreateObject() ); m_pXCFrame->Create( ::AfxRegisterWndClass(0), _T("FrameTitle"), WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), &m_wndBar, NULL, NULL) )
C) Now WITHIN the frame, I have a splitter window. This splitter window is created in the CXCFrame’s OnCreateClient. I then attach two new views CView1 and CView2 to the splitter window like this: BOOL CXCFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) { BOOL bCreateSplitter = m_wndSplitter.CreateStatic(this,2,1) ; if (!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CView1), CSize(40,40),pContext) || !m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CView2), CSize(0,0),pContext) ) { TRACE0("Couldn’t create views within splitter in XCFrame\n"); return FALSE; }
return bCreateSplitter; }
D) So far, so good. I can draw in the CView1::OnDraw and CView2::OnDraw. But HERE"S MY QUESTION:
Q: How do I attach the current document CDocument to these two views CView1 and CView2 IN ADDITION to CPrimaryView? I want to be able to cycle through all three views with GetNextView(..) for example. And I want CDocument.UpdateAllViews() to affect the views within the control bar splitter window.
Note that I do not have to have, say, 4 open control bars. I only want the currently active document attached to this single control bar/framewnd/splitter.
I suspect I have to do something within the MDIChildWnd::OnMDIActivate, and that something has to do with CDocument->AddView(pCView1)..... Unfortunately, I can’t figure out how to get a pointer to pCView1 within my document! (Kind of a circular problem....) The only thing I can figure out how to get a pointer to is the frame window XCFrame.
Hope this isn’t too confusing; personally I’m a bit lost. Thanks
|
|
Technical Support
|
Jun 23, 2006 - 10:58 AM
|
To attach the view window to the document object, just invoke the CDocument::AddView() method. This is enough to set a valid connection between the document and its view in MFC. To access any window inside the splitter window, you should invoke the following code: CSplitterWnd * pWndSplitter = . . .
int nColNo = . . .
int nRowNo = . . .
int nDlgCtrlID = pWndSplitter->IdFromRowCol( nRowNo, nColNo );
CWnd * pWndInsideTheSplitter = pWndSplitter->GetDlgItem( nDlgCtrlID );
ASSERT_VALID( pWndInsideTheSplitter ); The pWndInsideTheSplitter window is one of your view windows. You can use the STATIC_DOWNCAST() or DYNAMIC_DOWNCAST() macro with the pWndInsideTheSplitter window to access the desired C++ class type.
|
|
Arild Fiskum
|
Jun 22, 2006 - 4:42 PM
|
Hi I would like to have my mdi child views titlebar painted the same way as main frame window. Inheriting from CExtNCW< CMDIChildWnd > gives the right look, but MDI Cascade and Tile commands does not work anymore. Any solution to this problem ?
Thanks.
|
|
Technical Support
|
Jun 23, 2006 - 11:04 AM
|
The standard Windows MDI interface is not compatible with the child frame window which implement a custom caption. We plan to implement our own MDI cascade/tile/arrange icon algorithm in one of the future releases.
|
|
John Kiernan
|
Jun 22, 2006 - 1:01 PM
|
For some reason when I push the "X" on the title bar or the "File->Exit" menu, my application no longer exits. The button associated with IDOK is the only way to close the app.
I’m a little confused since this I think this was working before and I don’t think I added any code that would affect this. I don’t even attempt to handle any close messages. I did add a few more buttons to the main dialog but nothing else. I can’t seem figure out what’s going on.
Thanks.
|
|
Technical Support
|
Jun 23, 2006 - 10:55 AM
|
Please let us know more details about the problem. We guess you have a dialog-based application and only the OK button should close the dialog. But we are not sure if our guess is correct. We need to know exactly how the "X"-button in the caption, File|Exit menu and the OK button somewhere should work and what the problem is. Please also tell us which version of Prof-UIS and which Visual C++ you are using.
|
|
John Kiernan
|
Jun 23, 2006 - 11:32 AM
|
Sorry for the lack of details.... Let me try to explain this a little better. It’s a dialoag based app with a system title bar and menu. (The system title bar has the standard MINIMIZE, MAXIMIZE and CLOSE (X) ) On the menu there is a standard ’Exit’ option that has the windows ID: ID_APP_EXIT
I’ve never had any message handlers for either of these... They just worked. i.e. if you open a dialog box and click the ’X’ on the title bar it closes. and of course I have the "OK" button that is a CExtButton which has the standard ID: IDOK.... The OK button does close the app.
I added another button to the control and now The OK button still closes the app, nothing else does. I really don’t know what I did, as these _were_ working before. I’m not even sure how I could duplicate this problem.
I’m using Prof-UIS 2.54 and VS2005
Thanks for any suggestions.
|
|
Technical Support
|
Jun 24, 2006 - 1:00 PM
|
The event when the dialog window is closed can be intercepted in the CDialog::OnOK() and CDialog::OnCancel() methods. CDialog::OnOK() is invoked when the IDOK button is clicked, the Enter key is pressed and the IDOK button is the default button in the dialog. CDialog::OnCancel() is invoked when the IDCANCEL button is clicked, the "X" button in the caption is clicked or Alt+F4 or ESC keys are pressed. If both of these methods in your dialog window do not invoke the parent class methods, then you will really be unable to close the dialog. You can send us the source code of your dialog class so we can check it.
|
|
David Skok
|
Jun 22, 2006 - 12:40 PM
|
I am using a CExtGridWnd to edit and display data. Data in the grid can be changed outside of my program through ethernet or serial and I need to update the display. If data is sorted using the grid control how can i find the new location of a cell knowing the original row/column that it was located in. Note that no new rows or columns are added, just the data changes. I have been using an STL Set with the cells as keys (with extra data) but I came across the CExtGridDataSortOrder and don’t understand how it works.
Thanks
|
|
Technical Support
|
Jun 23, 2006 - 10:50 AM
|
Thank you for the interesting question. The sorting of the grid rows/columns is implemented wiht a data provider component, which controls all cell objects and their locations in the two dimensional grid’s space. When a new sort order is applied for rows/columns or existing sort order is updated, the data provider invokes the CExtGridWnd::OnDataProviderSwapSeries() virtual method to notify the grid window about each row/column swapping event. The grid window uses this method to modify selection regions during sorting. This method allows you to watch row movements during sorting and keep your external references to the data inside the grid window in the correct state. Additionally, the start and end of sorting algorithm can be caught by overriding the CExtGridWnd::OnDataProviderSortEnter() and CExtGridWnd::OnDataProviderSortLeave() virtual methods. You may also need to track the drag-and-drop of rows/columns if this feature is enabled in your grid window. This can be done by overriding of the CExtGridWnd::OnDataProviderSwapDroppedSeries() virtual method.
|
|
Eddie Judson
|
Jun 21, 2006 - 10:23 PM
|
Hi, My program is getting stuck in an infinite loop in the class ExtComboBox::::OnFilterPopupListSyncSelection when there is only one item in the list
It is getting stuck in the loop: // select new item INT nIndex = 0; while( (nIndex = FindStringExact( nIndex, sItemText) ) != CB_ERR ) { if( GetItemData( nIndex ) == dwItemData ) { CEdit * pEdit = GetInnerEditCtrl(); ASSERT( pEdit != NULL ); ASSERT_VALID( pEdit ); if( pEdit != NULL ) pEdit->SetRedraw( FALSE ); SetCurSel( nIndex ); // make text non-selected if( !bSetEditSel ) SetEditSel( -1, -1 ); if( pEdit != NULL ) { pEdit->SetRedraw( TRUE ); pEdit->Invalidate(); pEdit->UpdateWindow(); } break; } }
as GetItemData( nIndex ) == dwItemData is not true and nIndex=0 as there is only one item
Regards, Eddie
|
|
Eddie Judson
|
Jun 21, 2006 - 10:43 PM
|
I don’t know if this is the correct way to fix the problem but I updated the method with the following and rebuilt the library
// select new item INT nIndex = 0; INT nRepCount=0; while( (nIndex = FindStringExact( nIndex, sItemText) ) != CB_ERR ) { if( GetItemData( nIndex ) == dwItemData || (nRepCount>0 && nIndex==0)) { CEdit * pEdit = GetInnerEditCtrl(); ASSERT( pEdit != NULL ); ASSERT_VALID( pEdit ); if( pEdit != NULL ) pEdit->SetRedraw( FALSE ); SetCurSel( nIndex ); // make text non-selected if( !bSetEditSel ) SetEditSel( -1, -1 ); if( pEdit != NULL ) { pEdit->SetRedraw( TRUE ); pEdit->Invalidate(); pEdit->UpdateWindow(); } break; } nRepCount++; }
|
|
Technical Support
|
Jun 22, 2006 - 11:15 AM
|
We failed to reproduce the infinite loop. How do you initialize the combo box? Would you send us the code or a test project?
|
|
Raffaele Cappelli
|
Jun 21, 2006 - 3:17 PM
|
Hello,
is there a reason for using PostMessage(WM_TIMER,__EXTTAB_MDI_UPDATE_TIMER_ID,0); in exttabwnd.h instead of SetTimer(__EXTTAB_MDI_UPDATE_TIMER_ID,__EXTTAB_MDI_UPDATE_TIMER_PERIOD,NULL); ?
I noted that my application slowed down very much due to multiple __EXTTAB_MDI_UPDATE_TIMER_ID being posted and received: if I use SetTimer instead of PostMessage it seems much better, since only one update is received even in case more accumulate.
|
|
Technical Support
|
Jun 22, 2006 - 11:20 AM
|
Thank you for your suggestion. We will see if it is possible and notify you about this.
|
|
Mark Walsen
|
Jun 20, 2006 - 12:03 PM
|
My users are having difficulty docking control bars to the edges of the app’s window. They drag the control bar to the edge of the window where it seems like it should then naturally snap to the window edge, but that doesn’t happen-- the control bar still floats. Of course, the issue here is that the user is not dragging the mouse point to the edge of the app’s window.
The user doesn’t it see it the way the programmer does. The programmer is just hit-detecting the mouse position, waiting until the mouse cursor coordinates hits the window edge. The user’s perspective is different, something like this: When the _middle of the control bar_ hits the window edge, then it should snap. It doesn’t matter where the mouse cursor happens to be. The user is looking at the control bar being dragged, not at the mouse cursor.
Is there an option to have the docking behavior work like these users expect it should?
Cheers -- Mark
|
|
Technical Support
|
Jun 21, 2006 - 5:12 AM
|
All the control bars (toolbars and resizable bars) in Prof-UIS are using approximately the same areas near window edges for detecting target dockable positions like in Microsoft applications. Please let us know which type of control bar is difficult to dock for your users? Is there a similar control bar in Prof-UIS sample applications?
|
|
Mark Walsen
|
Jun 21, 2006 - 3:43 PM
|
I see the same behavior in MS Word 2003 and don’t like the behavior there either. Many users must have the problem I have, and my users are reporting, dragging control bars from one place to another. I think the usability problem is easy to analyze. I suppose MS defines the (sometimes poor) standards, though. Nevertheless, I might customize this part of ProfUIS. It shouldn’t be hard for me to offset the mouse hit detection according to what its location was at the beginning of the drag, relative to the center of the control bar it is moving.
Cheers -- Mark
|
|
Technical Support
|
Jun 22, 2006 - 11:28 AM
|
The ExtControlBar.cpp file contains the CExtControlBar::InternalDraggingState_t::CalcStateDynamic() method with the following internal static variables for controlling drag-and-drop margins of control bars: // reasonable dockbar parts
static const INT nRdpOuter = 16;
static const INT nRdpInner = nRdpOuter*2;
static const INT nRdpMostInner = 12;
// reasonable controlbar part
static const INT nRcpAnyHalfMin = 8; This file also contains the InternalDraggingState_t::_DoFixed_BasicAdjustment() method with the following internal static variables for controlling drag-and-drop margins of toolbars: const int nRdpExtraInnerDx = 12;
const int nRdpExtraInnerDy = 12;
const int nRdpExtraOuterDx = ::MulDiv( nRdpExtraInnerDx, 3, 2 );
const int nRdpExtraOuterDy = ::MulDiv( nRdpExtraInnerDy, 3, 2 ); We can make all these variables global and public. But at least now you can play with these values and let us know your point of view.
|
|
steven frierdich
|
Jun 19, 2006 - 7:08 AM
|
I copied most the code you have in the theme color demo into a SDI project, simple2 , and still the menu, toolbars, and status bar in the simple2 project do not change colors. I see the theme color demo’s mainframe is also derived from CFrameWnd, and is the simple2 project attached in the email is. The simple project works pretty much like the theme color if not identical. Like theme color demo the paint manager is derived from a color theme class. The simple2 project’s m_pPaintManager is derived from the a class titled CColorizedThemeOffice2007 which itself is derived from your CExtPaintManagerOffice2007_R2_Obsidian class: class CColorizedThemeOffice2007 : public CExtPaintManagerOffice2007_R2_Obsidian
Simple2 prohect uses a pop dialog to allow a user to change the menu, tool, bar, and status bar colors by setting thethem. The controls on the pop dialog are identical to the one in the theme color demo that changes the toolbar and menu backgrounds, along with control being the derived also from the same classes. The same functions are called in the dialog as is done in the theme color demo. The functions in the CColorizedThemeOffice2007 are identical to that in the theme color demo’s CColorizedThemeOffice2003. Simple2 project’s CMainFrame class makes static public reference point to itself available so it used when needed in the project. Just like the theme color demo, the Simple2 demo CMainFrame is also derived from CFrameWnd.
No matter what I try the Simple2 project’s toolbars, status bar, and menu background color do not change color. I even hard coded the two variables that change the projects theme color, m_clrFillHint, and m_clrAccentHint, and that did not change the Simple2 project’s toolbars, status bar, and menu background colors. When I harded those wto variable in the theme color project the background colors of the various controls did change.
If anyone would like to take a look at the simple2 project and maybe see where the error lies, or modify it get it to work,drop me an email at sun_Water_snow@hotmail.com
Thanks Steve
|
|
Technical Support
|
Jun 19, 2006 - 11:03 AM
|
The ThemeColorizer sample is based on the Office 2003 theme which paints everything using solid fill and gradient fill techniques. All the colors in the Office 2003 theme are really based on two colors: the accent color and the fill color. That is why it was possible to create the ThemeColorizer sample based on the Office 2003 theme. However the same is not applicable to Office 2007 themes, which are only partially based on the accent and fill colors. The Office 2007 themes widely use bitmaps from resources and hard coded methods for painting many of UI elements. That is why the colorization of the Office 2007 themes is not supported.
|
|
steven frierdich
|
Jun 19, 2006 - 11:21 AM
|
Then I will ask again what I been asking for the last two weeks how exactly do I change the menu, toolbar, and status back backgrounds for the Office 2007 theme? What color variables can I set in the Office 2007 theme to have the menu, toolbar, and statusbar the color I want them? Do not tell me like you did before to overirde DoPaint and some DoPaintNC that is like 250 lines in your DLL? What good is the theme color demo if it just limeted to one theme.
|
|
Technical Support
|
Jun 20, 2006 - 7:03 AM
|
Unfortunately, you cannot just set the background color with some variable. The only way is to override the painting methods like as follows: class CMyToolControlBar : public CExtToolControlBar
{
public:
void DoEraseBk( CDC * pDC )
{
ASSERT( pDC->GetSafeHdc() != NULL );
CRect rcClient;
GetClientRect( &rcClient );
pDC->FillSolidRect( &rcClient, RGB(255,0,0) );
}
};
class CMyMenuControlBar : public CExtMenuControlBar
{
public:
void DoEraseBk( CDC * pDC )
{
ASSERT( pDC->GetSafeHdc() != NULL );
CRect rcClient;
GetClientRect( &rcClient );
pDC->FillSolidRect( &rcClient, RGB(255,0,0) );
}
};
class CMyStatusControlBar : public CExtStatusControlBar
{
public:
void OnPaintEntireBackground(
CDC & dc,
const CRect & rcBk
)
{
ASSERT_VALID( this );
dc.FillSolidRect( &rcBk, RGB(255,0,0) );
}
}; These classes implement a toolbar, a menu bar and a status bar with the red background.
|