Hello Joaquim
> PROCEDURE TMainForm.FormDblClick(Sender: TObject);
> VAR
> LongVal :LONGINT;
> BEGIN
> LongVal:=GetWindowLong(Handle, GWL_STYLE);
> LongVal:=Longval XOR ws_Caption;
> SetWindowLong(Handle, GWL_STYLE, LongVal);
> Refresh;
> END;
> What am I doing wrong.. ?
AFAIK The refresh will invalidate the client window. What You nead to do is
to invalidate the entire window, including the NC_ parts (NonClient)
It's costomary (?) for toplevel windows to have a border/caption. Under which
circumstances or why do yoy want to change that?
SetWindowText(handle,Caption) does work when not fiddeling with style, it
might invalidate the nonlcient parts.
Second method might be the SetWindowPos(....), the SWP_x flags gives a lot of
options.
Otherwise you might consider the WM_NCx messages. There might be one that
will do the trick.
But again, what are you trying to accompilsh. The right approch might be
simpler!
MVH -hw-
---
---------------
* Origin: Henrik's OS/2 point. DKEGHHW0@IBMMAIL.COM FidoNet: (2:238/64.15)
|