How to make a Dialog based program always on Top?
Hello,
could you please let me know :
how to make a Dialog based program always on Top?
Thanks a lot in advance.
Are you using windows? If so, are you using MFC, or the .NET framework, or straight-up Win32 SDK?
For .NET, the form has a TopMost property you can set to True. For Win32 (or MFC) you can call SetWindowstyle, passing in the HWND for your window and WS_EX_TOPMOST for the style.
~BenDilts( void );
For .NET, the form has a TopMost property you can set to True. For Win32 (or MFC) you can call SetWindowstyle, passing in the HWND for your window and WS_EX_TOPMOST for the style.
~BenDilts( void );
HI BeanDog, sorry to bother you.
I tried, but it doesn't work:
// ModifystyleEx(0, WS_EX_TOPMOST);
HWND hWnd = GetSafeHwnd ();
SetWindowLong(m_hWnd, GWL_EXstyle, WS_EX_TOPMOST);
if it is possible to let me know why?
I tried, but it doesn't work:
// ModifystyleEx(0, WS_EX_TOPMOST);
HWND hWnd = GetSafeHwnd ();
SetWindowLong(m_hWnd, GWL_EXstyle, WS_EX_TOPMOST);
if it is possible to let me know why?
Thank you Dave Hunt!
But the SetWindowPos doesn't work either:
::SetWindowPos(m_hWnd, HWND_TOPMOST,
0, 0, 800, 605, SWP_NOZORDER);
But the SetWindowPos doesn't work either:
::SetWindowPos(m_hWnd, HWND_TOPMOST,
0, 0, 800, 605, SWP_NOZORDER);
That's because you specified SWP_NOZORDER. That parameter told the function to ignore your HWND_TOPMOST.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement