On Oct 3, 2006, at 5:16 PM, Carlo Rubini wrote:

I have some windows (win32 platform only) that require to be minimized only. Unfortunately RB 5.5.5 (I do not know about current versions) provides only a zoom property that places both the zoom and minimize widgets in a given window.

At present I make use of this workaround: in the maximize event I raise a flag and set to a property the left and top position of the window, and in the moved event, when I chach the flag I re-set the left, top, width and heigh of the window. Something similar has to be made in the minimize event. The result of the operation is ugly, since clicking the maximize widget the window expands and then goes back to its original size and position; hiding the window during this process does not work.

Is there a way by code eto neutralize or disable or remove the maximize widget while at the same time keeping the minimize widget working?

Suggestions welcome (as I said, win32 only)

Thanks,
--
Carlo

You can use the following to have a window which has working close and minimize icons and a disabled maximize icon.


  #if TargetWin32

   dim Win32WinStyle as integer

Declare Function GetWindowLongW Lib "user32.dll" (m_hWnd as integer, index as integer) as integer Declare Sub SetWindowLongW Lib "user32.dll" (m_hWnd as integer, index as integer, GWL_STYLE as integer)

    Win32WinStyle = GetWindowLongW(me.WinHWND, -16)
    Win32WinStyle = BitWiseAnd(Win32WinStyle,&hFFFEFFFF)
    SetWindowLongW(me.WinHWND, -16, Win32WinStyle)

    if not self.zoomIcon then
      MsgBox "Build Win32 version with zoomIcon enabled"
    end

  #endif


I hope that helps.

Malcolm Smith

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to