9097 2001-10-09 01:08:23 <<Programming Windows>>中第十九章MDI例子中:
FrameWindow消息循环:
case IDM_WINDOW_CLOSEALL: // Attempt to close all children
EnumChildWindows (hwndClient, CloseEnumProc, 0) ;
return 0 ;
其中回叫函数为:
BOOL CALLBACK CloseEnumProc (HWND hwnd, LPARAM lParam)
{
if (GetWindow (hwnd, GW_OWNER)) // Check for icon title
return TRUE ;
SendMessage (GetParent (hwnd), WM_MDIRESTORE, (WPARAM) hwnd, 0) ;
if (!SendMessage (hwnd, WM_QUERYENDSESSION, 0, 0))
return TRUE ;
SendMessage (GetParent (hwnd), WM_MDIDESTROY, (WPARAM) hwnd, 0) ;
return TRUE ;
}
这里的 if (GetWindow (hwnd, GW_OWNER)) return TRUE ,书中解释是:“This is not done for the icon title window, indicated by a non-NULL return value from GetWindow with the GW_OWNER argument. ”
请高手赐教:1.到底什么是icon title window?
2.为什么对所有的子窗口GetWindow (hwnd, GW_OWNER)都返回NULL?他们的OWNER不就是ClientWindow吗?怎么会是空呢?