Works very, very well now
This commit is contained in:
@@ -58,10 +58,13 @@ void Application::setFocus(bool focus)
|
|||||||
{
|
{
|
||||||
if(focus)
|
if(focus)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "NO", "NO", MB_OK);
|
ShowWindow(_propWindow->_hwndProp, SW_SHOW);
|
||||||
SetWindowPos(_propWindow->_hwndProp, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
SetWindowPos(_propWindow->_hwndProp, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetWindowPos(_propWindow->_hwndProp, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||||
}
|
}
|
||||||
else SetWindowPos(_propWindow->_hwndProp, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Application::Application(HWND parentWindow) { //: GApp(settings,window) {
|
Application::Application(HWND parentWindow) { //: GApp(settings,window) {
|
||||||
|
|||||||
5
main.cpp
5
main.cpp
@@ -74,10 +74,9 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
app->resizeWithParent(hwnd);
|
app->resizeWithParent(hwnd);
|
||||||
break;
|
break;
|
||||||
case WM_ACTIVATEAPP:
|
case WM_ACTIVATE:
|
||||||
if(wParam == FALSE) app->setFocus(false);
|
if(wParam > WA_INACTIVE) app->setFocus(false);
|
||||||
else app->setFocus(true);
|
else app->setFocus(true);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
return DefWindowProc(hwnd, msg, wParam, lParam);
|
return DefWindowProc(hwnd, msg, wParam, lParam);
|
||||||
|
|||||||
Reference in New Issue
Block a user