WTRLにおけるWM_についてPAINTでの処理
1165 ワード
本論文の転送先:http://blog.csdn.net/kesummer/article/details/5937053
WTRU 8.0の中のatlcrack.hはウィンドウメッセージを復号しました.windowsメッセージは一般的にwParamとlParamによって伝達されるので、このように使うのは不便です.WM_に対してはPAINTはOnPaint(HDC)に復号されています.hDCはずっとNULLで、atlcrack.hを見ました.(そのコードはもう確認できます.文書がないので)そのコードはこう書かれています.
最初はBUGかと思いましたが、WINCEの下でWM_を発見しました.PAINTメッセージは違います.
WINCEでは
Handle to the device context to draw in.
If this parameter is NULL、use the default device context.
This parameter is used by some comon controlls to enable drawing in a device context other than the default device context.
Other windows can safely ignore this parameter.
WTRU 8.0の中のatlcrack.hはウィンドウメッセージを復号しました.windowsメッセージは一般的にwParamとlParamによって伝達されるので、このように使うのは不便です.WM_に対してはPAINTはOnPaint(HDC)に復号されています.hDCはずっとNULLで、atlcrack.hを見ました.(そのコードはもう確認できます.文書がないので)そのコードはこう書かれています.
//void OnPaint(CDCHandle dc)
#define MSG_WM_PAINT(func)
if (uMsg == WM_PAINT)
{
SetMsgHandled(TRUE);
func((HDC)wParam);
lResult = 0;
if(IsMsgHandled())
return TRUE;
}
実際に窓口でWM_を受信しました.PAINTメッセージは、BeginnPaintを呼び出してウィンドウDCを取得する必要がありますが、wParamとlParamは常に0です.dcパラメータは何の効果がありますか?最初はBUGかと思いましたが、WINCEの下でWM_を発見しました.PAINTメッセージは違います.
WINCEでは
WM_PAINT hdc = (HDC) wParam;
パラメータ
hdcHandle to the device context to draw in.
If this parameter is NULL、use the default device context.
This parameter is used by some comon controlls to enable drawing in a device context other than the default device context.
Other windows can safely ignore this parameter.