We help IT Professionals succeed at work.

Assertion on CWnd::MoveWindow()

Koensayr
Koensayr asked
on
Medium Priority
505 Views
Last Modified: 2013-11-20
Hi,

I get an assertion when I move a control window in a dialog box in response to the first WM_SIZE message the dialog receives. The assertion tells me that the control is not a valid window. It looks like the control is not fully created when I receive the message.

Can someone explain me what's going on. There is obviouly something I don't catch.

Thanks for your help.
Comment
Watch Question

Commented:
All right. All control window are not valid when dialog window receives WM_SIZE message first time. Do what you want in OnInitDialog method or at first WM_PAINT message receiving.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Just to make sure I understand everything

What you're saying is that it is normal to receive a WM_SIZE message before OnInitDialog is called and there's nothing I can do about it? right.

Thanks
Eric


Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.