Subject |
Author |
Date |
|
Krustys Donuts
|
Apr 30, 2008 - 12:44 PM
|
I have a CTreeGridWnd that is two nodes deep. I would like to sort alphabetically on the root’s child nodes. These child nodes contain
CExtGridCellStringDM
cells. It would be nice to click on the column’s header cell to toggle between ascending and descending. The FilterGrid example shows this in the CGridWnd grid, but not on the CTreeGridWnd grid. Is this possible?
|
|
Krustys Donuts
|
Jan 14, 2009 - 5:17 PM
|
Dear Support, I have implemented my CTreeGridWnd sorting as suggested. It is working fine, with one exception. The character sort is case sensitive. For example, if there are three strings to sort: alpo; Zippo1; and zippo2. I would like the order to be: alpo; Zippo1; and zippo2. As it is implemented now, the sorted order is: Zippo1; alpo; and zippo2. How do I make the sorting case insensitive? Thanks, Gil
|
|
Technical Support
|
Jan 15, 2009 - 2:02 PM
|
By default the cell text comparisons performed by the CExtGridCell::Compare() virtual method implementations in any of grid cell classes are case sensitive. You need to override this method in your grid cell class and perform case sensitive text comparison.
int CYourGridCellClass::Compare(
const CExtGridCell & other,
DWORD dwStyleMask, // = __EGCS_COMPARE_MASK
DWORD dwStyleExMask // = __EGCS_EX_COMPARE_MASK
) const
{
ASSERT_VALID( this );
CExtSafeString sLeft, sRight;
TextGet( sLeft );
pCell->TextGet( sRight );
INT nRet = sLeft.CompareNoCase( sRight );
if( nRet < 0 )
return -1;
if( nRet > 0 )
return +1;
return C_BASE_OF_YourGridCellClass::Compare( other, dwStyleMask, dwStyleExMask );
}
|
|
Technical Support
|
Apr 30, 2008 - 2:31 PM
|
The CExtTreeGridWnd::ItemSortChildren() method sorts children of a specified item. You can sort one level or deeply nested tree levels and this is controlled by the method’s parameters. The plain CExtGridWnd grid control supports sorting on header clicks because there are no questions at all about how to sort plain grid data. The CExtTreeGridWnd tree grid control does not support this feature because it depends on particular task needs. You can override the CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() virtual method to catch any mouse clicks in any grid, invoke the sorting algorithm and apply sort arrow displaying style to the header cells.
|
|
howard liu
|
Apr 30, 2008 - 11:11 AM
|
Hi, The application on which I work has many MFC style flat tool bars. I have modified these flat tool bars to Prof-UI style tool bars. This Prof-UI style tool bar works well except for 1 particular problem. The MFC style flat tool bars in my application has some amount of combo box, drop down boxes within the tool bars. When these tool bars were converted to Prof-UI style tool bars, the combo box and drop down box did not appear on the Prof-UI style tool bars. Could you please provide us the information about the methods that we need to override to enable us to view and function properly these combo boxes and drop down boxes within the tool bars Thanks Howard
|
|
Technical Support
|
Apr 30, 2008 - 2:09 PM
|
In the case of combo box common controls, you should simply use CExtComboBox class instead of MFC’s CComboBox .
|
|
Nigel Channon
|
Apr 30, 2008 - 9:57 AM
|
I like implement my own skin via xml and png images. But I found one unpleasant aspect. When control draw itself with interlacing as source for background control use WindowBackground. But more real be using of vision background controls(for example, GroupBox or etc). How I can check it?
|
|
Technical Support
|
Apr 30, 2008 - 2:27 PM
|
You can use a skinable paint manager from the ProfSkin library (which comes with Prof-UIS) or any paint manager from Prof-UIS. In any case, the background of your window should be painted using the following code: CPaintDC dc( this );
if( (! PmBridge_GetPM()->GetCb2DbTransparentMode(this) )
|| (! PmBridge_GetPM()->PaintDockerBkgnd( true, dc, this ) )
)
{
CRect rcClient;
GetClientRect( &rcClient );
COLORREF clrBackground = g_PaintManager->GetColor( CExtPaintManager::CLR_3DFACE_OUT );
dc.FillSolidRect( &rcClient, clrBackground );
}
// TO-DO: paint content of your window here ...
PmBridge_GetPM()->OnPaintSessionComplete( this ); Of course, you may need a flicker free version. So, the first line of code CPaintDC dc( this ); should be replaced with: CPaintDC dcPaint( this );
CRect rcClient;
GetClientRect( &rcClient );
CExtMemoryDC dc ( &dcPaint, &rcClient ); The code above paints a themed Prof-UIS background of any window. If you need to implement some custom background which is shared between deeply nested parent windows, then you can also use the code above except you should implement a CExtPaintManager::g_nMsgPaintInheritedBackground registered message handler as it is demonstrated in the TabbedBars sample application which is able to draw the hurricane like background in the main frame window and application specific gradient background in the One Note tab page container window with colored tabs created as the main SDI view window.
|
|
howard liu
|
Apr 30, 2008 - 8:24 AM
|
Hi, Our interface has 1 group box with radio buttons and some normal buttons.When we tried to apply Prof-UI style to the group box we encountered a problem, that is Radio buttons and normal buttons disappear after we add a variable to group box through DDX. Is there a solution to this. Thanks Howard
|
|
Technical Support
|
Apr 30, 2008 - 2:15 PM
|
Please check these two things:
1) The z-order of a group box in your dialog template resource should be greater than that of the controls in this group box. You can check this using Ctrl+D in the resource.
2) Your dialog template resource should have both Clip Children and Clip Siblings options set on.
|
|
Sebastian Leopold
|
Apr 30, 2008 - 1:22 PM
|
Sounds like the Taborder is wrong. Just set the tab order of the groupbox to a higher value than the controls inside.
|
|
Ian McIntosh
|
Apr 30, 2008 - 2:55 AM
|
Hi, I have a control inside a dialog which is inside an autohide control bar. What is the best way to catch when the control bar is shown from within my control?
|
|
Technical Support
|
Apr 30, 2008 - 2:17 PM
|
If you want to catch the display event inside the control, then the ideal case is to detect when it needs to be painted. You can also handle the WM_WINDOWPOSCHANGED message in the dialog window which is created inside the control bar. Please provide us with more details about your task if it does not help.
|
|
howard liu
|
Apr 30, 2008 - 2:10 AM
|
Hi, I am using Prof UI to color my MFC based application. What is the procedure to attach an CExtScrollBar to any of the CWnd control Thanks Howard
|
|
Technical Support
|
May 1, 2008 - 1:18 AM
|
This feature is available only in v.2.82 that is coming soon.
|
|
Technical Support
|
Apr 30, 2008 - 2:19 PM
|
The control bars never become attached to some already created HWND window handles. The control bars are always created as children of their parent window (most often it is an MFC frame window), then configured for re-docking etc. Please provide us with more details about your task.
|
|
howard liu
|
Apr 30, 2008 - 2:27 PM
|
Thanks, For MFC CListCtrl how do I replace the default scroll bar by a Prof-UI Scroll bar (CExtScrollBar) Howard
|
|
Sebastian Leopold
|
Apr 29, 2008 - 10:15 PM
|
Hello, I think it is a Bug in Prof-UIS. I have to display MessageBoxes in the OnClose Event from my CMainFrm Class. I use a custom DocumentView Architecture so I have to ask the user in the OnClose Event if he will save unsaved Documents. When I display the MessageBox the Title Bar and the Ribbonbar gets invisible. I use the Beta: 2.83 from 19. April 2008 and Windows Vista 32 Bit. This can Reproduced in the Ribbon SDI sample. Just show a MessageBox in the on Close of the CMainFrm Class. Please tell me how to fix that problem. Regards Sebastian Leopold.
|
|
Technical Support
|
Apr 30, 2008 - 2:24 PM
|
We have done some refactoring to the code that skins the non-client area for the upcoming v.2.83. This problem is solved. You can contact us via email so we can provide you with its beta..
|
|
Rado Manzela
|
Apr 28, 2008 - 10:49 AM
|
I need to display and edit time of day in the grid cell. I’m using CExtGridCellDuration - derived class for this (with days turned off), but how can I turn off combo button for this cell?It displays empty list anyways (what is it good for?). Is there a choice to use increase/decrease buttons for changing of the selected data ? (hour/minute) Thank you.
|
|
Technical Support
|
Apr 28, 2008 - 1:38 PM
|
You can see different date/time and duration grid cells with/without built-in cell buttons on the grid page in the ProfUIS_Controls sample application. There are 3 built-in buttons supported by the generic CExtGridCell class and all cell classes derived from it : up-down, drop-down and ellipsis. They can be displayed/hidden programmatically by adding/removing the __EGCS_BUTTON_UPDOWN , __EGCS_BUTTON_DROPDOWN , and __EGCS_BUTTON_ELLIPSIS grid cell styles by invoking the CExtGridCell::ModifyStyle() method. The mouse wheel can be used for modifying selection in the duration grid cell but the up-down button is part of duration grid cell and can be used outside the in-place editor only. We can regard this as a feature request.
|
|
Thomas Bennett
|
Apr 27, 2008 - 6:05 PM
|
I just purchased and downloaded Prof-UIS 2.82. When I try to build it using VS2008 Unicode Debug build on Windows XP SP2, I receive the following errors. I receive the same errors for ExtScrollWnd.cpp and ExtSplitterWnd.cpp. If I build using VS2005, the problem does not happen. I have VS2005 and VS2008 on the same machine.
I downloaded the package from the Installer link under ’Full Library’.
I noticed these constants were defined as 1 in the module ExtToolControlBar.cpp, so I added the same constants to the other modules and it builds. Why is this happening, what are the correct values for these contants? I would rather use the source code as it is, rather than modify it to make it work???
1>------ Build started: Project: ProfUISDLL, Configuration: Unicode Debug Win32 ------
1>Compiling...
1>ExtPaintManager.cpp
1>..\Src\ExtPaintManager.cpp(21394) : error C2065: ’CX_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21395) : error C2065: ’CY_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21405) : error C2065: ’CX_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21410) : error C2065: ’CY_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21417) : error C2065: ’CX_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21422) : error C2065: ’CY_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21435) : error C2065: ’CX_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21440) : error C2065: ’CY_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21447) : error C2065: ’CX_BORDER’ : undeclared identifier
1>..\Src\ExtPaintManager.cpp(21452) : error C2065: ’CY_BORDER’ : undeclared identifier
1>Build log was saved at "file://c:\Program Files\FOSS Software Inc\Prof-UIS\Bin_900\UnicodeDebug\ProfUISDLL\BuildLog.htm"
1>ProfUISDLL - 10 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
|
Technical Support
|
May 14, 2008 - 6:22 AM
|
This problem is solved in v.2.83 which will be released soon.
|
|
Paul Cowan
|
May 6, 2008 - 1:02 PM
|
The problem occurs when you install the MFC update to VS2008. CX_BORDER and CY_BORDER are no longer defined in the MFC include files. I simply added the following lines to the ExtMfcDef.h file: #undef CX_BORDER
#undef CY_BORDER
#define CX_BORDER 1
#define CY_BORDER 1
|
|
Technical Support
|
May 7, 2008 - 3:39 AM
|
We have Visual Studio 2008 without update and there these constants are present. They are defined in the following file: “.\Microsoft Visual Studio 9.0\VC\atlmfc\src\mfc\afximpl.h". We will install the update and look there. Anyway your fix is applicable. We are going to add some new constants which should replace these.
|
|
Technical Support
|
Apr 28, 2008 - 9:41 AM
|
Thank you for your choice. The CX_BORDER and CY_BORDER constants are defined in MFC and used in old style toolbars. We have all the versions of Visual C++ starting from 6.0 and up to 2008 installed on our development computers (excepting Visual Studio .NET 2002 on x64 machines where it cannot be installed) and we have never come across this problem. We believe it may have something to do with your computer. Did you install any additional software integrated with Visual Studio 2008 on your computer? Some service pack? Could you post the list of Include folders that you can find in the Visual Studio 2008 settings?
|
|
Thomas B
|
Apr 29, 2008 - 3:18 PM
|
Here is the copy info from our Visual Studio 2008 about box: Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5 Installed Edition: Professional Microsoft Visual Basic 2008 91605-140-0037112-60428
Microsoft Visual Basic 2008 Microsoft Visual C# 2008 91605-140-0037112-60428
Microsoft Visual C# 2008 Microsoft Visual C++ 2008 91605-140-0037112-60428
Microsoft Visual C++ 2008 Microsoft Visual Studio 2008 Tools for Office 91605-140-0037112-60428
Microsoft Visual Studio 2008 Tools for Office Microsoft Visual Web Developer 2008 91605-140-0037112-60428
Microsoft Visual Web Developer 2008 Update Rollup for Microsoft Visual Studio 2008 Professional Edition - ENU (KB945273) KB945273
This update rollup is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this update rollup will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/945273. Include files from options dialog: $(VCInstallDir)include $(VCInstallDir)atlmfc\include $(WindowsSdkDir)\include $(FrameworkSDKDir)include C:\Program Files\Automated QA\TestComplete 5 C:\Program Files\FOSS Software Inc\Prof-UIS\Include We are primarily interested in the grid control from your package. As long as the problem does not affect the grid control, we are OK with it. It would be nice to be able to cleanly compile it, without having to modify the source. It may have something to do with the new MFC 2008 feature pack we installed. This is what is listed last in the copy info information. Thanks.
|
|
Offer Har
|
Apr 26, 2008 - 10:37 AM
|
I have a menu items I creete at run time. I setup my application to display tooltip for menu items:
CExtPopupMenuWnd::g_eTtsClassicMenu = CExtPopupMenuTipWnd::__ETS_INV_RECTANGLE;
This works fine for menus from resource file. However, when I create the menu item at runtime in the CExtPopupBaseWnd::g_nMsgPrepareOneMenuLevel event handler, like this:
pPopup->ItemInsertCommand(ID_COMMAND100, -1, "AAA\nBBB"); it does not display the tooltip (I was expecting to see BBB as a tooltip). I debugged it a little, and it seems that the tooltip is loaded using the command manager, which looks for the menu command string in the string table, which it obviously cannot find for my run-time created commands. Can you please verify this problem and supply some kind of method to set tip to run-time created commands? If there is already a way to add tooltip to run-time commands, please explain how. Thanks.
|
|
Technical Support
|
Apr 28, 2008 - 10:42 AM
|
You should assign custom tooltips to your command items that inserted dynamically. Here are the methods that should be used: CExtPopupMenuWnd::MENUITEMDATA::GetCustomTip() and CExtPopupMenuWnd::MENUITEMDATA::SetCustomTip() . The CExtPopupMenuWnd::ItemGetInfo() method returns a reference to the CExtPopupMenuWnd::MENUITEMDATA object which describes the inserted menu item.
|
|
Daisy Peterson
|
Apr 25, 2008 - 10:15 PM
|
So we are in the process of updating our application to now use the Prof-UIS toolbars and docking windows. We have toolbars and docking windows from a previous library we used, but have decided to change. This previous library would, as yours does, save and load the state of toolbars if so desired. I am in trying to load this old information in, set the data as appropriate in the new toolbars, and get things to at least closely approximate the locations where they were saved. No customization is in place, this is strictly which toolbars are showing and where. I get the data out of the old system’s file, and place all relevant information into a CControlBarInfo structure. I update locations and rectangle sizes as needed to accomodate the new toolbar sizes with the current theme that is being used. I utilize SetBarInfo to pass the information to the individual toolbars. However, if I don’t also call CFrameWnd::DockControlBar with an appropriate rectangle, toolbars will always appear on their own rows. Basically this equates to the following steps: - Find out from the old file which dockbar we are dealing with. The old file will tell me the IDs of the bars docked to this side.
- Find the bar info of the bars docked to this side that are visible.
- Adjust the m_pointPos and m_rectMRUDockPos as needed to accomodate new height and width of Prof-UIS version of toolbar.
- Call CControlBar::SetBarInfo, passing in the new information.
- Call CFrameWnd::DockControlBar with the appropriate dock bar ID and m_rectMRUDockPos (updated to screen coordinates).
The first set of data i load works beautifully. Any subsequent loads, even loading the same information twice, results in the bars not going where they should. If, for example, all bars are docked to the top, upon first load they are neatly placed next to one another. Upon the second load of the saved data, their X coordinate is correct, but each bar is on its own row.
[.....][.....] <-- First load of saved toolbar data and first use of the above sequence.
[.....]
[.....] <-- Second load of same data, second time through the above sequence.
Am I leaving something out? Is there something extra I need to do? If I debug through the sequence, the same coordinates are calculated every time through with the same data load...
Kevin Murray AGI
|
|
Technical Support
|
Apr 29, 2008 - 5:50 AM
|
Thank you for the interesting question. The control bar state in MFC is controlled by an array of CControlBarInfo objects. In Prof-UIS we follow a very similar approach. But Prof-UIS toolbars also support affixment coefficients called affixment weights and affixment shift values. The affixment parameters allow one toolbar to shift the position of another toolbar after drag-n-drop based redocking. So, the binary data format of serialized state of toolbars is not compatible between MFC and Prof-UIS. We suppose other libraries still does not provide this feature with persistence.
We think you can use more simplified state restoring. Here is the order of toolbars in the horizontal direction (which is used by top and bottom dock bars inside the main frame window): [1][2][3][4][5]
[6][7][8][9] And here is the order for vertical dock bars on left/right: [1][6]
[2][7]
[3][8]
[4][9]
[5] We suppose the real order of bars can contain any count of rows/columns, any bars can be hidden, any row/column contain any count of bars, and, finally, any row/column contain all its bars in hidden state. Here is how the bars are ordered in the CDockBar::m_arrBars array and serialization sequence order. If you are able to load the array of bar identifiers and their screen rectangles in the order described above, then you can dock them using the CFrameWnd::DockControlBar() method by specifying the desired screen rectangle and invoking the CFrameWnd::RecalcLayout() method after docking each bar.
|
|
JM Kwon
|
Apr 25, 2008 - 5:21 PM
|
|
|
Simon DESEE
|
Apr 25, 2008 - 9:13 AM
|
Dear support, Can we have a date for next release ? Also, can we have a roadmap schedule to know when new versions will be released and which bugs are corrected ? Thanks !
|
|
Ulrich Heinicke
|
May 2, 2008 - 4:53 AM
|
Hi, i’m very interesting into shell common controls. Could you send me a beta version of that for testing ? Thanks, Ulrich
|
|
Technical Support
|
May 2, 2008 - 10:59 AM
|
The shell support code is not inside Prof-UIS right now. It’s separated into several test/development projects which are in a damaged state. They are compile-able and we can send them to you, but we cannot guarantee the class and method names will be even similar in the final version.
|
|
Technical Support
|
Apr 26, 2008 - 1:42 AM
|
The delay with releasing v.2.83 is only caused by that we are testing it right now. Th enew features include skinned windows (including MDI child frames), skinned grids, joined cells (see SynchronizedGrids) and frozen columns/rows, skinned scroll bars everywhere including the ability to embed into any scrollable window not based on Prof-UIS classes, Vista like date browser with zooming and scrolling and more. The next release (after v.2.83) should introduce fully skinned ribbons and the other controls that are not yet skinned, new skinned and shell common controls (a list and a tree). These features are mostly finished but are not included into v.2.83.
|
|
Nigel Channon
|
Apr 25, 2008 - 8:53 AM
|
I like change Aqua XML Skin. Please provide me description about Tp, Lp, Rp, Bp, Ctp, Clp, Crp, Cbp. I use ProfUIS 2.83 Beta.
|
|
Technical Support
|
Apr 26, 2008 - 1:34 AM
|
Ctp/Cbp/Clp/Crp is a top/bottom/left/right padding of UI item’s content. Tp/Bp/Lp/Rp is a top/bottom/left/right padding of bitmap for painting algorithm. The Black Diamond skin uses equal content and bitmap padding values. The Aqua skin uses different in some cases. The DrawMethod attribute defines bitmap painting algorithm: - "Hollow" - do not draw anything (similar to absent skin item). - "Stretch" - stretch bitmap both horizontally and vertically. - "Center" - center bitmap (Tp/Bp/Lp/Rp are ignored in this case). - "TileH" - tile bitmap horizontally and stretch vertically. - "TileV" - tile bitmap vertically and stretch horizontally. - "Tile" - tile bitmap both horizontally and vertically.
|
|
tera t
|
Apr 25, 2008 - 3:05 AM
|
|
|
Technical Support
|
Apr 26, 2008 - 1:50 AM
|
The link you provided leads to a page with "File not found" .
We guess you are using the OnPaint() message handler in your dialog class. If so, the CClientDC class should be used instead of CPaintDC , because the themed background is painted before the OnPaint() handler is called:
void CMainDlg::OnPaint()
{
CClientDC dc(this);
dc.LineTo( 100, 100 );
}
|
|
tera t
|
Apr 27, 2008 - 10:15 PM
|
|
|
Technical Support
|
Apr 28, 2008 - 10:11 AM
|
Using the memory DC in the WM_PAINT message handle allows you to implement flicker free window painting. But you should also prevent painting by the WM_ERASEBKGND message. You should implement an empty message handler for the WM_ERASEBKGND message or a register window class with a NULL brush.
|
|
Offer Har
|
Apr 24, 2008 - 2:58 PM
|
Is it possible to add a tooltip item to a menu item, so that when the user hovers on a menu item the popup will appear?
|
|
Technical Support
|
Apr 26, 2008 - 1:44 AM
|
The CExtPopupMenuWnd::g_nMsgItemCoveringNotification registered message allows you to track menu events. It’s sent both by menus for menu items and by toolbars for toolbar buttons. The HelpNotes sample handles it in the CMainFrame::OnItemCoveringNotification() and displays a rich edit control as a popup.
|
|
David Skok
|
Apr 24, 2008 - 8:51 AM
|
When I include a drop down or elipsis button in cells in a ReportGridWnd and set the extent for the item such that the height of the row is much greater than the default, the button grows to the size of the extent and looks ridiculous. How could I keep the vertical dimension of the button the same as it is without the extent changed? Thanks, Dave
|
|
Technical Support
|
Apr 24, 2008 - 1:35 PM
|
You can do that in this way:
1) Override CExtGridCell::OnCalcLayout() . 2) In this overridden method, invoke the parent class’s method and modify the button rectangles computed by default.
|
|
Offer Har
|
Apr 24, 2008 - 7:03 AM
|
When the CExtTabMdiWnd is placed on the right side, there is a small indentation problem on the right side as you can see below:
|
|
Technical Support
|
Apr 25, 2008 - 7:46 AM
|
Thank you for reporting the problem. You can fix it by updating CExtPaintManagerOffice2007_Impl::PaintTabNcAreaRect() (in the ../Prof-UIS/Src/ExtPaintManager.cpp file) in this way void CExtPaintManagerOffice2007_Impl::PaintTabNcAreaRect(
CDC & dc,
const RECT & rc,
CObject * pHelperSrc,
LPARAM lParam // = 0L
)
{
ASSERT_VALID( this );
ASSERT( dc.GetSafeHdc() != NULL );
if( IsHighContrast() )
{
CExtPaintManagerXP::PaintTabNcAreaRect( dc, rc, pHelperSrc, lParam );
return;
}
if( pHelperSrc == NULL
|| (! pHelperSrc->IsKindOf( RUNTIME_CLASS( CExtTabWnd ) ) )
|| ((CExtTabWnd*)pHelperSrc)->_IsCustomLayoutTabWnd()
)
{
CExtPaintManager::PaintTabNcAreaRect( dc, rc, pHelperSrc, lParam );
return;
}
dc.FillSolidRect( &rc, GetColor( _2003CLR_GRADIENT_DARK, NULL ) );
}
|
|
Malcolm D
|
Apr 23, 2008 - 6:45 PM
|
I seems that the loading of icons (from HICON) assumes the icon size is even, and hence here is a black line at the bottom and/or right edges if the size of the icons width or hieght is not even. In the following function the following code change fix it for me, since the value of _sizeIcon.cx and .cy are always made even. I’m not sure if they are any other places which have this issue bool CExtBitmap::AssignFromHICON
//if( _sizeIcon.cx == 0 || _sizeIcon.cy == 0 ) (old line)
if( _bmpInfo.bmWidth > 0 && _bmpInfo.bmHeight > 0 ) // (new line)
{
_sizeIcon.cx = (INT)_bmpInfo.bmWidth;
_sizeIcon.cy = (INT)_bmpInfo.bmHeight;
}
|
|
Technical Support
|
Apr 24, 2008 - 1:41 PM
|
Thank you for reporting this very interesting issue. We are partially agree with your fix because one more condition is needed: if( _bmpInfo.bmWidth > 0 && _bmpInfo.bmHeight > 0 && _bmpInfo.bmBitsPixel > 1 ) The monochrome icons and cursors are special and the conditions above are friendly to them. This issue can be verified with the IconEditor sample.
|
|
Malcolm D
|
Apr 23, 2008 - 6:39 PM
|
Using 2.82 pressing F1 when hovering over a menu item or toolbar bar doens’t bring up the correct page, but if I use the help mode command (not sure or correct name, but it changes your cursor then lets you click on an item) it gets the correct page. This was working when my toolbars were plane MFC ones. Thanks
|
|
Technical Support
|
Apr 24, 2008 - 1:44 PM
|
There are the following static properties in the CExtPopupMenuWnd class: bool CExtPopupMenuWnd::g_bTranslateContextHelpCmd = false;
ACCEL CExtPopupMenuWnd::g_accelContextHelp = { FVIRTKEY, VK_F1, ID_HELP }; By default, the menu item Help is not invoked in Prof-UIS. You should invoke the following line of code to enable it: CExtPopupMenuWnd::g_bTranslateContextHelpCmd = true; The CExtPopupMenuWnd::g_accelContextHelp data structure allows you to use any key combination for invoking help instead of VK_F1 .
|