How would you resize a listbox to match a dialog using PbForms?
This is a very simple program to view a log file.
This is a very simple program to view a log file.
'CALL CtrlRedraw(hWnd, %FALSE) 'Redraw off 'Do something 'CALL CtrlRedraw(hWnd, %TRUE) 'Redraw on, plus refresh FUNCTION CtrlRedraw( BYVAL hWnd AS LONG, BYVAL rDraw AS LONG) AS LONG CALL SendMessage(hWnd, %WM_SETREDRAW, rDraw, 0) IF rDraw THEN InvalidateRect hWnd, BYVAL %NULL, 0 UpdateWindow hWnd END IF END FUNCTION
CASE %WM_SIZE 'Size listbox to client area at 0,0 or other position using DDT IF CBWPARAM <> %SIZE_MINIMIZED THEN 'CBWPARMAM = wParam LOCAL ClientX, ClientY, ControlX, ControlY AS LONG DIALOG GET CLIENT CBHNDL TO ClientX, ClientY 'size of client area CONTROL SET LOC CBHNDL, %IDC_LISTBOX1, 0,0 'optional CONTROL GET LOC CBHNDL, %IDC_LISTBOX1 TO ControlX, ControlY 'get location of control CONTROL SET SIZE CBHNDL, %IDC_LISTBOX1, ClientX-ControlX, ClientY-ControlY 'resize to fit client area END IF EXIT FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment