Avoiding visibility of win32 window


In C++/win32 i'm creating a window with
After creation i would like it to be invisible by default, so i can move it to the correct position and, depending on other factors, make it visible or not.
At the moment, i can make it invisible with a call to SetWindowPos(...), but only after creation. So it flickers.

Any ideas?

Kind Regards, Daniel Dekkers
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi DoZo1971,

with CreateDialogParam you use a dialog resource template, right? Then simpliest is to un-set the WS_VISIBLE style in the dialog's resource template. Just set 'Visible' to 'false' in the dialog's properties.

Hope that helps,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DoZo1971Author Commented:
Ok, that works, thanks.
Only thing is that at some point in the future i'll probably spend a long time debugging why the window isn't visible ("because you turned it off"). I would rather see it in the code, but ok...
Hm - you could have asked for this before grading with 'B' ...
DoZo1971Author Commented:
Oh, ok…

B as in... "Correct solution to the problem given but raises possible problems in the future so not a perfect A" (I only get three choices). It's not personal, you can't help it, it's the separation of code and "properties" of dialog entities.

Don't really know the ins and outs of the experts-exchange scoring system, sorry. What is etiquette? I just keep asking until I give an A? One never gives B's or C's? If the perfect answer doesn't come, you don't grade? Looking at the visuals of the website (with medals and stuff) I now realize there is a personal track record where a B is a bad thing, not a "less good" thing. Didn’t realize, sorry.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.