![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

The example has a bug - the first line in the word TAB-NOTIFY should
read
LPARAM 2 CELLS + @ TCN_SELCHANGE = IF
(the equal is missing).
TAB-NOTIFY's job is to show the newly selected tab (dialog TABn) while
hiding the other tabs. I've added comments:
0 VALUE HTAB1 \ Window handle of Tab 1
0 VALUE HTAB2 \ Window handle of Tab 2
0 VALUE HWND-TAB \ Window handle of Tab "container"
: TAB-NOTIFY ( -- res )
LPARAM 2 CELLS + @ ( notification code ) TCN_SELCHANGE = ( tab
change? )
IF LPARAM @ ( hWnd ) TCM_GETCURSEL 0 0 SendMessage ( index of tab )
CASE
0 OF HTAB1 ( hWnd to hide ) HTAB2 ( hWnd to show ) ENDOF
1 OF HTAB2 ( hWnd to hide ) HTAB1 ( hWnd to show ) ENDOF
DUP OF HTAB1 ( hWnd to hide ) HTAB2 ( hWnd to show ) ENDOF (
default )
ENDCASE
( hWnd ) SW_SHOW ShowWindow DROP ( show newly selected dialog )
( hWnd ) SW_HIDE ShowWindow DROP ( hide old dialog )
THEN 0 ( res ) ;
So you'll need expand this to show newly your selected dialog while
hiding the other five.
Good luck,
Mike
-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf
Of Tony Senerchia
Sent: Saturday, May 19, 2007 7:21 AM
To: sftalk_at_forth.com
Subject: [sftalk] Tabbed windows
Hi !
I'm working on a program that will be using tabbed windows based off the
Tabbed.f in ~\Lib\Samples\Win32
I'm confused with the TAB-NOTIFY section :
: TAB-NOTIFY ( -- res )
LPARAM 2 CELLS + @ TCN_SELCHANGE IF
LPARAM @ TCM_GETCURSEL 0 0 SendMessage CASE
0 OF HTAB1 HTAB2 ENDOF
1 OF HTAB2 HTAB1 ENDOF
DUP OF HTAB1 HTAB2 ENDOF
ENDCASE SW_SHOW ShowWindow DROP SW_HIDE ShowWindow DROP
THEN 0 ;
for different reasons.
First, I need to have 6 or more tabs and I am not sure how to go about
doing this. I have gotten them to show up (just copies of the second tab
with changes made to the names given - i.e. " Enter District Name :"
becomes "
Enter District Name 6 :" for tab 6) but my tabs don't show up (
obviously I need to edit the TAB-NOTIFY section, but I am finding it a
bit cryptic).
Second - and this happens even when I only have two tabs but change what
is in the first tab - I often find that the information that should be
in tab 1 shows up in tab 2 and vice versa. (The change is persistent,
however. I have not been able to make it change again by clicking).
If someone would be so kind as to explain what's going on in TAB-NOTIFY
or give me some pointers as to how I might be able to incorporate more
(persistent) tabs, it would be greatly appreciated !
Thanks in advance for your time and have a great day !
A. Senerchia
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sun May 20 2007 - 08:25:22 PDT
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:42 PST