Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Offer Har
|
Mar 5, 2009 - 5:46 PM
|
Dear Support, We’ve been having sporadic crashes in this function when loading UI states for a long time, and we think that we understand the reason, but we still need your help to realy understand what is happening. This is the location of the crash in the function CExtCmdProfile::SerializeState , lines 1860 onwards:
...
for( ; true; )
{
UINT nCmdId, nUsageTickCount;
ar >> dwTmp;
nCmdId = UINT(dwTmp);
if( nCmdId == 0 )
break;
ar >> dwTmp;
nUsageTickCount = UINT(dwTmp);
CExtCmdItem * pCmdItem = CmdGetPtr(nCmdId);
... What we see is that the function CmdGetPtr returns NULL. We see that this happens when the application was running and the user selected a command from a popup menu, this command, for some reason was saved in the serialized data, and the next time we load the application, it crashes. We updated the function to skip these commands:
if (NULL==pCmdItem)
{
continue;
} And everything seems to run file now. Can you please explain why this happens? Thanks, Ron.
|
|
Technical Support
|
Mar 10, 2009 - 5:41 AM
|
Yes, this NULL checking code is only the not to crash solution. You should check whether the command manager is really updated from all the toolbar and menu resources in your project. Additionally, if you are registering/allocating some of command identifiers manually at run-time, then you should mark these commands as basic commands.
|
|
Technical Support
|
Mar 9, 2009 - 11:42 AM
|
Please ensure you updated the command manager from all the menu and toolbar resources used in your application before loading command states. There is the common error is related to context popup menus based on menu resources: if you forgot to update the command manager from such menu resources, then it’s become updated later during menu initialization. This means command manager state loading and saving operates with different counts of registered commands. We added the NULL checking condition but we also left the NULL assertion.
|
|
Offer Har
|
Mar 9, 2009 - 11:47 AM
|
Dear Support, So I understand that skipping ’forgotten’ menus with the NULL checking will not harm the state loading? (I would like to replace only Prof-UIS DLL for existing customers...) Thanks, Ron.
|
|
John Ritzenthaler
|
Mar 5, 2009 - 5:36 PM
|
I’m sure I’m doing something wrong. I hope you can give me a clue as to what it might be. My appilcation open and closes some windows whose parent is the the desktop window. These windows are destoryed before the main view is destroyed. During the application shutdown I get an ASSERT at this point on the stack: RView.exe!CObject::IsKindOf(const CRuntimeClass * pClass=0x0172010c) Line 45 + 0x8 bytes C++
> RView.exe!CFrameWnd::GetActiveView() Line 1237 + 0x1f bytes C++
RView.exe!CExtControlBar::FindPrintPreviewMode(CFrameWnd * pFrame=0x02e09220) Line 20885 + 0x8 bytes C++
RView.exe!CExtControlBar::IsOleIpObjActive(CFrameWnd * pFrameSearch=0x02e09220) Line 11565 + 0x9 bytes C++
RView.exe!CExtNcFrameImpl::NcFrameImpl_IsSupported() Line 1236 + 0xf bytes C++
RView.exe!CExtNCW<CFrameWnd>::WindowProc(unsigned int message=130, unsigned int wParam=0, long lParam=0) Line 322 + 0x19 bytes C++
RView.exe!AfxCallWndProc(CWnd * pWnd=0x02e09220, HWND__ * hWnd=0x00da0944, unsigned int nMsg=130, unsigned int wParam=0, long lParam=0) Line 240 + 0x1c bytes C++
RView.exe!AfxWndProc(HWND__ * hWnd=0x00da0944, unsigned int nMsg=130, unsigned int wParam=0, long lParam=0) Line 403 C++
user32.dll!75dc1a10()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!75dc1ae8()
user32.dll!75dc1a91()
user32.dll!75dc2d6e()
user32.dll!75da9924()
RView.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=130, unsigned int & wParam=0, long & lParam=0) Line 217 + 0x20 bytes C++
RView.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00da0944, unsigned int nMessage=130, unsigned int wParam=0, long lParam=0) Line 281 + 0x14 bytes C++
user32.dll!75dc1a10()
user32.dll!75dc1ae8()
user32.dll!75dc1a91()
user32.dll!75dc1c03()
user32.dll!75dc2d6e()
user32.dll!75da9924()
RView.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=16, unsigned int & wParam=0, long & lParam=0) Line 217 + 0x20 bytes C++
RView.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00da0944, unsigned int nMessage=16, unsigned int wParam=0, long lParam=0) Line 281 + 0x14 bytes C++
user32.dll!75dc1a10()
user32.dll!75dc1ae8()
user32.dll!75dc1a91()
user32.dll!75dc1c03()
user32.dll!75dc2d6e()
user32.dll!75da9924()
RView.exe!CWnd::DefWindowProcA(unsigned int nMsg=274, unsigned int wParam=61536, long lParam=0) Line 1043 + 0x20 bytes C++
RView.exe!CWnd::Default() Line 274 C++
RView.exe!CWnd::OnSysCommand(unsigned int __formal=61536, unsigned int __formal=61536) Line 470 + 0x11 bytes C++
RView.exe!CFrameWnd::OnSysCommand(unsigned int nID=61536, long lParam=0) Line 1103 C++
RView.exe!CWnd::OnWndMsg(unsigned int message=274, unsigned int wParam=61536, long lParam=0, long * pResult=0x0012e308) Line 2070 C++
RView.exe!CWnd::WindowProc(unsigned int message=274, unsigned int wParam=61536, long lParam=0) Line 1755 + 0x20 bytes C++
RView.exe!CExtNCW<CFrameWnd>::WindowProc(unsigned int message=274, unsigned int wParam=61536, long lParam=0) Line 326 + 0x14 bytes C++
RView.exe!AfxCallWndProc(CWnd * pWnd=0x02e09220, HWND__ * hWnd=0x00da0944, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=0) Line 240 + 0x1c bytes C++
RView.exe!AfxWndProc(HWND__ * hWnd=0x00da0944, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=0) Line 403 C++
user32.dll!75dc1a10()
user32.dll!75dc1ae8()
user32.dll!75dc1a91()
user32.dll!75dc2d6e()
user32.dll!75da9924()
RView.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=274, unsigned int & wParam=61536, long & lParam=0) Line 217 + 0x20 bytes C++
RView.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00da0944, unsigned int nMessage=274, unsigned int wParam=61536, long lParam=0) Line 281 + 0x14 bytes C++
user32.dll!75dc1a10()
user32.dll!75dc1ae8()
user32.dll!75dc1a91()
user32.dll!75dc1c03()
user32.dll!75dc5b49()
user32.dll!75dc3656()
ntdll.dll!76ec0e6e()
user32.dll!75dc2335()
user32.dll!75daf807()
RView.exe!CWnd::SendMessageA(unsigned int message=274, unsigned int wParam=61536, long lParam=0) Line 42 + 0x44 bytes C++
RView.exe!CExtNcFrameImpl::NcFrameImpl_PreWindowProc(long & lResult=0, unsigned int message=514, unsigned int wParam=0, long lParam=-654427) Line 2943 C++
RView.exe!CExtNCW<CFrameWnd>::WindowProc(unsigned int message=514, unsigned int wParam=0, long lParam=-654427) Line 324 + 0x29 bytes C++
RView.exe!AfxCallWndProc(CWnd * pWnd=0x02e09220, HWND__ * hWnd=0x00da0944, unsigned int nMsg=514, unsigned int wParam=0, long lParam=-654427) Line 240 + 0x1c bytes C++
RView.exe!AfxWndProc(HWND__ * hWnd=0x00da0944, unsigned int nMsg=514, unsigned int wParam=0, long lParam=-654427) Line 403 C++
user32.dll!75dc1a10()
user32.dll!75dc1ae8()
user32.dll!75dc1a91()
user32.dll!75dc2d6e()
user32.dll!75da9924()
RView.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=514, unsigned int & wParam=0, long & lParam=-654427) Line 217 + 0x20 bytes C++
RView.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00da0944, unsigned int nMessage=514, unsigned int wParam=0, long lParam=-654427) Line 281 + 0x14 bytes C++
It appears to me that the main window is being destroyed at this point. message 274 is WM_SYSCOMMAND and message 130 is WM_NCDESTROY. The assert if becasue the handle of CFrameWnd::m_pViewActive is 0xfeeefeee. So it appears the view has been destroyed. Any idea what I might be doing (or NOT doing)?
|
|
Technical Support
|
Mar 9, 2009 - 11:41 AM
|
The active view is the term related to MFC’s document view architecture rather than to to the windowing system displayed on the desktop of the Windows OS. We suspect you created some views manually and some of them become marked as active. You can invoke frame’s CFrameWnd::SetActiveView(NULL) method at shutdown. You can set breakpoint inside this method and try to find out which views become active in your application and when.
|
|
John Ritzenthaler
|
Mar 9, 2009 - 1:54 PM
|
Thanks for your help. Your suspicion was incorrect. I only use a single view. It gets set at the start of execution. That’s the only call to SetActiveView(). But your suggestion solved the problem. It tried overriding DestroyWindow() for the view but that never gets called. So I added this to the view desctructor: CFrameWnd* pFrame = (CFrameWnd*)AfxGetMainWnd(); if (pFrame->GetActiveView() == this)
pFrame->SetActiveView(0, FALSE);
That fixed it. The MFC framework should probably be doing this but isn’t. I can only wondow why no one else has run into this. Again, thanks.
|
|
Technical Support
|
Mar 10, 2009 - 5:43 AM
|
MFC does correct disconnection of the references to active view window but only in the case of document/view architecture.
|
|
Offer Har
|
Mar 4, 2009 - 7:04 PM
|
Dear Support, I have items that do not fit in the width of the drop list. How can I make the drop list inherit the width of the cell? Thanks, Ron.
|
|
Technical Support
|
Mar 5, 2009 - 8:00 AM
|
You should implement the CExtGridCell::OnPopupListBoxMeasureTrackSize() virtual method. Or, we can provide you with the latest Prof-UIS 2.85 which does the popup list box size computation using sizes of all its items.
|
|
Offer Har
|
Mar 5, 2009 - 11:14 AM
|
When is 2.85 estimation delivery date? Do you have any list of fixes and new feature for this version?
|
|
Offer Har
|
Mar 4, 2009 - 6:48 PM
|
Dear Support, I have s requirement to be able to change the font size, which will change all font sizes in all my application. Does Prof-UIS support such a thing? Thanks, Ron.
|
|
Technical Support
|
Mar 9, 2009 - 10:37 AM
|
Dialogs are loaded from dialog template resources. If you have two or more localized versions of some dialog, their dialog templates contain different localized window texts of dialog controls. As a result, the text length can be very different in each localization and affect to size and position of dialog controls. That is why dialogs and form views should be re-created if you need on-the-fly language changing.
|
|
Offer Har
|
Mar 9, 2009 - 10:49 AM
|
Thanks for the explanation. 1) Do you have a sample of how this is done? 2) What will happen with the Prof-UIS grids? Will they inherit the font size of the dialog, or do I need to set this one manually? 3) What will happen with all other controls like CExtLabel, CExtEdit? do they all derive from the font defined in the dialog template, or are there any exceptions? Ron.
|
|
Technical Support
|
Mar 10, 2009 - 8:16 AM
|
We do not have such sample. But this task is not difficult. Just destroy dialogs using the CWnd::DestroyWindow() method or ::DestroyWindow() Win32 API and create the again. The grid controls does not use the parent window font. They always use font provided by the CExtScrollItemWnd::OnSiwGetDefaultFont() method. If the dialog window assigns its font to the child grid window, then you will see dialog font in this grid. If not, then the grid window will use the paint managerās font which is typically the same as the default font for dialogs. The common controls dropped into dialog template resource will use the dialog font.
|
|
Technical Support
|
Mar 5, 2009 - 7:59 AM
|
The FunnyBars sample application does this on the fly.
|
|
Offer Har
|
Mar 5, 2009 - 11:20 AM
|
This sample changes menus, tooltips, but does not change dialogs - how do I change them as well? Also - I need to change the font of dialog titles,including the application title itself. Thanks, Ron.
|
|
Offer Har
|
Mar 4, 2009 - 6:47 PM
|
Dear Support, I have a tag container in a control-bar or a view, that contain several dialog derived from CExtResizableDialog. When the user resize the window so that it’s smaller then the dialog initial size, I need to have a scroll-bar so that thew user will be able to scrol to th bottom part of the dialog. How can this be done? Thanks, Ron.
|
|
Technical Support
|
Mar 5, 2009 - 7:59 AM
|
|
|
Offer Har
|
Mar 5, 2009 - 11:13 AM
|
Dear Support, The sample does not compile with 2.84, can you please check why? These are the errors I get: 1>------ Build started: Project: TestScrollDialog, Configuration: Debug Win32 ------
1>Compiling...
1>StdAfx.cpp
1> WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
1> Automatically linking with Prof-UIS library: ProfUIS284md.lib
1> (Professional User Interface Suite)
1>Compiling...
1>ChildView.cpp
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.h(15) : error C2011: ’CExtScrollContainerWnd’ : ’class’ type redefinition
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(17) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(17) : error C2059: syntax error : ’)’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(19) : error C2448: ’m_sizeToScroll’ : function-style initializer appears to be a function definition
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(22) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(22) : error C2059: syntax error : ’)’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(23) : error C2143: syntax error : missing ’;’ before ’{’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(23) : error C2447: ’{’ : missing function header (old-style formal list?)
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(27) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(27) : error C2270: ’GetMessageMap’ : modifiers not allowed on nonmember functions
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(27) : error C3861: ’GetThisMessageMap’: identifier not found
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(27) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(27) : error C2365: ’GetThisMessageMap’ : redefinition; previous definition was ’formerly unknown identifier’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(29) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(29) : error C2065: ’OnCreate’ : undeclared identifier
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(31) : error C2248: ’CExtScrollWnd::GetThisMessageMap’ : cannot access protected member declared in class ’CExtScrollWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1387) : see declaration of ’CExtScrollWnd::GetThisMessageMap’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1232) : see declaration of ’CExtScrollWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(37) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(39) : error C2352: ’CWnd::PreCreateWindow’ : illegal call of non-static member function
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(2069) : see declaration of ’CWnd::PreCreateWindow’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(56) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(57) : error C2270: ’OnSwGetScrollPaintPos’ : modifiers not allowed on nonmember functions
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(58) : error C2673: ’OnSwGetScrollPaintPos’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(62) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(64) : error C2673: ’OnSwPaint’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(68) : error C2673: ’OnSwPaint’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(73) : error C2660: ’GetClientRect’ : function does not take 1 arguments
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(76) : error C2673: ’OnSwPaint’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(81) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(86) : error C2673: ’OnSwPaintAreaBetweenScrollBarWindows’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(89) : error C2673: ’OnSwPaintAreaBetweenScrollBarWindows’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(93) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(94) : error C2270: ’OnSwGetTotalSize’ : modifiers not allowed on nonmember functions
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(95) : error C2673: ’OnSwGetTotalSize’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(96) : error C2065: ’m_sizeToScroll’ : undeclared identifier
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(99) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(100) : error C2270: ’OnSwGetPageSize’ : modifiers not allowed on nonmember functions
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(101) : error C2673: ’OnSwGetPageSize’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(106) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(107) : error C2270: ’OnSwGetLineSize’ : modifiers not allowed on nonmember functions
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(108) : error C2673: ’OnSwGetLineSize’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(113) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(114) : error C2270: ’GetScrollBarCtrl’ : modifiers not allowed on nonmember functions
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(115) : error C2673: ’GetScrollBarCtrl’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(116) : error C2065: ’m_hWnd’ : undeclared identifier
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(121) : error C2065: ’m_wndScrollBarH’ : undeclared identifier
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(121) : error C2228: left of ’.GetSafeHwnd’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(126) : error C2065: ’m_wndScrollBarV’ : undeclared identifier
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(126) : error C2228: left of ’.GetSafeHwnd’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(132) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(134) : error C2352: ’CWnd::PreSubclassWindow’ : illegal call of non-static member function
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(2013) : see declaration of ’CWnd::PreSubclassWindow’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(137) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(138) : error C2365: ’OnCreate’ : redefinition; previous definition was ’formerly unknown identifier’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(139) : error C2248: ’CWnd::OnCreate’ : cannot access protected member declared in class ’CWnd’
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(2567) : see declaration of ’CWnd::OnCreate’
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(1973) : see declaration of ’CWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(139) : error C2352: ’CWnd::OnCreate’ : illegal call of non-static member function
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(2567) : see declaration of ’CWnd::OnCreate’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(142) : error C2228: left of ’.m_eSO’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(143) : error C2228: left of ’.m_eSO’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(144) : error C2228: left of ’.Create’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(147) : error C2673: ’OnCreate’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(155) : error C2228: left of ’.Create’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(158) : error C2673: ’OnCreate’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(166) : error C2228: left of ’.SyncReservedSpace’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(167) : error C2228: left of ’.SyncReservedSpace’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(168) : error C2065: ’m_wndCorner’ : undeclared identifier
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(168) : error C2228: left of ’.Create’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(172) : error C2673: ’OnCreate’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(180) : error C3861: ’OnSwRecalcLayout’: identifier not found
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(185) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(189) : error C2365: ’OnSwRecalcLayout’ : redefinition; previous definition was ’formerly unknown identifier’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(190) : error C2673: ’OnSwRecalcLayout’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(191) : error C3861: ’GetWndToScroll’: identifier not found
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(192) : error C2228: left of ’.cx’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(192) : error C2228: left of ’.cy’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(204) : error C2228: left of ’.cx’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(204) : error C2228: left of ’.cy’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(206) : error C2352: ’CExtScrollWnd::OnSwRecalcLayout’ : illegal call of non-static member function
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1272) : see declaration of ’CExtScrollWnd::OnSwRecalcLayout’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(208) : error C2228: left of ’.cx’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(209) : error C2228: left of ’.cy’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(215) : error C2228: left of ’.cx’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(215) : error C2228: left of ’.cx’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(216) : error C2228: left of ’.cy’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(216) : error C2228: left of ’.cy’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(218) : error C3861: ’ScrollPos32Get’: identifier not found
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(219) : error C3861: ’ScrollPos32Get’: identifier not found
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(226) : error C2228: left of ’.GetSafeHwnd’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(227) : error C2228: left of ’.GetSafeHwnd’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(228) : error C2228: left of ’.GetSafeHwnd’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(232) : error C2228: left of ’.GetStyle’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(233) : error C2228: left of ’.GetStyle’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(237) : error C2228: left of ’.GetWindowRect’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(238) : error C2228: left of ’.GetWindowRect’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(245) : error C2660: ’ScreenToClient’ : function does not take 1 arguments
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(248) : error C2228: left of ’.SetWindowPos’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(249) : error C2065: ’wndTop’ : undeclared identifier
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(253) : error C2228: left of ’.GetStyle’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(254) : error C2228: left of ’.ShowWindow’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(259) : error C2027: use of undefined type ’CExtScrollContainerWnd’
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(264) : error C2673: ’OnSwDoScrollBy’ : global functions do not have ’this’ pointers
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(265) : error C2352: ’CExtScrollWnd::OnSwDoScrollBy’ : illegal call of non-static member function
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1346) : see declaration of ’CExtScrollWnd::OnSwDoScrollBy’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(266) : error C2228: left of ’.cx’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(267) : error C2228: left of ’.cy’ must have class/struct/union
1> type is ’’unknown-type’’
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(270) : error C3861: ’GetWndToScroll’: identifier not found
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(272) : error C3861: ’OnSwGetClientRect’: identifier not found
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.cpp(272) : fatal error C1003: error count exceeds 100; stopping compilation
1>MainFrm.cpp
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.h(15) : error C2011: ’CExtScrollContainerWnd’ : ’class’ type redefinition
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.h(47) : error C2079: ’CMainFrame::m_wndScrollContainer’ uses undefined class ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.cpp(79) : error C2228: left of ’.GetSafeHwnd’ must have class/struct/union
1> type is ’int’
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.cpp(80) : error C2228: left of ’.SetFocus’ must have class/struct/union
1> type is ’int’
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.cpp(86) : error C2228: left of ’.GetSafeHwnd’ must have class/struct/union
1> type is ’int’
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.cpp(88) : error C2228: left of ’.OnCmdMsg’ must have class/struct/union
1> type is ’int’
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.cpp(159) : error C2228: left of ’.Create’ must have class/struct/union
1> type is ’int’
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.cpp(165) : error C2664: ’BOOL CExtResDlg::Create(__EXT_MFC_SAFE_LPCTSTR,CWnd *)’ : cannot convert parameter 1 from ’’ to ’__EXT_MFC_SAFE_LPCTSTR’
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.cpp(171) : error C2228: left of ’.OnSwRecalcLayout’ must have class/struct/union
1> type is ’int’
1>testdialog.cpp
1>TestScrollDialog.cpp
1>z:\3rdparty\prof-uis\testscrolldialog2\childview.h(15) : error C2011: ’CExtScrollContainerWnd’ : ’class’ type redefinition
1> z:\3rdparty\prof-uis\include\extscrollwnd.h(1849) : see declaration of ’CExtScrollContainerWnd’
1>z:\3rdparty\prof-uis\testscrolldialog2\mainfrm.h(47) : error C2079: ’CMainFrame::m_wndScrollContainer’ uses undefined class ’CExtScrollContainerWnd’
1>Generating Code...
1>Build log was saved at "file://z:\3rdParty\Prof-UIS\TestScrollDialog2\Debug\BuildLog.htm"
1>TestScrollDialog - 113 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
|
Technical Support
|
Mar 10, 2009 - 8:15 AM
|
We are sorry for the inconvenience.
Before Prof-UIS 2.84: the CExtScrollContainerWnd class was the part of this sample project.
In Prof-UIS 2.84: the CExtScrollContainerWnd is present inside Prof-UIS.
So, the old and test version of the CExtScrollContainerWnd class should be simply removed from this test project. Please download the updated version:
http://www.prof-uis.com/download/forums/TestScrollDialog3.zip
|
|
Offer Har
|
Mar 10, 2009 - 9:45 AM
|
Dear Support, Ignore the crash report - I was doing a wrong cast - Now it works However, I have one small question: When I use the arrow buttons of the scroll bars, it goes pixel by pixel, which is not very effective - how can I cahnge it to be, say 20 pixels each press? Thanks, Ron.
|
|
Technical Support
|
Mar 10, 2009 - 1:19 PM
|
Please set the CExtScrollBar::m_nStepSize property to 20 .
|
|
Offer Har
|
Mar 10, 2009 - 1:28 PM
|
Did not work. I changed my code as follows:
CExtScrollContainerWnd* pScrollPageContainer = new CExtScrollContainerWnd;
CRect rc;
m_pTab->GetClientRect(rc);
pScrollPageContainer->Create(m_pTab, rc);
pScrollPageContainer->m_wndScrollBarH.m_nStepSize = 20;
pScrollPageContainer->m_wndScrollBarV.m_nStepSize = 20;
pPage->Create(nID, pScrollPageContainer);
pScrollPageContainer->SetPage(pPage);
m_pTab->PageInsert(pScrollPageContainer, pPage->GetName()); And still, the arrows move it pixel in each iteraion, and not 20.
|
|
Offer Har
|
Mar 10, 2009 - 9:09 AM
|
Dear Support, There is one more twist in my situation - the dialog is embedded inside a tab container. So I tried to add the page like this:
pwndScrollContainer = new CExtScrollContainerWnd;
CRect rc;
m_pTab->GetClientRect(rc);
pwndScrollContainer->Create(m_pTab, rc);
pPage->SetView(this);
pPage->Create(nIDD, m_wndScrollContainer);
m_pTab->PageInsert(wndScrollContainer, "My Page"); But it crashes, and this is the last entries in the stack: mfc80d.dll!AfxAssertValidObject(const CObject * pOb=0x0012e688, const char * lpszFileName=0x01e350d8, int nLine=15233) Line 99 + 0xe bytes C++
> ProfUIS284md.dll!CExtPaintManager::PAINTINHERITEDBACKGROUNDDATA::PAINTINHERITEDBACKGROUNDDATA(bool bClientMapping=true, CDC & dc={...}, CWnd * pWnd=0x0485aae8, CObject * pObjHelperSrc=0x00000000, long lParam=0) Line 15234 C++
ProfUIS284md.dll!CExtPaintManager::RenderCustomBackground(bool bClientMapping=true, CDC & dc={...}, CObject * pObjHelperSrc=0x00000000, long lParam=0) Line 15355 C++
ProfUIS284md.dll!CExtPaintManagerOffice2003::PaintDockerBkgnd(bool bClientMapping=true, CDC & dc={...}, CWnd * pWnd=0x0485aae8, long lParam=0) Line 15741 + 0x22 bytes C++
ProfUIS284md.dll!CExtScrollContainerWnd::OnSwPaint(CDC & dc={...}) Line 6857 + 0x2b bytes C++
MyApp .exe!CMyView::CTab::OnTabWndSelectionChange(long nOldItemIndex=-1, long nNewItemIndex=0, bool bPreSelectionTest=false) Line 290 + 0x12 bytes C++
ProfUIS284md.dll!CExtTWPC<CExtTabWnd>::OnTabWndSelectionChange(long nOldItemIndex=-1, long nNewItemIndex=0, bool bPreSelectionTest=false) Line 132 + 0x1e bytes C++
ProfUIS284md.dll!CExtTabWnd::SelectionSet(long nSelIndex=0, bool bEnsureVisible=true, bool bUpdateTabWnd=true) Line 4741 + 0x22 bytes C++
ProfUIS284md.dll!CExtTabPageContainerWnd::PageInsert(HWND__ * hWnd=0x00282e32, const CExtCmdIcon & pageIcon={...}, const char * sItemText=0x048bcc40, long nPos=0, bool bSelect=true) Line 462 C++
ProfUIS284md.dll!CExtTabPageContainerWnd::PageInsert(HWND__ * hWnd=0x00282e32, const char * sItemText=0x048bcc40, HICON__ * hIcon=0x00000000, bool bCopyIcon=true, long nPos=-1, bool bSelect=false) Line 398 + 0x1c bytes C++
ProfUIS284md.dll!CExtTabPageContainerWnd::PageInsert(CWnd * pWnd=0x0485aae8, const char * sItemText=0x048bcc40, HICON__ * hIcon=0x00000000, bool bCopyIcon=true, long nPos=-1, bool bSelect=false) Line 490 C++
MyApp.exe!CMyView::AddPage(CMyPage * pPage=0x04803f80, unsigned int nID=2047) Line 124 + 0x6c bytes C++
What am I missing? Thanks, Ron.
|
|
Technical Support
|
Mar 10, 2009 - 1:16 PM
|
The source code snippet looks correct. The call stack listing is incomplete. We suspect the code snippet in your message is invoked under some WM_CREATE message handler what causes conflict with MFCā window creation hooking. Please try to initialize the tab pages with delay or send us a test project demonstrating this crash.
|
|
Offer Har
|
Mar 10, 2009 - 1:19 PM
|
Thanks, but as I said, I already found the problem, somewhere there was a wrong cast of PagePermanentWndGet , because now the page is of type CExtScrollContainerWnd , and the actual dialog is its child.
|
|
Ulrich Heinicke
|
Mar 4, 2009 - 3:18 PM
|
Hi, i have a problem with the PropertyGrid. When i choose an item from a combobox, then the text, that will be displayed, is changed but not in bold. In the Apply-function i can retrieve with GetCurSel only the old value. Only when i highlighted the text and choose a secound time an item from the combobox, then GetCursel gives me the new value. I send you yesterday an example per mail. Please tell me what’s wrong. Ulrich
|
|
Technical Support
|
Mar 15, 2009 - 10:03 AM
|
We still didnāt receive any e-mail from you.
|
|
Technical Support
|
Mar 5, 2009 - 8:05 AM
|
We compiled and run the test project you sent us. If we change the ’Aussehen’ property, then it becomes bold. The result message box displays new theme index each time. If we open the options dialog with the property grid inside second time, then the ’Aussehen’ property displays old theme value. This happens because the COptionDlg is reconstructed again and its m_Values contains constructed by default property tree. This is not correct. We think the property store should be kept somewhere outside the options dialog or the COptionDlg class instance should not be re-created in the COptionDialogDlg::OnBnClickedSettings() method each time you need to display this dialog.
|
|
Ulrich Heinicke
|
Mar 13, 2009 - 4:48 PM
|
Hi, the problem isn’t solved. I modify the example and send you a small video qbout the problem last friday per mail. So i need a solution. Ulrich
|
|
Kevin Murray
|
Mar 4, 2009 - 12:59 PM
|
I have two docked windows. Programmatically I have computed the sizes I want for them, and have set the size for both CExtDynamicControlBars via SetInitDesiredSizeVertical. I then dock each bar using:
virtual bool DockControlBar(
UINT nDockBarID,
UINT nCircleNo,
CFrameWnd * pDockSite = NULL, // can be NULL only if bar already was at once docked
bool bRecalcLayout = true
);
This appears to work fine, docking both to the left in cirlce 1, resulting in something like this:
|-------------------|
| Window One |
|-------------------|
| |
| |
| |
|-------------------|
| Window Two |
|-------------------|
| |
| |
| |
|-------------------|
However, if I minimize the app, then restore it, the docked windows rearrange themselves to this:
|-------------------|
| Window One |
|-------------------|
| Window Two |
|-------------------|
| |
| |
| |
| |
| |
| |
| |
|-------------------|
How do I prevent this behavior from occurring? </p> Kevin Murray, AGI
|
|
Technical Support
|
Mar 9, 2009 - 10:35 AM
|
We suspect you simply forgot to invoke the main frame’s RecalcLayout() method after docking each bar.
|
|
Kevin Murray
|
Mar 5, 2009 - 11:21 AM
|
I tried both of those methods. DockControlBarInnerOuter won’t let me dock in the same place as an already docked window. DockControlBarLTRB will let me dock in the same space, but only works well with two windows. If I have three windows, for example, I cannot seem to get them to space evenly. For example: pBar1->DockControlBarInnerOuter(...);
pBar2->DockControlBarLTRB( 33, pBar1 );
pBar3->DockControlBarLTRB( ..., pBar1 ); // <-- regardless of percentage, always docks the same way
How do I properly dock x bars to the same side evenly using DockControlBarLTRB? Kevin Murray
|
|
Technical Support
|
Mar 5, 2009 - 8:01 AM
|
You should not use the CExtControlBar::DockControlBar() method. It’s present just for compatibility with very old Prof-UIS versions. Please use the CExtControlBar::DockControlBarInnerOuter() and CExtControlBar::DockControlBarLTRB() overloaded methods instead. There is the overloaded version of the CExtControlBar::DockControlBarLTRB() method which allows you dock one control bar into the same place with other and specify side and percent of space to occupy.
|
|
John Ritzenthaler
|
Mar 4, 2009 - 9:57 AM
|
I have a modeless CExtResizableDialog with a CExtToolControlBar. It works fine when the dialog’s parent is AfxGetMainWnd() but I want the dialog to be behind the main window when the main window has focus. To do this I changed the parent to CWnd::GetDesktopWindow(). But then the buttons are blank. (They work but the images aren’t there.) Here’s what I do in OnInitDialog() m_wndToolBar.LoadToolBar(IDR_DOXLST_BAR);
RDrwDpiGet(&nDpiX, &nDpiY);
::SetRect(&rectWork, 0, 0, (int)(2.25*nDpiX), nDpiY);
VERIFY(m_cmbBarDrag.Create(
WS_CHILD|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST|CBS_HASSTRINGS,
rectWork, &m_wndToolBar, ID_DOXLST_CMB_DRAG));
VERIFY(m_wndToolBar.SetButtonCtrl(
m_wndToolBar.CommandToIndex(ID_DOXLST_CMB_DRAG), &m_cmbBarDrag));
m_wndToolBar.m_bForceBalloonGradientInDialogs = true; And then this in DoDataExchange() DDX_Control(pDX, IDR_DOXLST_BAR, m_wndToolBar);
Those are the only refernces to the toolbar
|
|
Technical Support
|
Mar 4, 2009 - 1:05 PM
|
You should invoke the g_CmdManager->ProfileWndAdd( pszProfile, pDialog->m_hWnd ); code in the beginning of the dialogās OnInitDialog() virtual method. You should invoke the g_CmdManager->ProfileWndRemove( pDialog->m_hWnd ); code in the beginning of the dialogās OnOK() and OnCancel() virtual methods.
|
|
John Ritzenthaler
|
Mar 4, 2009 - 3:09 PM
|
Thanks. Actually I overrode DestroyWindow() and called ProfileWndRemove() there so it’s called when the window is closed.
|
|
John Ritzenthaler
|
Mar 4, 2009 - 10:08 AM
|
I tried adding this to the main window creation: g_CmdManager->ProfileWndAdd(pszProfile, ::GetDesktopWindow());
But still no luck.
|
|
Emmanuel Verguet
|
Mar 4, 2009 - 9:47 AM
|
Hi, I want to display a CExtComboBox in a toolbar (already done), but instead of displayed a string list, I want to display a checkbox with string list. Is it possible ? Thanks.
|
|
Emmanuel V.
|
Mar 9, 2009 - 10:54 AM
|
Thanks for your update but two things : - When clicking on the arrow to "drop-down" the combo box content, the height of the visible items seems to be null (the width is correct). If I replace my CExtCheckComboBox by a CExtComboBox, it is ok. Here is the Create() line:
if (m_wndComboZones.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST | CBS_HASSTRINGS, CRect(0, 0, 150, 100), this, ID_TOOLBAR_COMBO_ZONES) == FALSE)
So I cannot view my items, neither check/uncheck them. - The CExtCheckComboBox::ResetContent() does not works (or maybe CExtCheckComboBox::m_strText is not updated).
Thanks.
|
|
Technical Support
|
Mar 10, 2009 - 1:18 PM
|
The CExtCheckComboBox class currently requires the CBS_DROPDOWNLIST|CBS_OWNERDRAWVARIABLE|CBS_HASSTRINGS styles. Please specify the CBS_OWNERDRAWVARIABLE style.
Thank you for reporting the content resetting issue in the new check combo box control. To fix it, please update the source code for the following method:
LRESULT CExtCheckComboBox::WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
if( message == CB_RESETCONTENT )
m_bHaveItemHeight = m_bHaveText = false;
else
if( WM_KEYFIRST <= message && message <= WM_KEYLAST
&& ( wParam == VK_UP || wParam == VK_DOWN || wParam == VK_LEFT || wParam == VK_RIGHT || wParam == VK_PRIOR || wParam == VK_NEXT || wParam == VK_HOME || wParam == VK_END )
)
{
if( ! GetDroppedState() )
{
ShowDropDown();
return 0L;
}
SetRedraw( FALSE );
LRESULT lResult = CExtComboBox::WindowProc( message, wParam, lParam );
SetRedraw( TRUE );
Invalidate( TRUE );
UpdateWindow();
return lResult;
}
return CExtComboBox::WindowProc( message, wParam, lParam );
}
|
|
Emmanuel V.
|
Mar 11, 2009 - 2:44 AM
|
I added the CBS_OWNERDRAWVARIABLE flag, but it didn’t solve my problem. I sent to you by email a quick and short sample (Visual C++ 6.0) which demonstrate my problem. May be something is wrong on my side. Thanks for your support.
|
|
Technical Support
|
Mar 11, 2009 - 8:52 AM
|
|
|
Emmanuel V.
|
Mar 12, 2009 - 3:53 AM
|
Another things, I discover that you are using ItemData to store checked state. I planned to use this ItemData to store something else. Is it possible to not use the ItemData to store checked state ? If not possible, I will create a map. Thanks.
|
|
Technical Support
|
Mar 12, 2009 - 2:30 PM
|
We can implement check marks in the synchronized CArray object. But if you are going to use the CMapStringTo*** object for storing your data linked to the combo box items, then please note all the combo box strings should be unique.
|
|
Emmanuel V.
|
Mar 12, 2009 - 3:05 AM
|
Thanks for your update. So, in next release v2.85, I will need to rooback this patch ?
|
|
Technical Support
|
Mar 12, 2009 - 2:30 PM
|
If we find a solution to avoid additional moving of the check combo box window, you can remove this trick from your project. But it does not conflict with the combo box control and even if you leave it, then it will work.
|
|
Emmanuel Verguet
|
Mar 5, 2009 - 1:09 AM
|
I’m not using customizable toolbars and menus. And yes, CExtGridCellCheckListComboBox is the control that fit my needs, but now, how can I add this control in my toolbar. Like a CExtComboBox ? Thanks.
|
|
Technical Support
|
Mar 6, 2009 - 10:29 AM
|
Please update the ā¦/Prof-UIS/Include/ExtComboBox.h and ā¦/Prof-UIS/Src/ExtComboBox.cpp files from the following ZIP file and re-build required configurations of the Prof-UIS library.
http://www.prof-uis.com/download/forums/tmp/NewCombo285.zip
Now the new CExtCheckComboBox class is ready for use in your project. There are only three interesting methods in this class because they work with a set of check boxes:
void CheckSet( INT nIndex, bool bCheck = true ); bool CheckGet( INT nIndex ) const; void CheckAll( bool bCheck = true );
|
|
Technical Support
|
Mar 4, 2009 - 12:50 PM
|
Please run the ProfUIS_Controls sample application, select the Grid page and click the CheckCombo hyperlink at the bottom of the displayed dialog page (itās second from bottom in the leftmost column of hyperlinks). As result, the column with check combo box cells will be selected in the grid window at the top of dialog page. Please try to play with the grid cells in this column and let us know whether that is the combo box type you need in toolbar? Please also let us know whether you are using customizable toolbars and menus?
|
|
Offer Har
|
Mar 4, 2009 - 3:14 AM
|
Dear Support, I have a dialog with grids, and I added them to the tab order. When I walk through controls with the tab key, I know that the grid gets the focus, becuase I then can navigate in rows using the up & down keys, and edit with the F2 key etc. however, there is no visual clue that the grid got the focus, the select cell is not coloreed in the focus cell color for indication. Is there a way to fix this? Thanks, Ron.
|
|
Technical Support
|
Mar 11, 2009 - 11:30 AM
|
You need two things to avoid such invisible focus effect:
1) Do not forget to setup focused cell/row/column during grid initialization.
2) Handle the WM_SETFOCUS message in your grid class and check whether the CExtGridWnd::FocusGet() method returns negative row/column indices and invoke the CExtGridWnd::FocusSet() method to set focus on cells which you like.
|
|
Technical Support
|
Mar 4, 2009 - 12:50 PM
|
The grid window highlights the focused cell with the standard dotted focus rectangle. This focus rectangle is displayed only when the grid window is focused. The selected cell(s) (or row(s), or column(s)) are highlighted using the standard COLOR_HIGHLIGHT Win32 color for painting selected background. This color is used only when the grid window is focused. Itās possible to make the selected grid cells highlighted COLOR_3DSHADOW color when the grid window is not selected. This can be done by applying the __EGBS_NO_HIDE_SELECTION using the CExtScrollItemWnd::SiwModifyStyle() method. So, the selection and focus highlighting in the Prof-UIS grid windows are implemented exactly like in Win32 controls. We suspect you initialized your grid window but didnāt set focus/selection to some cell(s) (or row(s), or column(s)).
|
|
Offer Har
|
Mar 11, 2009 - 10:38 AM
|
When I have a dialog with many controls, and I press the tab button, and the next control is the grid control, I see nothing. When I click on the grid,, of-course there is a focus rectangle. The problem, my guess, is that becuase the tab sets the grid to focus, and not a mouse button, there is no cell focused, so the grid does not know what cell to draw focus to. Is there anyway to tell the grid: ’by default cell 0,0 is the focus cell if you get from from the keyboard’. ? Thanks, Ron.
|
|
Offer Har
|
Mar 3, 2009 - 4:41 PM
|
Dear Support, I have a grid with row & column header and top & left. The right & bottom sides looks as if they miss the frame that the top & left sides have. Is there an option to add those? Thanks, Ron.
|
|
Offer Har
|
Mar 4, 2009 - 12:53 PM
|
Dear Support, If I will add the scroll bars, I will have scroll-bars... I just want the lines to continue so it won’t look like something is missing. Thansk, Ron.
|
|
Technical Support
|
Mar 5, 2009 - 3:05 AM
|
You should apply an appropriate set of the __EGBS_BSE_EX_EAL_*** styles using the CExtGridWnd::BseModifyStyleEx() method or the CExtGridWnd::GridEmptyAreaLines***Set() methods.
|
|
Offer Har
|
Mar 5, 2009 - 11:08 AM
|
Dear Support, This is not what I askded for - what I need is for the frame of the grid to continue on the right edge and on the bottom edge, and for that matter on every edge that does not have header cells. Unless you have header rows on all sides, it looks as if the grid is not finished, as you can see in the screenshot above. Completing the internal area with grid lines will only confuse our users thing that there are cells there, when there actualy are no cells. Thanks, Ron.
|
|
Technical Support
|
Mar 4, 2009 - 12:49 PM
|
You can make the vertical scroll bar or both vertical and horizontal scroll bars persistently visible. You should create your grid window with the WS_VSCROLL style (or WS_HSCROLL|WS_VSCROLL styles) and apply the __ESIS_DISABLE_AUTOHIDE_SB_V style using the CExtScrollItemWnd::SiwModifyStyle() method (or the __ESIS_DISABLE_AUTOHIDE_SB_H| __ESIS_DISABLE_AUTOHIDE_SB_V styles).
|
|
Offer Har
|
Mar 3, 2009 - 2:59 PM
|
Dear Support, I have a grid which I override OnSiwPaintBackground and paint it in the dialog’s color:
void CMyGrid::OnSiwPaintBackground(CDC & dc,bool bFocusedControl) const
{
ASSERT_VALID( this );
CExtGridWnd::OnSiwPaintBackground( dc, bFocusedControl );
CRect rcGridInner = OnSwGetClientRect();
if( ! dc.RectVisible( &rcGridInner ) )
return;
bool bFillArea = true;
if( g_PaintManager->GetCb2DbTransparentMode( (CWnd*)this ) )
{
if( g_PaintManager->PaintDockerBkgnd( true, dc, (CWnd*)this ) )
bFillArea = false;
} // if( g_PaintManager->GetCb2DbTransparentMode( (CWnd*)this ) )
if( bFillArea )
{
COLORREF clrFill =
g_PaintManager->GetColor( CExtPaintManager::CLR_3DFACE_OUT, (CObject*)this );
dc.FillSolidRect( &rcGridInner, clrFill );
} // if( bFillArea )
} All works fine, until I set one of the check-boxes cells I have to disabled like this:
pCell->ModifyStyle(__EGCS_READ_ONLY); After this call, the background of the disabled cell returns to being white, which is not what I want. Is this a bug? if not, what do I need to do so that the bakc color of this cell will not change when it’s read-only? Thanks, Ron.
|
|
Technical Support
|
Mar 4, 2009 - 12:48 PM
|
You can invoke the CExtGridCell::TextColorSet() method for all your grid cells when you inserting them into the grid window. You should use the CExtGridCell::__ECS_READ_ONLY color type to change only the read-only text color of your grid cells. This is the first solution. The second solution is to implement the CExtGridCell::OnQueryTextColor() virtual method in your grid cell classes. The third and the most convenient solution is to implement the CExtGridWnd::OnGridCellQueryTextColor() virtual method in your grid control class. The CExtGridWnd::OnGridCellQueryTextColor() virtual method can return the COLORREF(-1L) value if you want the grid cell to compute its text color using default color selection algorithm. This virtual method should analyze whether the grid cell has the __EGCS_READ_ONLY cell style and return the desired text color for it.
|
|
Offer Har
|
Mar 4, 2009 - 7:08 PM
|
I don’t understand why it works for normal cell, the background is painted with color function of CMyGrid::OnSiwPaintBackground , but when the cell is disabled it does not - why can’t I tell the cell to not paint its back-color in the same way it does not do it if the cell is not read-only?
|
|
Technical Support
|
Mar 5, 2009 - 8:00 AM
|
Please implement the CExtScrollItemWnd::OnSiwGetReadOnlyBackgroundColor() virtual method and return the COLORREF(-1L) value from it.
|
|
Offer Har
|
Mar 5, 2009 - 11:01 AM
|
Thanks, Problem solved...
|
|
Offer Har
|
Mar 3, 2009 - 12:55 PM
|
Dear Support, We have an an application, that sometimes get stuck when switching tabs. Can you please look at the stack and see if you can figure what can cause it? It seems to never exit ProfUIS’s hooks as you can see below. Thanks, Ron.
ProfUIS284md.dll!_RTC_CheckStackVars(void * frame=0xffffff90, _RTC_framedesc * v=0xffffff98) + 0x48 bytes C++
> ProfUIS284md.dll!CExtResizableDialog::OnHookSpyPreTranslateMessage(tagMSG * pMSG=0x0012e988) Line 283 + 0xf bytes C++
ProfUIS284md.dll!CExtHookSpy::HSLL_OnCallWindowProcIn(bool & bCallNextHook=true, long & lResult=0, int nCode=0, bool bMessageSentByCurrentThread=false, tagCWPSTRUCT * pMessageData=0x0012ea74) Line 1590 + 0x13 bytes C++
ProfUIS284md.dll!CExtHookSpy::HookSpyItem_t::SHS_HookCallWindowProcIn(int nCode=0, unsigned int wParam=0, long lParam=1239668) Line 1242 + 0x27 bytes C++
user32.dll!7e431923()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!7e44f460()
user32.dll!7e45879a()
ntdll.dll!7c90e453()
user32.dll!7e4194be()
user32.dll!7e42c174()
user32.dll!7e4292e3()
user32.dll!7e424c99()
user32.dll!7e424cef()
user32.dll!7e423df9()
user32.dll!7e43e577()
mfc80d.dll!CWnd::OnWndMsg(unsigned int message=24, unsigned int wParam=0, long lParam=0, long * pResult=0x04b4d568) Line 1866 + 0x19 bytes C++
mfc80d.dll!CWnd::WindowProc(unsigned int message=24, unsigned int wParam=0, long lParam=0) Line 1742 + 0x1c bytes C++
ProfUIS284md.dll!CExtWS<CExtADLG<CExtResDlg>,301>::WindowProc(unsigned int message=24, unsigned int wParam=0, long lParam=0) Line 1197 C++
ProfUIS284md.dll!CExtWA<CExtWS<CExtADLG<CExtResDlg>,301> >::WindowProc(unsigned int message=24, unsigned int wParam=0, long lParam=0) Line 1843 + 0x14 bytes C++
ProfUIS284md.dll!CExtResizableDialog::WindowProc(unsigned int message=24, unsigned int wParam=0, long lParam=0) Line 378 + 0x14 bytes C++
mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x04b4d568, HWND__ * hWnd=0x00ab0d98, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 240 + 0x1c bytes C++
mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00ab0d98, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 389 C++
mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00ab0d98, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 411 + 0x15 bytes C++
user32.dll!7e418734()
user32.dll!7e418816()
user32.dll!7e42a013()
user32.dll!7e42a998()
BaseUI.dll!CMsgHandler::GlobalWndProc(HWND__ * hWnd=0x00ab0d98, unsigned int uMsg=24, unsigned int wParam=0, long lParam=0) Line 25 + 0x1e bytes C++
BaseUI.dll!stdcallGlobalWndProc(HWND__ * hWnd=0x00ab0d98, unsigned int uMsg=24, unsigned int wParam=0, long lParam=0) Line 63 + 0x15 bytes C++
user32.dll!7e418734()
user32.dll!7e418816()
user32.dll!7e428ea0()
user32.dll!7e428eec()
ntdll.dll!7c90e453()
user32.dll!7e42af62()
ProfUIS284md.dll!CExtTabPageContainerWnd::OnTabWndSelectionChange(long nOldItemIndex=0, long nNewItemIndex=1, bool bPreSelectionTest=false) Line 1204 + 0xe bytes C++
App.exe!CAppView::CTab::OnTabWndSelectionChange(long nOldItemIndex=0, long nNewItemIndex=1, bool bPreSelectionTest=false) Line 255 + 0x17 bytes C++
|
|
DAN MAZILU
|
Mar 4, 2009 - 1:30 AM
|
|
|
Offer Har
|
Mar 4, 2009 - 3:11 AM
|
Thanks Dan! Seems to solve the problem.
|
|
Offer Har
|
Mar 3, 2009 - 1:22 PM
|
Dear Support, There is another problem - if I do not set the control attribure to true, and I come back to the first tab, the control with the focus in the sub-dialog (if it’s a text box) is not drawn correctly (it’s content is not drawn) I will send you a sample application that reproduces this bug. Regards, Ron.
|
|
Offer Har
|
Mar 3, 2009 - 1:20 PM
|
Dear Support, I think I found the problem - I would like some explanations: I have two tabs - one contains a sub-dialog. If the sub-dialog has the control, then when switching into the second tab the application hangs with the stack above. This happens only if the sub-dialog have the Control attribute set to true. I have an application for you that can reproduce this bug, if you want I can send it to you. Regards, Ron.
|
|
Robert Webb
|
Mar 2, 2009 - 11:39 PM
|
Keyboard navigation with a minimized ribbon bar shows the wrong tab selected. Try the ribbon bar MDI sample. Hit Alt and hit a key as shown under the ribbon tabs. If the bar is minimized, then the appropriate page is shown, but the wrong tab is selected above it. Thanks, Rob.
|
|
Technical Support
|
Mar 4, 2009 - 3:26 AM
|
Thank you for reporting this issue. To fix it, please insert four lines of code at the beginning of the following method: bool CExtRibbonBar::Ribbon_AutoHideModeDoExpanding(
CExtRibbonButtonTabPage * pTBB,
bool bKeyboardTrackingEvent
)
{
ASSERT_VALID( this );
ASSERT_VALID( pTBB );
ASSERT( GetSafeHwnd() != NULL );
bKeyboardTrackingEvent;
if( ! Ribbon_AutoHideModeEnabledGet() )
return false;
if( RibbonPage_ExpandedModeGet() )
return false;
////// BEGIN: NEW LINES ////////////////////////////////////////////////////////////////////////
INT nSelIdx = RibbonTabPageButton_GetIndexOf( pTBB );
if( nSelIdx <= 0 )
return false;
Ribbon_PageSelectionSet( nSelIdx, false );
////// END: NEW LINES ////////////////////////////////////////////////////////////////////////
bool bKeyTipsDisplayed = KeyTipsDisplayedGet();
INT nIndex, nCount = AnimationSite_ClientGetCount();
for( nIndex = 0; nIndex < nCount; nIndex ++ )
. . .
|
|
Robert Webb
|
Mar 2, 2009 - 11:20 PM
|
How can I use a raised-style button on a ribbon bar? Typically they are flat, and all you see against the background is the button’s icon and text. How can I make a button actually look like a button, like those in the ProfUIS Controls demo? I’m (mostly) using Office 2007 themes. Thanks, Rob.
|
|
Technical Support
|
Mar 3, 2009 - 12:05 PM
|
You can create and use your own CExtRibbonNode -derived class which has same constructors and the CExtRibbonNode::_OnRibbonGetButtonRTC() virtual method which returns runtime class of your CExtBarButton -derived class. Your CExtBarButton -derived class should implement the CExtBarButton::PaintCompound() virtual method where you should paint button like you want to see it. As result, your custom painted buttons will appear in the ribbon bar. In the simplest case, you can copy the source code from the CExtBarButton::PaintCompound() method and replace only the pBar->PmBridge_GetPM()->PaintPushButton( dc, _ppbd ); line of code with the pAnotherPM->PaintPushButton( dc, _ppbd ); line of code where the pAnotherPM is the pointer to global instance of paint manager which you want to draw the ribbon button. This means entire ribbon bar will be used by the g_PaintManager global paint manager instance stored inside Prof-UIS and your ribbon buttons will be painted by the second pAnotherPM global instance of another paint manager stored somewhere in your application.
|
|
Krustys Donuts
|
Mar 2, 2009 - 1:36 PM
|
Dear Support, I would like to create an owner-draw CExtGridCell. I have overridden the OnPaintForeground method, but cannot seem to get anything in this cell. The code is below. Any suggestions would be much appriciated.
class { string m_strErrorWarningTooltip; string m_strAoTooltip; VRApproOrientation::ERROR_TYPE m_nErrType; CExtBitmap m_bmpAoNoError; CExtBitmap m_bmpAoWarning; CExtBitmap m_bmpAoError; CExtBitmap m_bmpLandscapeA1Away; CExtBitmap m_bmpLandscapeA1Toward; CExtBitmap m_bmpPortraitA1Away; CExtBitmap m_bmpPortraitA1Toward; CExtBitmap m_bmpRighty; CExtBitmap m_bmpLefty; VRCellErrWarnAndAo : public CExtGridCellint m_nAoId;public DECLARE_SERIAL( VRCellErrWarnAndAo ); IMPLEMENT_ExtGridCell_Clone( VRCellErrWarnAndAo, CExtGridCell ); VRCellErrWarnAndAo(CExtGridDataProvider * pDataProvider = NULL); :// virtual methods CExtGridWnd & wndGrid, CExtPopupMenuTipWnd & _ATTW, RECT & rcArea ); CDC & dc, LONG nVisibleColNo, LONG nVisibleRowNo, LONG nColNo, LONG nRowNo, INT nColType, INT nRowType, DWORD dwAreaFlags, DWORD dwHelperPaintFlags ) {m_nErrType = nErrType;} }; virtual bool OnInitAdvancedTip(const CExtGridHitTestInfo & htInfo,virtual void OnPaintForeground(const CExtGridWnd & wndGrid,const RECT & rcCellExtra,const RECT & rcCell,const RECT & rcVisibleRange,const;void SetErrorType(VRApproOrientation::ERROR_TYPE nErrType)void SetErrorWarningTooltip(const string& strTT) {m_strErrorWarningTooltip = strTT;}void SetAoId(int nAoId) {m_nAoId = nAoId;}void SetAoTooltip(const string& strTT) {m_strAoTooltip = strTT;}// class VRCellErrWarnAndAo
///////////////////////////////////////////////////////////////////////////// // VRCellErrWarnAndAo IMPLEMENT_SERIAL( VRCellErrWarnAndAo, CExtGridCell, VERSIONABLE_SCHEMA|1 ); extern HINSTANCE GlobalInstance;///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// VRCellErrWarnAndAo::VRCellErrWarnAndAo(CExtGridDataProvider * pDataProvider : CExtGridCell ( pDataProvider ) { VERIFY( m_bmpAoNoError.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpBlank), RT_BITMAP, GlobalInstance)); m_bmpAoNoError.Make32(); m_bmpAoNoError.AlphaColor( RGB(255,0,0), RGB(0,0,0), 0); VERIFY( m_bmpAoWarning.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpWarning), RT_BITMAP, GlobalInstance)); m_bmpAoWarning.Make32(); m_bmpAoWarning.AlphaColor( RGB(255,0,0), RGB(0,0,0), 0); VERIFY( m_bmpAoError.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpError), RT_BITMAP, GlobalInstance)); m_bmpAoError.Make32(); m_bmpAoError.AlphaColor( RGB(0,255,0), RGB(0,0,0), 0); VERIFY( m_bmpLandscapeA1Away.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpLandscapeA1Away), RT_BITMAP, GlobalInstance)); m_bmpLandscapeA1Away.Make32(); m_bmpLandscapeA1Away.AlphaColor( RGB(255,0,0), RGB(0,0,0), 0); VERIFY( m_bmpLandscapeA1Toward.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpLandscapeA1Toward), RT_BITMAP, GlobalInstance)); m_bmpLandscapeA1Toward.Make32(); m_bmpLandscapeA1Toward.AlphaColor( RGB(255,0,0), RGB(0,0,0), 0); VERIFY( m_bmpPortraitA1Away.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpPortraitA1Away), RT_BITMAP, GlobalInstance)); m_bmpPortraitA1Away.Make32(); m_bmpPortraitA1Away.AlphaColor( RGB(255,0,0), RGB(0,0,0), 0); VERIFY( m_bmpPortraitA1Toward.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpPortraitA1Toward), RT_BITMAP, GlobalInstance)); m_bmpPortraitA1Toward.Make32(); m_bmpPortraitA1Toward.AlphaColor( RGB(255,0,0), RGB(0,0,0), 0); VERIFY( m_bmpRighty.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpRighty), RT_BITMAP, GlobalInstance)); m_bmpRighty.Make32(); m_bmpRighty.AlphaColor( RGB(255,0,0), RGB(0,0,0), 0); VERIFY( m_bmpLefty.LoadBMP_Resource (MAKEINTRESOURCE( IDB_bmpLefty), RT_BITMAP, GlobalInstance)); m_bmpLefty.Make32(); m_bmpLefty.AlphaColor( RGB(255,0,0), RGB(0,0,0), 0); } /* = NULL*/)///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// bool CExtGridWnd & wndGrid, CExtPopupMenuTipWnd & _ATTW, RECT & rcArea) { ASSERT_VALID( ASSERT_VALID( (&wndGrid) ); ASSERT( ! htInfo.IsHoverEmpty() ); ASSERT( htInfo.IsValidRect() ); VRCellErrWarnAndAo::OnInitAdvancedTip(const CExtGridHitTestInfo & htInfo,this );//if there is a valid tooltip for this cell. { _ATTW.SetText(m_strAoTooltip.c_str()); bValidTooltip = } } bool bValidTooltip = false;if (!m_strAoTooltip.empty())true;return bValidTooltip;///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// void CDC & dc, LONG nVisibleColNo, LONG nVisibleRowNo, LONG nColNo, LONG nRowNo, INT nColType, INT nRowType, DWORD dwAreaFlags, DWORD dwHelperPaintFlags ) VRCellErrWarnAndAo::OnPaintForeground(const CExtGridWnd & wndGrid,const RECT & rcCellExtra,const RECT & rcCell,const RECT & rcVisibleRange,const{ //Draw the marker to show this AO is subordinate to the TP row.dc.MoveTo(0,0); dc.LineTo(5,5); /* CSize szErrBmp = m_bmpAoError.GetSize(); dc.DPtoLP(&szErrBmp); if (m_nErrType == VRApproOrientation::kError) m_bmpAoError.Draw((HDC)dc, 0,0, szErrBmp.cx, szErrBmp.cy); else if (m_nErrType == VRApproOrientation::kWarning) m_bmpAoWarning.Draw((HDC)dc, 0,0, szErrBmp.cx, szErrBmp.cy); else m_bmpAoNoError.Draw((HDC)dc, 0,0, szErrBmp.cx, szErrBmp.cy); */ //If present, draw the error/warning icon. //Draw the plate and A1 orientation icon.CSize szAoBmp = m_bmpLandscapeA1Away.GetSize(); dc.DPtoLP(&szAoBmp); { m_bmpLandscapeA1Away.Draw(dc.m_hDC, 0,0, szAoBmp.cx, szAoBmp.cy); if (m_nAoId & VRApproOrientation::kLandscape)if (m_nAoId & VRApproOrientation::kA1AwayFromGrippers)else //if (m_nAoId & VRApproOrientation::kA1TowardsGrippers)m_bmpLandscapeA1Toward.Draw(dc.m_hDC, 0,0, szAoBmp.cx, szAoBmp.cy); } else //if (m_nAoId & VRApproOrientation::kPortrait){ m_bmpPortraitA1Away.Draw(dc.m_hDC, 0,0, szAoBmp.cx, szAoBmp.cy); if (m_nAoId & VRApproOrientation::kA1AwayFromGrippers)else //if (m_nAoId & VRApproOrientation::kA1TowardsGrippers)m_bmpPortraitA1Toward.Draw(dc.m_hDC, 0,0, szAoBmp.cx, szAoBmp.cy); } /* //Draw the arm orientation (righty/lefty) icon. CSize szArmBmp = m_bmpRighty.GetSize(); dc.DPtoLP(&szArmBmp); if (m_nAoId & VRApproOrientation::kRighty) m_bmpRighty.Draw((HDC)dc, 0,0, szArmBmp.cx, szArmBmp.cy); else //if (m_nAoId & VRApproOrientation::kLefty) m_bmpLefty.Draw((HDC)dc, 0,0, szArmBmp.cx, szArmBmp.cy);*/ }
Thanks,
Gil
|
|
Technical Support
|
Mar 4, 2009 - 3:29 AM
|
The lines of code in your message are messed up. Please do not use MS Word for copying text from and paste it here.
We looked into the source code of the VRCellErrWarnAndAo::OnPaintForeground() method you sent us via e-mail. It uses zero values as top/left corner of the grid cell. This is not correct. Please use the rcCell method parameter. It describes cell location in the client coordinates of the grid window. So, the following code:
dc.MoveTo(0,0);
dc.LineTo(5,5);
Should be replaced with the following: dc.MoveTo( rcCell.left, rcCell.top );
dc.LineTo( rcCell.left + 5, rcCell.top + 5 );
|
|
Offer Har
|
Mar 2, 2009 - 11:37 AM
|
Dear Support, I have a CExtLabel derived class, in which I want to know the exact size of the text in the control, so that I can add my drawing after the text. The way to do it is by using DT_CALCRECT as you well know. I tried to pass to OnDrawLabelText all the parameters including DT_CALCRECT , and I see that the internal rc there gets the right size (these are the last line of the function): ... CRect rc( rcText );
rc.DeflateRect( &m_rcLabelTextMargins );
dc.DrawText(
LPCTSTR(strText),
int(_tcslen(strText)),
rc,
dwDrawTextFlags
);
dc.SetTextColor( clrOldText );
dc.SetBkMode( nOldBkMode );
if( hFont != NULL )
::SelectObject( dc, hOldFont );
}
My problem is that this rc is local, so I cannot get this value... for now what I did was duplicate OnDrawLabelTextinto my derived, and made it return this rc of the actual size of the text. Is is possible for next version that this function, which return void now, will return this size? Many thanks, Ron.
|
|
Technical Support
|
Mar 3, 2009 - 12:04 PM
|
We guess you are discussing a simple text label control with left aligned text. In this case it’s possible even to design some new virtual methods in the CExtLabel class for measuring and painting additional content near the text. But labels can be center aligned, right aligned, single line, multi line and even bitmap based. So, approach should be definitively different. Please provide us with more details about your task so we can improve the CExtLabel class.
|
|
Offer Har
|
Mar 3, 2009 - 12:09 PM
|
Dear Support, The requirement I have is that there will be a line extending after the text all the way to the end of the label box (in the right theme of-course), like this: I derived from CExtLabel, and added the line, but you are right, I did not add implementation for centered text etc. I think that this is a nice feature - if you can add it to the coming version it’ll be handy for more library users. Thanks, Ron.
|
|
Torsten Schucht
|
Nov 2, 2009 - 9:57 AM
|
Thanks for the fix. It works just fine!!
|
|
Offer Har
|
Mar 2, 2009 - 8:05 AM
|
Dear Support, I would like to add a rectangel on the dialog’s background. What I did was override OnPaint of my CDialog derived class, and added simple rectangle drawing code. I see the rectangle. If I noe deriver my dialog class from CExtNCW<CExtResizableDialog> , the rectangle is not drawn. I see that my OnPaint is called, but no rectangle is shown. Is there any sample of how to do it? is there any specific code I need to add? Thanks, Ron.
|
|
Offer Har
|
Mar 2, 2009 - 9:49 AM
|
That’s not the reason. Here it is when not derived from:CExtNCW<CExtResizableDialog> , the same with it, you see nothing on the left top corner:
|
|
Technical Support
|
Mar 2, 2009 - 9:45 AM
|
We suspect the rectangle is under some dialog control.
|
|
John Ritzenthaler
|
Feb 27, 2009 - 5:32 PM
|
I have modeless CExtResizableDialog windows that I destroy simply by deleteing the dialog object. This worked fine with CDialog. But with CExtResizableDialog, I sometimes get ON_UPDATE_COMMAND_UI messages during the destruction. This causes all kinds of problems with parts of the member data freed. Is there some was to turn these off before I destroy the window or some recommended sequence for destorying the dialog?
|
|
Technical Support
|
Mar 1, 2009 - 4:47 AM
|
You should not destroy any CWnd -based C++ objects using the delete operator while these objects still subclass HWND window handle. You should not do this even if there are no crashes and assertions occur for particular CWnd -derived classes. At least, MFC prints warning messages into the Output window in Visual Studio when such objects are deleted. Such deletion is not suggested by MFC. Please invoke the CWnd::DestroyWindow() virtual method for destroying any kind of windows. Please override the CWnd::PostNcDestroy() virtual method and invoke the delete this; line of code at the end of it if your window should delete itself automatically. The CWnd::PostNcDestroy() virtual method is invoked when window handle is destroyed and when it was not created successfully inside invocation of the Create***() methods of any MFC and Prof-UIS classes. So, if you have the instance of some CWnd -based class which is allocated dynamically with the C++ new operator and if it’s Create() method returned negative result, then the PostNcDestroy() virtual method still allows you to self delete this object.
|
|
John Ritzenthaler
|
Mar 4, 2009 - 9:44 AM
|
Thanks for the education. Sorry to have bothered you with something I thought was ProfUIS related.
|
|
John Ritzenthaler
|
Feb 27, 2009 - 5:24 PM
|
I’m using a modeless CExtResizableDialog and want to float it over other application (such as Excel) to drag and drop data. I’m using this call: SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); This worked fine when I derived from CDialog but doesn’t work with CExtResizableDialog
|
|
Technical Support
|
Mar 1, 2009 - 4:47 AM
|
We can create some test project which invokes the same line of code, but we would like not to guess how your real project really created dialog, which window styles are used by this dialog and so on. Could you please modify some simple Prof-UIS sample project like SDI, make it displaying dialog like your real project do and send this modified project to us.
|
|
John Ritzenthaler
|
Mar 4, 2009 - 9:43 AM
|
I created different projects using variations of ProfUIS/non-ProfUIS dialogs and found that the problem isn’t related to your library. Unfortunately I haven’t figured out what IS causing it.
|
|
John Ritzenthaler
|
Mar 9, 2009 - 5:16 PM
|
After a long struggle... The problem is caused by something the toolbar does AFTER sending the command. In processing the command, I use SetWindowPos() to make it topmost. But sometimes it works, sometimes it doesn’t. My work-around was to post another message to the window. The toolbar command processing then completes before I get the 2nd command message. When I process the 2nd command message, I call SetWindowPos() and everything works fine. CDlg::OnBtnFloat() { PostMessage(WM_COMMAND, ID_BTN_FLOAT2); } CDlg::OnBtnFloat2() { SetWindowPos(...); }
|
|