• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

Avoiding visibility of win32 window

Hi,

In C++/win32 i'm creating a window with
CreateDialogParam(...)
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
0
DoZo1971
Asked:
DoZo1971
  • 2
  • 2
1 Solution
 
ZoppoCommented:
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,

ZOPPO
0
 
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...
0
 
ZoppoCommented:
Hm - you could have asked for this before grading with 'B' ...
0
 
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now