windows message - when the window was displayed
-
Hello, I am using dialog boxes and I need to capture window message when the window/dialog was displayed I tried WM_SHOWWINDOW but the help says: WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown. I can not fint the proper message.Can you give me a hind? Thank you very much.
-
Hello, I am using dialog boxes and I need to capture window message when the window/dialog was displayed I tried WM_SHOWWINDOW but the help says: WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown. I can not fint the proper message.Can you give me a hind? Thank you very much.
daavena wrote:
displayed
What do you mean by 'displayed' - created, shown, redrawn?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
Hello, I am using dialog boxes and I need to capture window message when the window/dialog was displayed I tried WM_SHOWWINDOW but the help says: WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown. I can not fint the proper message.Can you give me a hind? Thank you very much.
WM_WINDOWPOSCHANGING? Or you could even could WM_PAINT - that was when the window was actually shown to people! So it depends on what you mean... Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
daavena wrote:
displayed
What do you mean by 'displayed' - created, shown, redrawn?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
WM_WINDOWPOSCHANGING? Or you could even could WM_PAINT - that was when the window was actually shown to people! So it depends on what you mean... Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
-
when I click on the button I need: show window/dialog with message "Loading profile it can take several minutes" inside and than when the window is shown(is visible) I need to run the function - but only once.
There's no window message that you only get when the window is shown the first time. Instead, catch WM_SHOWWINDOW. Maintain a flag that tells you if your message has been shown. You can use this flag to tell you whether you should show your message or not - something like:
void CMyWindow::OnShowWindow(BOOL bShow, UINT nStatus)
{
if (bShow && !m_bShownMyMessage)
{
// show the message
m_bShownMyMessage = TRUE;
}// Do other stuff
}Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
There's no window message that you only get when the window is shown the first time. Instead, catch WM_SHOWWINDOW. Maintain a flag that tells you if your message has been shown. You can use this flag to tell you whether you should show your message or not - something like:
void CMyWindow::OnShowWindow(BOOL bShow, UINT nStatus)
{
if (bShow && !m_bShownMyMessage)
{
// show the message
m_bShownMyMessage = TRUE;
}// Do other stuff
}Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
Thaks for reply, WM_SHOWWINDOW WPARAM wParam LPARAM lParam; Parameters wParam Specifies whether a window is being shown. If wParam is TRUE, the window is being shown. If wParam is FALSE, the window is being hidden. lParam is still 0 when I capture WM_SHOWWINDOW so wParam is always 1 -the window is being shown. My function always runs first. Then I see the window. This function takes a time - 10sec, that is reason why I need to see the window first. WM_SHOWWINDOW message is called only once. I think it is not possible to do that.