Article ID: 168123
Article Last Modified on 10/2/2003
HWND CWindow::GetTopLevelWindow() const
{
...
while(hWndTmp != NULL)
{
hWndTmp = (::GetWindowLong(hWndParent, GWL_STYLE) & WS_CHILD) ?
::GetParent(hWndParent) :
::GetWindow(hWndParent, GW_OWNER);
hWndParent = hWndTmp;
}
return hWndParent;
}
to the following:
HWND CWindow::GetTopLevelWindow() const
{
...
while(hWndTmp != NULL)
{
// Modification
hWndParent = hWndTmp;
hWndTmp = (::GetWindowLong(hWndParent, GWL_STYLE) & WS_CHILD) ?
::GetParent(hWndParent) :
::GetWindow(hWndParent, GW_OWNER);
}
return hWndParent;
}
Additional query words: GetTopLevelWindow NULL kbatl210bug kbctrl kbvc600fix kbserver kbinternet
Keywords: kbbug kbfix kbinprocsvr kbvc600fix kbserver kbatl300fix kbatlwc KB168123