Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Output current selected tab name (SysTabControl32)
#3
OK, Thank you!

EDIT, update for others. There is a function on the forum that does the heavy work for you, made by the man himself (no not me):

Removing Tabs from tab control

Function TC_GetTabText_
Code:
Copy      Help
;/
function! htb item str&s

;Gets tab control item text.
;Returns 1 if not empty, 0 if empty.

;htb - SysTabControl32 handle
;item - 0-based tab index
;s - receives text.

TCITEMW TabText.mask=WINAPI.TCIF_TEXT
BSTR b.alloc(260)
TabText.pszText=b
TabText.cchTextMax=260
SendMessageW(htb TCM_GETITEMW item &TabText)
s.ansi(b)
ret s.len!=0

To call the function:
Function tabtest
Code:
Copy      Help
TC_GetTabText_(id(3 hDlg) _i _s)
- id(3 hDlg): SysTabControl32 handle, don't use '3' look in the green commented part of your dialog declaration function look for 'SysTabControl32 '
- _i: index of the tab
- _s: contains name of the tab

It helps if you first download and setup the Windows API Declerations. How to setup is explained by the man himself (no...not me):
More Windows API declarations for QM


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)