|
|
|
|
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 |
|
tera tera
|
Oct 7, 2009 - 4:25 AM
|
|
|
Technical Support
|
Oct 30, 2009 - 2:37 PM
|
You should implement the WM_NCHITTEST message handler which should detect client area first of all and return HTCLIENT code for it. Then it should detect the border areas and return appropriate HT*** codes for them. Then it should let the DWM to hit-test glass buttons using the code like this:
if( g_PaintManager.m_DWM.DwmDefWindowProc(
hWnd,
message, // WM_NCHITTEST
wParam,
lParam,
&lResult
)
)
return lResult; // HT*** code from DWM
Then it should detect caption icon rectangle and return HTSYSMENU for it. The rest area is HTCAPTION .
|
|
tera tera
|
Nov 1, 2009 - 7:14 PM
|
In g_PaintManager.m_DWM.DwmDefWindowProc, HT** does not return.
zero always returns.
LRESULT lr = 0L;
lr = DefWindowProc ( message , wParam , lParam ); switch ( lr ){
case HTCLIENT:
case HTSYSMENU: //
case HTMAXBUTTON: //
case HTMINBUTTON: //
return 1;
break;
}
If it is DefWindowProc, HT** returns.
|
|
Technical Support
|
Nov 2, 2009 - 9:09 AM
|
The DWM window procedure should be called and this is required for normal DWM operation.
|
|
Technical Support
|
Oct 27, 2009 - 2:32 PM
|
Please insert the following code at the beginning of the CMuResizableDialog::WindowProc() method:
if( message == WM_NCLBUTTONDOWN && m_blGrassModeFlag )
{
HWND hWndOwn = m_hWnd;
SetRedraw( FALSE );
LRESULT lr = CExtResizableDialog::WindowProc( message, wParam, lParam );
if( ! ::IsWindow(hWndOwn) )
return lr;
SetRedraw( TRUE );
return lr;
}
if( message == WM_NCHITTEST && m_blGrassModeFlag )
{
LRESULT lr = 0L;
if( g_PaintManager.m_DWM.DwmDefWindowProc( m_hWnd, message, wParam, lParam, &lr ) )
return lr;
}
|
|
tera tera
|
Oct 28, 2009 - 2:44 AM
|
The dialogue seems to respond a click. Give my best regards http://ifreeta.dee.cc/20091028/Untitled15.html // ----------------------------------------------------------------------------
/**
* @brief
*/
// ----------------------------------------------------------------------------
LRESULT CMuResizableDialog::WindowProc(
UINT message,
WPARAM wParam,
LPARAM lParam
)
{
if ( message == WM_DESTROY )
{
if ( m_blERBtnFlag == TRUE ){
if ( m_blERBtnWayFlag == TRUE ){
ERChange();
}
}
} bool bInvalidate = false;
// Window Captionの設定
if( message == WM_SETTEXT )
{
bInvalidate = true;
} //
if( message == WM_NCLBUTTONDOWN && m_blGrassModeFlag )
{
HWND hWndOwn = m_hWnd;
SetRedraw( FALSE );
LRESULT lr = CExtResizableDialog::WindowProc( message, wParam, lParam );
if( ! ::IsWindow(hWndOwn) ){
return lr;
}
SetRedraw( TRUE );
return lr;
}
if( message == WM_NCHITTEST && m_blGrassModeFlag )
{
LRESULT lr = 0L;
if( g_PaintManager.m_DWM.DwmDefWindowProc( m_hWnd, message, wParam, lParam, &lr ) ){
return lr;
}
} LRESULT lResult = CExtResizableDialog::WindowProc( message, wParam, lParam ); if( bInvalidate ){
OnNormalERPaint();
}
return lResult;
}
|
|
Technical Support
|
Oct 28, 2009 - 9:49 AM
|
It’s clickable because you should handle the WM_NCHITTEST message and implement the complete window hit-testing without invoking the default window procedure (parent method class).
|
|
tera tera
|
Oct 28, 2009 - 6:51 PM
|
Hello. I thought.
However, I do not understand realization methods well.
I am troubled. Give my best regards
|
|
Technical Support
|
Oct 7, 2009 - 9:55 AM
|
We are waiting for your e-mail. The white image with hollow x inside square is painted as white over the DWM surface because the source pixels of it are black. Please check what and where you code draws into DWM surface.
|
|
tera tera
|
Oct 26, 2009 - 6:43 PM
|
|
|