#PBFORMS Created
#COMPILE EXE
#DIM ALL
#PBFORMS Begin Includes
#IF NOT %DEF(%WINAPI)
#INCLUDE "WIN32API.INC"
#ENDIF
#IF NOT %DEF(%COMMCTRL_INC)
#INCLUDE "COMMCTRL.INC"
#ENDIF
#INCLUDE "PBForms.INC"
#PBFORMS
End Includes
#PBFORMS Begin Constants
'%IDD_DIALOG1 = 101
%IDM_FILE_NEWFile = 1001
%IDM_HELP_CONTENTS = 1002
%IDM_HELP_ABOUT = 1003
%IDC_SYSTABCONTROL32_1 = 1004
%IDC_BUTTON1 = 1007
%IDC_BUTTON2 = 1008
%IDC_BUTTON3 = 1009
%IDC_TEXTBOX1=1100
%IDC_SYSTABCONTROL32_2 = 1101
#PBFORMS
End Constants
GLOBAL hTabPage AS DWORD
GLOBAL test AS DWORD
DECLARE CALLBACK FUNCTION PageCallback1
DECLARE FUNCTION AttachMENU1(BYVAL hDlg AS DWORD) AS DWORD
DECLARE CALLBACK FUNCTION ShowDIALOG1Proc()
DECLARE FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG
#PBFORMS Declarations
FUNCTION PBMAIN()
ShowDIALOG1 %HWND_DESKTOP
END FUNCTION
CALLBACK FUNCTION ShowDIALOG1Proc()
SELECT CASE CBMSG
CASE %WM_COMMAND
SELECT CASE CBCTL
END SELECT
END SELECT
END FUNCTION
FUNCTION AttachMENU1(BYVAL hDlg AS DWORD) AS DWORD
#PBFORMS Begin Menu %IDR_MENU1->%IDD_DIALOG1
LOCAL hMenu AS DWORD
LOCAL hPopUp1 AS DWORD
LOCAL hTab AS DWORD
LOCAL TitleText AS STRING
LOCAL TI AS TC_ITEM
MENU NEW BAR TO hMenu
MENU NEW POPUP TO hPopUp1
MENU ADD POPUP, hMenu, "File", hPopUp1, %MF_ENABLED
MENU ADD STRING, hPopUp1, "
New File", %IDM_FILE_NEWFile, %MF_ENABLED
MENU ATTACH hMenu, hDlg
#PBFORMS
End Menu
FUNCTION = hMenu
END FUNCTION
CALLBACK FUNCTION PageCallback1
LOCAL hDC AS LONG, iColors AS LONG
SELECT CASE CBMSG
CASE %WM_COMMAND
IF CBCTLMSG = %BN_CLICKED THEN
END IF
END SELECT
END FUNCTION
FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG
LOCAL lRslt AS LONG
LOCAL hTab AS DWORD
LOCAL TitleText AS STRING
LOCAL TI AS TC_ITEM
LOCAL BkColor AS LONG
#PBFORMS Begin Dialog %IDD_DIALOG1->
LOCAL hDlg AS DWORD
 
IALOG NEW hParent, "FileMon", 200, 100, 320, 257, %WS_POPUP OR _
%WS_BORDER OR %WS_DLGFRAME OR %WS_SYSMENU OR %WS_MINIMIZEBOX OR _
%WS_CLIPSIBLINGS OR %WS_VISIBLE OR %DS_MODALFRAME OR %DS_3DLOOK OR _
%DS_NOFAILCREATE OR %DS_SETFONT, %WS_EX_WINDOWEDGE OR _
%WS_EX_CONTROLPARENT OR %WS_EX_LEFT OR %WS_EX_LTRREADING OR _
%WS_EX_RIGHTSCROLLBAR, TO hDlg
CONTROL ADD "SysTabControl32", hDlg, %IDC_SYSTABCONTROL32_1, _
"SysTabControl321", 5, 5, 310, 220, %WS_CHILD OR %WS_VISIBLE OR _
%WS_TABSTOP OR %TCS_SINGLELINE OR %TCS_RIGHTJUSTIFY, %WS_EX_LEFT OR _
%WS_EX_LTRREADING
AttachMENU1 hDlg
#PBFORMS
End Dialog
' Глюкищееееееееееее !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!???????????????????????????????????????????
'CONTROL ADD BUTTON, hDlg, %IDC_BUTTON3, "3", 10, 230, 60, 15
CONTROL HANDLE hDlg, %IDC_SYSTABCONTROL32_1 TO hTab
InitCommonControls
TitleText = "Files"
TI.Mask = %TCIF_TEXT
TI.iImage = -1
TI.pszText = STRPTR(TitleText)
hTabPage = TabCtrl_InsertItem(hTab, 0, TI)
TitleText = "
LL"
TI.pszText = STRPTR(TitleText)
CALL TabCtrl_InsertItem(hTab, 1, TI)
TitleText = "Others"
TI.pszText = STRPTR(TitleText)
CALL TabCtrl_InsertItem(hTab, 2, TI)
 
IALOG NEW hTab, "Page", 1, 13, 305, 205, %WS_CHILD OR %DS_CONTROL OR %WS_DLGFRAME, TO hTabPage
CONTROL ADD BUTTON, hTabPage, %IDC_BUTTON1, "1", 175, 183, 60, 15
CONTROL ADD BUTTON, hTabPage, %IDC_BUTTON2, "2", 240, 183, 60, 15
 
IALOG SHOW MODELESS hTabPage CALL PageCallback1
 
IALOG SHOW MODAL hDlg, CALL ShowDIALOG1Proc TO lRslt
FUNCTION = lRslt
END FUNCTION