
Todd
------------------
'-----TabEx.bas---- #COMPILE EXE #INCLUDE "commctrl.inc" #INCLUDE "TabDDT.inc" GLOBAL hDlg AS LONG GLOBAL TEXT AS STRING GLOBAL hTabDlg1 AS LONG GLOBAL hTabDlg2 AS LONG GLOBAL hTabDlg3 AS LONG %IDC_TAB = 1000 DECLARE CALLBACK FUNCTION MainDlgProc FUNCTION PBMAIN LOCAL th AS TABHDR LOCAL hTab AS LONG ' Main dialog DIALOG NEW 0, "DDT - Tab Example",,,400, 300, %WS_SYSMENU OR %WS_MINIMIZEBOX OR %DS_CENTER TO hDlg ' Tab control hTab = TabCtrl(hDlg, %IDC_TAB, 20, 20, 300, 200) ' Tab - dialog 1 DIALOG NEW hTab, "Tab nr. 1",,,400, 300, %WS_CHILD OR %WS_VISIBLE TO hTabDlg1 CONTROL ADD LABEL, hTabDlg1, -1, "This is Tab 1", 5,25,50,14 ' Tab - dialog 2 DIALOG NEW hTab, "Tab nr. 2",,,400, 300, %WS_CHILD OR %WS_VISIBLE TO hTabDlg2 CONTROL ADD LABEL, hTabDlg2, -1, "This is Tab 2", 5,5,50,14 ' Tab - dialog 3 DIALOG NEW hTab, "Tab nr. 3",,,400,300, %WS_CHILD OR %WS_VISIBLE TO hTabDlg3 CONTROL ADD BUTTON, hTabDlg3, 100, "A big button",50,50, 90,90 th.lID = %IDC_TAB th.cDialogs = 3 th.DlgHdr(0).hTabDlg = hTabDlg1 th.DlgHdr(0).lpfnCallback = CODEPTR(cbTab1) th.DlgHdr(1).hTabDlg = hTabDlg2 th.DlgHdr(1).lpfnCallback = CODEPTR(cbTab2) th.DlgHdr(2).hTabDlg = hTabDlg3 th.DlgHdr(2).lpfnCallback = CODEPTR(cbTab3) InitTabControl hDlg, th DIALOG SHOW MODAL hDlg CALL MainDlgProc END FUNCTION CALLBACK FUNCTION MainDlgProc SELECT CASE CBMSG CASE %WM_NOTIFY OnTabNotify CBHNDL, CBLPARAM CASE %WM_COMMAND SELECT CASE LOWRD(CBWPARAM) END SELECT END SELECT END FUNCTION CALLBACK FUNCTION cbTab1 BEEP SELECT CASE CBMSG CASE %WM_INITDIALOG CASE %WM_COMMAND SELECT CASE LOWRD(CBWPARAM) END SELECT END SELECT END FUNCTION CALLBACK FUNCTION cbTab2 BEEP SELECT CASE CBMSG CASE %WM_INITDIALOG CASE %WM_COMMAND SELECT CASE LOWRD(CBWPARAM) END SELECT END SELECT END FUNCTION CALLBACK FUNCTION cbTab3 BEEP SELECT CASE CBMSG CASE %WM_INITDIALOG CASE %WM_COMMAND SELECT CASE LOWRD(CBWPARAM) END SELECT END SELECT END 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.
Leave a comment: