Hello to everybody.

I want to remove the scroll bars of my main form.
This main form is a MDI fprm (parent).

AutoScroll is set to FALSE.

Also
      VertScrollBar.Visible:= FALSE;
      HorzScrollBar.Visible:= FALSE;





The only way is to do this:

function ClientWindowProc(wnd: HWND; msg: Cardinal; wParam, lparam: 
Integer): Integer; stdcall;       { REMOVE THE SCROLL BARS }
Var f: Pointer;                                                           
Begin
 f:= Pointer(GetWindowLong (wnd, GWL_USERDATA) );
 if Msg=
   WM_NCCALCSIZE then
       if  (GetWindowLong( wnd, GWL_STYLE) AND (WS_HSCROLL OR 
WS_VSCROLL)) <> 0 
       then SetWindowLong( wnd, GWL_STYLE, GetWindowLong( wnd, GWL_STYLE 
) AND NOT  (WS_HSCROLL or WS_VSCROLL));
 Result:= CallWindowProc( f, wnd, msg, wparam, lparam );
end; 


but I don't like it because it is a nightmare at debugging. Every time I 
run my program step by step, it jumps to this function to process that 
message.
I also think here I may loose a lot of CPU.



There is a simple way to hide the scroll bars?
Should I declare a new custom component derived from TForm and 
capture/process the messages in that new component?

__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to