CreateWindow() "hidden" flag

BlitzPlus Forums/BlitzPlus Programming/CreateWindow() "hidden" flag

JoshK(Posted 2005) [#1]
I would like request that a "hidden" flag be added to the BlitzPlus CreateWindow() routine. I am getting ready to master the CD for my map editor. When the program starts up, a great many windows are visible as they are created and hidden. Sometimes, if another application window has the focus, the created windows don't get hidden at all. This is an unprofessional blemish to an otherwise polished application. I want to fix this, and am willing to pay you for your time, even if it just means compiling an unofficial patch.


Thank you.
-Josh


NetGamer(Posted 2005) [#2]
Set their initial location to 'off screen' using negative coordinates.


JoshK(Posted 2005) [#3]
Some computers force the window to be onscreen. Additionally, this does not help with the HideGadget() failture that can happen when another program has the focus.


Panno(Posted 2005) [#4]
get the handle from your b+_createwindow
test if it has focus and if not
send a message to hide him ,this will help (somtimes) :)


sswift(Posted 2005) [#5]
Maybe if you make the window really small it will be hidden?

Maybe you could avoid creating those other windows when the program start up, until they are actually needed? This would speed up the startup, and would only slow down displaying the window the first time, and probably not by much.


JoshK(Posted 2005) [#6]
For various reasons, all of these suggestions do not solve the issue.


Kev(Posted 2005) [#7]
halo, when you have created the main window, create the other windows small and behind the main window. then hide them. just make the main window be on top. this might work.

kev


Panno(Posted 2005) [#8]
give me a sample i will test here


JoshK(Posted 2005) [#9]
Unfortunately, I cannot reproduce this in a simple program.


sswift(Posted 2005) [#10]
If you're willing to pay, why don't you just contact Mark directly and tell him? I don't think he reads every message here.


xlsior(Posted 2005) [#11]
Set their initial location to 'off screen' using negative coordinates.


One obvious problem with that is that they very well may show up on dual monitor systems... I have two screens myself, with the primary one being on the right... so negative-X will show up on the secondary screen.


Baley(Posted 2005) [#12]
That is an old request. I don't see why that little thing hasn't been added so far. It's very useful and simple.


Regular K(Posted 2006) [#13]
What I always did was make the window at pos -1024,-1024, hide the window then resize/reposition the window to where/what I want it to be.


NetGamer(Posted 2006) [#14]
I noticed someone posted in the codes section some helper routines which include hiding and revealing a window:

Function HideWindow(hWnd)
	ShowWindowA(hWnd,0)
End Function

Function ShowWindow(hWnd)
	ShowWindowA(hWnd,5)
End Function

.lib "yourfunc.bbh"
HideWindow(hWnd%)
ShowWindow(hWnd%)

.lib "user32.dll"
ShowWindowA%(hWnd%,com%):"ShowWindow"