- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is what was missing:
type (T_NMHDR) itabmessages;POINTER(lptabm,itabmessages)
type (T_NMHDR) itabmessages;POINTER(lptabm,itabmessages)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page