Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

about tab controls...

Intel_C_Intel
Employee
322 Views
hello,

i am trying to use tab controls. but compiler gives errors as follows. i already used "use comctl". what might be problem? besides, does it make different to use . instead of %? meaning, "itabmessages.code" or "itabmessages%code" ?

thank you...



...

type (T_NMHDR):: itabmessages
pointer (lptabm, itabmessages)

type (T_TCITEMHEADER) TabHead
type (T_INITCOMMONCONTROLSEX) iccex

iccex%dwSize = sizeof(iccex)
iccex%dwICC = ICC_TAB_CLASSES
Call initCommonControlsEx (iccex)

select case (message)
case (WM_INITDIALOG) ! initialize dialog box
hTab = GetDlgItem(hdlg,IDC_TAB)
if (hTab == 0) then
iret = MessageBox(Null, "error getting tab dialog"C,..)
end if
TabHead%mask = TCIF_TEXT
TabHead%cchTextMax = 12
szTab = "tab1"C
TabHead%pszText = loc(szTab)
iret = SendMessage (hTab, TCM_INSERTITEM , 0, loc(TabHead))
szTab = "tab2"C
TabHead%pszText = loc(szTab)
iret = SendMessage (hTab, TCM_INSERTITEM , 1, loc(TabHead))

hTabs1 = CreateDialogParam(ghInstance,IDD_DLG1,hTab,loc(DetectorDlgProc),0)
hTabs2 = CreateDialogParam(ghInstance,IDD_DLG2,htab,loc(VoltageDlgProc),0)

iret = ShowWindow(hTabs1,SW_SHOW)
call CenterTabs (hTabs1, hTab)
DlgProc = 1
return

case (WM_MOVE)
call CenterTabs (hTabs1, hTab)
call CenterTabs (hTabs2, hTab)
DlgProc = 1
return

case(WM_NOTIFY)
lptabm = lparam
if(itabmessages.code == TCN_SELCHANGE) then
hTab = itabmessages%hwndFrom
iTabNo = SendMessage( hTab ,TCM_GETCURSEL,0,0)
if(iTabNo == 0) then
iret = ShowWindow(hTabs1,SW_SHOW)
iret = ShowWindow(hTabs2,SW_HIDE)
call CenterTabs (hTabs1, hTab)
elseif(iTabNo == 1) then
iret = ShowWindow(hTabs2,SW_SHOW)
iret = ShowWindow(hTabs1,SW_HIDE)
call CenterTabs (hTabs2, hTab)
end if
end if
DlgProc = 1
return

end select
DlgProc = 0 ! Didn't process the message
return
end



Error: This derived type name has not been declared. [T_TCITEMHEADER]
type (T_TCITEMHEADER) TabHead
--------------^
Error: This name does not have a type, and must have an explicit type. [ITABHEAD]
TabHead%mask = TCIF_TEXT


0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
322 Views
Use T_TCITEM instead. T_TCITEMHEADER is new name, not implemented in CVF v.6

Jugoslav
0 Kudos
Intel_C_Intel
Employee
322 Views

was it that tiny stuff? ok, let me see.
thank you Jugoslav
0 Kudos
Reply