mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-30 06:23:22 +08:00
rename get_valid_dc to get_effective_dc; rename release_valid_dc to release_effective_dc
This commit is contained in:
+26
-26
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -666,7 +666,7 @@ leave_drawing:
|
||||
|
||||
#endif // #if MGUI_BYTEORDER == MGUI_LIL_ENDIAN
|
||||
|
||||
static inline HDC get_valid_dc (PMAINWIN pWin, BOOL client)
|
||||
static inline HDC get_effective_dc (PMAINWIN pWin, BOOL client)
|
||||
{
|
||||
if (!(pWin->dwExStyle & WS_EX_CTRLASMAINWIN)
|
||||
&& (pWin->pMainWin->secondaryDC)) {
|
||||
@@ -690,7 +690,7 @@ static inline HDC get_valid_dc (PMAINWIN pWin, BOOL client)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void release_valid_dc (PMAINWIN pWin, HDC hdc)
|
||||
static inline void release_effective_dc (PMAINWIN pWin, HDC hdc)
|
||||
{
|
||||
if (pWin->pMainWin->secondaryDC) {
|
||||
if (pWin->privCDC != hdc)
|
||||
|
||||
@@ -562,7 +562,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
//client dc would be diffirent, so we must get the scondaryDC,
|
||||
//the update to client dc (dongjunjie 2010/7/28)
|
||||
//hdc = GetClientDC ((HWND)pWin);
|
||||
hdc = get_valid_dc(pWin, TRUE);
|
||||
hdc = get_effective_dc(pWin, TRUE);
|
||||
|
||||
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
|
||||
while (pcrc) {
|
||||
@@ -605,7 +605,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
|
||||
ReleaseDC (real_dc);
|
||||
}
|
||||
release_valid_dc(pWin, hdc);
|
||||
release_effective_dc(pWin, hdc);
|
||||
|
||||
|
||||
GetClientRect((HWND)pWin, &rcClient);
|
||||
|
||||
@@ -2524,7 +2524,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
//BUGFIX: if the MainWindow is AutoSecondaryDC, the secondaryDC and
|
||||
//client dc would be diffirent, so we must get the scondaryDC,
|
||||
//the update to client dc (dongjunjie 2010/7/28)
|
||||
hdc = get_valid_dc(pWin, TRUE);
|
||||
hdc = get_effective_dc(pWin, TRUE);
|
||||
|
||||
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
|
||||
while (pcrc) {
|
||||
@@ -2565,7 +2565,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
|
||||
ReleaseDC (real_dc);
|
||||
}
|
||||
release_valid_dc(pWin, hdc);
|
||||
release_effective_dc(pWin, hdc);
|
||||
|
||||
GetClientRect((HWND)pWin, &rcClient);
|
||||
|
||||
|
||||
@@ -717,7 +717,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
//client dc would be diffirent, so we must get the scondaryDC,
|
||||
//the update to client dc (dongjunjie 2010/7/28)
|
||||
//hdc = GetClientDC ((HWND)pWin);
|
||||
hdc = get_valid_dc (pWin, TRUE);
|
||||
hdc = get_effective_dc (pWin, TRUE);
|
||||
|
||||
#ifndef _MGSCHEMA_COMPOSITING
|
||||
pcrc = kernel_GetGCRgnInfo ((HWND)pWin)->crgn.head;
|
||||
@@ -770,7 +770,7 @@ static int dskScrollMainWindow (PMAINWIN pWin, PSCROLLWINDOWINFO pswi)
|
||||
__mg_update_secondary_dc(pWin, hdc, real_dc, pswi->rc1, HT_CLIENT);
|
||||
ReleaseDC (real_dc);
|
||||
}
|
||||
release_valid_dc(pWin, hdc);
|
||||
release_effective_dc(pWin, hdc);
|
||||
|
||||
GetClientRect((HWND)pWin, &rcClient);
|
||||
|
||||
|
||||
+4
-4
@@ -2723,10 +2723,10 @@ HDC GUIAPI GetSecondaryDC (HWND hwnd)
|
||||
return pWin->secondaryDC;
|
||||
}
|
||||
else if (pWin->pMainWin->secondaryDC){
|
||||
return get_valid_dc (pWin, FALSE);
|
||||
return get_effective_dc (pWin, FALSE);
|
||||
}
|
||||
#else
|
||||
return get_valid_dc (pWin, TRUE);
|
||||
return get_effective_dc (pWin, TRUE);
|
||||
#endif
|
||||
return HDC_SCREEN;
|
||||
}
|
||||
@@ -2736,7 +2736,7 @@ HDC GUIAPI GetSecondaryClientDC (HWND hwnd)
|
||||
PMAINWIN pWin;
|
||||
pWin = MG_GET_WINDOW_PTR (hwnd);
|
||||
|
||||
return get_valid_dc (pWin, TRUE);
|
||||
return get_effective_dc (pWin, TRUE);
|
||||
}
|
||||
|
||||
void GUIAPI ReleaseSecondaryDC (HWND hwnd, HDC hdc)
|
||||
@@ -2747,7 +2747,7 @@ void GUIAPI ReleaseSecondaryDC (HWND hwnd, HDC hdc)
|
||||
|
||||
if (MG_IS_MAIN_WINDOW(hwnd) && pWin->secondaryDC == hdc)
|
||||
return ;
|
||||
release_valid_dc (pWin, hdc);
|
||||
release_effective_dc (pWin, hdc);
|
||||
}
|
||||
|
||||
BOOL dc_GenerateMemDCECRgn(PDC pdc, BOOL fForce)
|
||||
|
||||
Reference in New Issue
Block a user