NTK and The NTK Project
are properties of Jn Dechereux
Home | Documentation | FAQ.
Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.
. . . STATIC FUNCTION DoEventHandler(hWnd,nMsg,nwParam,nlParam) Local nW, nH, aWndSize, aMinMaxInfo Local nMinWndWidth := 320 // min. w. boundary Local nMinWndHeight := 200 // min. h. boundary DO CASE CASE nMsg == WM_GETMINMAXINFO // get the window dimensions in screen coordinates aWndSize := NTK_GetWindowRect( hWnd ) // determine the window's actual width and height nW := aWndSize[RECT_Right] - aWndSize[RECT_Left] nH := aWndSize[RECT_Bottom] - aWndSize[RECT_Top] // ---------------------------------------------------------------------------- // prevent user from resizing the window outside the minimum boundaries // ---------------------------------------------------------------------------- IF nW <= nMinWndWidth .OR. nH <= nMinWndHeight // Convert the MINMAXINFO structure into an xhb array aMinMaxInfo := NTK_MinMaxInfo2A( nlParam ) If nW <= nMinWndWidth // specify the new minimum width aMinMaxInfo[ MINMAXINFO_ptMinTrackSizeX ] := nMinWndWidth EndIf If nH <= nMinWndHeight // specify the new minimum height aMinMaxInfo[ MINMAXINFO_ptMinTrackSizeY ] := nMinWndHeight EndIf // return the MINMAXINFO structure back to MS-Windows NTK_SetMinMaxInfo( nlParam, aMinMaxInfo ) ENDIF // ---------------------------------------------------------------------------- RETURN( 0 ) ENDCASE RETURN NTK_DefWindowProc(hWnd,nMsg,nwParam,nlParam) . . .
1 to 4 of 4