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

Tab control question

davidgraham
Beginner
654 Views
I'm creating a tab control and following Norman Lawrence's example in his book Compaq Visaul Fortran - a guide to windows applications.

He describes how to identify when the user selects a different tab.
He says applications use the lParam parameter of the WM_NOTIFY to obtain the address of the NMHDR structure. But I don't follow how he gets from lParam to itabmessages. Is lptabm integer*4 and itabmessages type(NMHDR)?

case(WM_NOTIFY)
lptabm = lparam

!! is something missing here, or have the variables not been defined correctly?

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
0 Kudos
1 Reply
davidgraham
Beginner
654 Views
This is what was missing:

type (T_NMHDR) itabmessages;POINTER(lptabm,itabmessages)
0 Kudos
Reply