|
|
|
|
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 |
|
Christoph Luedi
|
Apr 21, 2007 - 5:16 PM
|
The app ran fine under XP, but on Vista the Edit controls in a CExtResizableDialog show a strange behavior: The text becomes invisible when the mouse cursor crosses the control border. Is is still there, but it’s probably not redrawn... it might be related with the scrollbar, it only appears if a scrollbar is visible. If I select it with the mouse the selected line becomes visible again as it is redrawn. The behavior occurs after merely adding a control in the resource editor, without adding a variable to it.
Is there a chance that you can tell what could be the reason or how I could avoid this, or should I try to create a small app that reproduces the behavior?
Thanks, Chris
|
|
Christoph Luedi
|
May 27, 2007 - 3:06 PM
|
(sorry - previous post was posted by mistake)
I noticed that the new version 3.70 fixed the problem, but not in every place.
I have a wizard: CExtNCW<CWizard> dlg; dlg.DoModal();
The wizard is a property sheet, it has a page: class CWizard : public CExtResizablePropertySheet { // ... CExtAPPG<CImportWizardSourcePage> m_sourcePage; //... };
The page is a property page, it has an edit control: class CImportWizardSourcePage : public CExtResizablePropertyPage { //... CExtEdit m_editSourceEdit; //... }
This edit control has both sliders visible, and both autoscroll flags set. The text disappers if the mouse crosses the edit control border. If I hide the sliders, the text remains there but it flickers if the mouse crosses the border.
Please advise what I could do to avoid this problem, I would like to release my software soon...
Thank you very much, Chris
|
|
Christoph Luedi
|
May 27, 2007 - 2:58 PM
|
I noticed that the new version 3.70 fixed the problem, but not in every place.
I have a Wizard Page with a CExtEdit: class CImportWizardSourcePage : public CExtResizablePropertyPage
|
|
Technical Support
|
May 29, 2007 - 10:14 AM
|
Thank you for your comments. Please open the CExtResizablePropertyPage::OnHookWndMsg method and replace the existing WM_ERASEBKGND case block with the following: case WM_ERASEBKGND:
{
ASSERT_VALID( this );
// look through the message map to see
// if this message is handled by user
const AFX_MSGMAP_ENTRY * lpEntry =
_FindMessageMapHandler(
nMessage,
0, 0
);
if( lpEntry != NULL )
{
// invoke the user defined message handler
union
{
AFX_PMSG pfn;
BOOL (AFX_MSG_CALL CWnd::*pfn_bD)( CDC* );
} mmf;
mmf.pfn = lpEntry->pfn;
LRESULT lResult =
(this->*mmf.pfn_bD)( CDC::FromHandle( ( HDC ) wParam ) );
return lResult > 0L ? true : false;
} // if( lpEntry != NULL )
HDC hDC = reinterpret_cast < HDC > (wParam);
ASSERT( hDC != NULL );
HWND hWnd = ::WindowFromDC( hDC );
if( hWnd != NULL
&& hWnd != m_hWnd
)
return
CExtHookSink::OnHookWndMsg(
lResult,
hWndHooked,
nMessage,
wParam,
lParam
);
if( (GetStyle() & WS_CLIPCHILDREN) != 0
&& PmBridge_GetPM()->GetCb2DbTransparentMode(this)
)
return (!0L);
// HDC hDC = reinterpret_cast < HDC > (wParam);
// ASSERT( hDC != NULL );
CExtPaintManager::stat_ExcludeChildAreas(
hDC,
GetSafeHwnd(),
CExtPaintManager::stat_DefExcludeChildAreaCallback
);
return (!0L);
} // case WM_ERASEBKGND Do not forget to recompile the library.
|
|
Christoph Luedi
|
May 11, 2007 - 8:30 AM
|
Thanks for this reply.
Can you name a date when a fix is available? Or better, can you tell me a workaround or how I can manually fix this?
I plan to deliver my application soon, and this is a critical issue...
Thanks, Chris
|
|
Technical Support
|
May 14, 2007 - 10:57 AM
|
Please open the CExtWS::WindowProc method and replace the if( message == WM_ERASEBKGND ) { ... } code snippet with the following: if( message == WM_ERASEBKGND )
{
ASSERT_VALID( this );
// look through the message map to see
// if this message is handled by user
const AFX_MSGMAP_ENTRY * lpEntry =
_FindMessageMapHandler(
message,
0, 0
);
if( lpEntry != NULL )
{
// invoke the user defined message handler
union
{
AFX_PMSG pfn;
BOOL (AFX_MSG_CALL CWnd::*pfn_bD)( CDC* );
} mmf;
mmf.pfn = lpEntry->pfn;
LRESULT lResult =
(this->*mmf.pfn_bD)( CDC::FromHandle( ( HDC ) wParam ) );
return lResult;
} // if( lpEntry != NULL )
HDC hDC = reinterpret_cast < HDC > (wParam);
ASSERT( hDC != NULL );
HWND hWnd = ::WindowFromDC( hDC );
if( hWnd != NULL
&& hWnd != m_hWnd
)
return CExtWSBase::WindowProc( message, wParam, lParam );
if( (GetStyle() & WS_CLIPCHILDREN) != 0
&& PmBridge_GetPM()->GetCb2DbTransparentMode(this)
)
return (!0L);
CExtPaintManager::stat_ExcludeChildAreas(
hDC,
GetSafeHwnd(),
CExtPaintManager::stat_DefExcludeChildAreaCallback
);
return CExtWSBase::WindowProc( message, wParam, lParam );
} // if( message == WM_ERASEBKGND )
|
|
Technical Support
|
Apr 25, 2007 - 12:01 PM
|
We confirm that it is a bug and will fix it as soon as possible. Thank you for reporting it.
|
|