In Windows Vista SP2 and in Windows 7 there is a new item in the Start menu: Undock computer
.
In respons to the DBT_QUERYCHANGECONFIG
event I return BROADCAST_QUERY_DENY
but the undocking function proceeds anyway. What is wrong?
Thanks in advance, Lars
A simple WindowProc to illustrate the problem:
LRESULT CMainWindow::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_DEVICECHANGE: {
switch (wParam) {
case DBT_QUERYCHANGECONFIG : {
return BROADCAST_QUERY_DENY;
}
break;
}
break;
}
}
return CFrameWnd::WindowProc(message, wParam, lParam);
}