Dear list,

I've seen this problem solved here on the list before, and the answers came
with som nice link to API ressources. What I have NOT been able to find out
from these is how to remove the Restore button from a maximized window -
anyone know how to????

Kind regards 

Peter

Peter Ketting
GIS Consultant


> -----Oprindelig meddelelse-----
> Fra:  Anssi Joutsiniemi [SMTP:[EMAIL PROTECTED]]
> Sendt:        15. december 1999 17:03
> Til:  Rinus Deurloo; [EMAIL PROTECTED]
> Cc:   [EMAIL PROTECTED]
> Emne: Re: MI how to remove a map window's minimize button?
> 
> Hello Rinus,
> 
> If you want to remove max/min buttons from window you actually have to
> change the window style. I included a small app to show how to do that. If
> you have any question just let me know.
> 
> By the way KGM utility API_TEST  works as designed. It removes the
> menuitems from systemmenu (from top left of your window) which is usefull
> too, but not what you were looking for.;-)
> 
> Regards,
>     Anssi
> 
> 
> '*************************************************************************
> *******************************
> 
> Include "mapbasic.def"
> Define GWL_STYLE -16
> 
> Declare Sub Main
> Declare Sub RemoveButtons
> Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" 
> (ByVal hwnd As Integer, ByVal nIndex As Integer) As Integer
> Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" 
> (ByVal hwnd As Integer, ByVal nIndex As Integer, ByVal dwNewLong As
> Integer) As Integer
> 
> Sub Main
> 
>  Create Menu "API" As
>   "Remove max && min buttons"  Calling RemoveButtons
> 
>  Alter Menu Bar Add "API"
> End Sub
> 
> Sub RemoveButtons
>  Dim hwnd, iDummy, iStyle as Integer
> 
>  If WindowInfo(FrontWindow(),WIN_INFO_TYPE) =
> Any(WIN_MAPPER,WIN_BROWSER,WIN_LAYOUT) Then
>   hwnd = WindowInfo(FrontWindow(),WIN_INFO_WND)
> 
>   iStyle = GetWindowLong(hwnd, GWL_STYLE)
> 
>   iStyle = iStyle - &H10000
>   iDummy = SetWindowLong(hwnd, GWL_STYLE, iStyle)
> 
>   iStyle = iStyle - &H20000
>   iDummy = SetWindowLong(hwnd, GWL_STYLE, iStyle)
>  End If
> 
> End Sub
> 
> '*************************************************************************
> *******************************
> 
> ----- Original Message ----- 
> From: Rinus Deurloo <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 15, 1999 1:20 PM
> Subject: MI how to remove a map window's minimize button?
> 
> 
> > Hi All,
> > 
> > How can I remove the minimize button in a map window's 
> > title bar from within MapBasic?
> > I am using Mapinfo/MapBasic 5.5 under Windows98.
> > The KGM utility API_TEST (version 4.01) does not work.
> > 
> > Thanks in advance,
> > Rinus Deurloo.
> > 
> > ----------------------------------------------------------------------
> > To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> > "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
> 
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to