Handling WM_NCPAINT
-
Hi, I have some problem in handing the WM_NCPAINT. As per MSDN, the dc with the region clipped can be obtained as follows for handling the WM_NCPAINT.
case WM_NCPAINT: { HDC hdc = GetDCEx(hwnd, (HRGN)wParam, DCX_WINDOW|DCX_INTERSECTRGN); }
But when I tried this am getting hdc as NULL. Any solution for this issue. N.B - I tried using the DCX_CACHE flag in the GetDCEx() function. Eventhough in this case it returned a dc handle, the clipping is not proper. Thanks Naveen [OpenedFileFinder] -
Hi, I have some problem in handing the WM_NCPAINT. As per MSDN, the dc with the region clipped can be obtained as follows for handling the WM_NCPAINT.
case WM_NCPAINT: { HDC hdc = GetDCEx(hwnd, (HRGN)wParam, DCX_WINDOW|DCX_INTERSECTRGN); }
But when I tried this am getting hdc as NULL. Any solution for this issue. N.B - I tried using the DCX_CACHE flag in the GetDCEx() function. Eventhough in this case it returned a dc handle, the clipping is not proper. Thanks Naveen [OpenedFileFinder] -
Hi, I have some problem in handing the WM_NCPAINT. As per MSDN, the dc with the region clipped can be obtained as follows for handling the WM_NCPAINT.
case WM_NCPAINT: { HDC hdc = GetDCEx(hwnd, (HRGN)wParam, DCX_WINDOW|DCX_INTERSECTRGN); }
But when I tried this am getting hdc as NULL. Any solution for this issue. N.B - I tried using the DCX_CACHE flag in the GetDCEx() function. Eventhough in this case it returned a dc handle, the clipping is not proper. Thanks Naveen [OpenedFileFinder]Is wParam == 1 when GetDXEx() fails? If not, try calling GetLastError() when it fails and see what the error code is. Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
Is wParam == 1 when GetDXEx() fails? If not, try calling GetLastError() when it fails and see what the error code is. Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
its now ok Mark. When I specified the DCX_PARENTCLIP flag it working fine also cliping is proper.
nave [OpenedFileFinder]