(Mike Mitchell)
11/1/2011 6:25:00 PM
On Tue, 1 Nov 2011 16:29:53 -0000, "DaveO" <djo@dial.pipex.com> wrote:
>
>"MM" <kylix_is@yahoo.co.uk> wrote in message
>news:n560b7lm29c58h2jq6862o2t4j33bqh5nb@4ax.com...
>> VB6: I've subclassed WM_GETMINMAXINFO to restrict form to allow only
>> vertical resizing, but I still get a double-headed resize arrow when I
>> pass the mouse across the right-hand edge of the form.
>>
>> How can I hide or suppress the resize arrow when user attempts to
>> resize horizontally?
>>
>> MM
>
>You'll want thses declarations
>
>Private Const WM_NCHITTEST As Long = &H84
>Private Const HTBOTTOM As Long = 15
>Private Const HTBOTTOMRIGHT As Long = 17
>Private Const HTBORDER As Long = 18
>Private Const HTBOTTOMLEFT As Long = 16
>Private Const HTLEFT As Long = 10
>Private Const HTRIGHT As Long = 11
>Private Const HTTOP As Long = 12
>Private Const HTTOPLEFT As Long = 13
>Private Const HTTOPRIGHT As Long = 14
>
>Add this to your routine, you'll need to replace the XXXX and xxxxxx with
>whatever you use
>This will prevent side to side cursor from showing and replace the corner
>ones with the up/down one.
>This only allows vertical resizing I'll let you work out how to allow only
>horizontal sizing
>
> Case WM_NCHITTEST
> WinMsg_XXXX = CallWindowProc(xxxxxxx), hWnd, Msg, wp, lp)
> Select Case WinMsg_XXXX
> Case HTLEFT, HTRIGHT
> WinMsg_XXXX = HTBORDER
> Case HTTOPLEFT, HTTOPRIGHT
> WinMsg_XXXX = HTTOP
> Case HTBOTTOMLEFT, HTBOTTOMRIGHT
> WinMsg_XXXX = HTBOTTOM
> End Select
>
>Have fun
>DaveO
O Mi God! (Wish I never asked... ;)
Okay, this is something for the ToDo list...
Thanks!
MM