Re: Win32Libv50: How make window invisible (initially?)? +

new topic     » topic index » view thread      » older message » newer message

> From: Dan B Moyer
>
>
> Maybe there is some set of "styles" which when or'd will give the
> fundamental properties of a modal window, but *not* include
> "WS_VISIBLE"
> that would work with "openWindow"?
>

You might try using SetWindowPos:

-- Tested code
-- You can find these constants and many more in winconst.ew in the
archives:
constant
HWND_BOTTOM  = 1,
HWND_NOTOPMOST = (-2),
HWND_TOP = 0,
HWND_TOPMOST = (-1),

SWP_DRAWFRAME = 32,
SWP_FRAMECHANGED = 32,
SWP_HIDEWINDOW = 128,
SWP_NOACTIVATE = 16,
SWP_NOCOPYBITS = 256,
SWP_NOMOVE = 2,
SWP_NOSIZE = 1,
SWP_NOREDRAW = 8,
SWP_NOZORDER = 4,
SWP_SHOWWINDOW = 64,
SWP_NOOWNERZORDER = 512,
SWP_NOREPOSITION = 512,
SWP_NOSENDCHANGING = 1024

-- replace your call to moveWindow with this:
integer ok
ok = c_func( xSetWindowPos, { getHandle( aModalWindow ), HWND_TOP, posx,
posy, xsize, ysize, SWP_HIDEWINDOW + SWP_NOACTIVATE)

Then, you can change  OnClick_Tut1Button() to:

procedure OnClick_Tut1Button()
  center_win(aModalWindow)  -- center it
  openWindow( aModalWindow, Modal )
end procedure


-- End Code

Now you're flicker free.

Matt

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu