Announcement

Collapse
No announcement yet.

Tab Control Notifications

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cliff Nichols
    replied
    Gavin...If you think of Macros as "Replace my code with a function" at compile time that may help

    may not...but it depends on how you think coding wise

    Leave a comment:


  • Gavin Fitz-Henry
    replied
    Thank you Miahael,
    More study required on my behalf.
    I shall refer to the Windows Help for SDK and the COMMCTRL.inc file and learn how to use these Macros.

    Gavin

    Leave a comment:


  • Michael Mattias
    replied
    >As stated, Notifications are sent to the OWNER window, not the tab dialog!

    What can be handy here is to save a handle to the tab's dialog ("CBHNDL") in the Tab Item's "lparam" member.

    Here's a couple of functions I created to deal with the "item lparam" for tab controls..

    Code:
    FUNCTION TabCtrl_SetItemlParam (BYVAL hWnd AS LONG, BYVAL iRow AS LONG, BYVAL lparam AS LONG) AS LONG
        LOCAL tci AS TC_ITEM
    
        tci.Mask         = %TCIF_PARAM
        tci.lparam       = lparam
        TabCtrl_SetItem    hWnd, iRow, tci
    END FUNCTION
    
    FUNCTION TabCtrl_GetItemlParam (BYVAL hWnd AS LONG, BYVAL iRow AS LONG) AS LONG
        LOCAL tci AS TC_ITEM
    
        tci.Mask         = %TCIF_PARAM
        TabCtrl_GetItem    hWnd, iRow, tci
        FUNCTION         = tci.lparam
    END FUNCTION
    MCM

    Leave a comment:


  • Gavin Fitz-Henry
    replied
    Thank You Michael and Richard.
    As stated, Notifications are sent to the OWNER window, not the tab dialog!
    This is where I was making my mistake, but all is fine now.
    As for PB9, Order placed, money paid, still waiting.
    Once again, thanks
    Gavin

    Leave a comment:


  • Richard Angell
    replied
    Do you have PBWin 9.0?

    The reason I ask is that TABs have received a significant boost with new DDT added especially for TABs. The example code for DDT\TABS (TABCONTROL.BAS) shows how much easier TABS have become to handle than before. Changing TAB pages is handled by the DDT engine, unless you need to intercept a message.

    For PBWin 8 though, you need to process the %TCN_SELCHANGING message.

    Leave a comment:


  • Michael Mattias
    replied
    WM_NOTIFY/TCN_SELCHANGING (before, may be prevented at this point)
    WM_NOTIFY/TCN_SELCHANGE (too late, already changed!)
    WM_NOTIFY/TCN_FOCUSCHANGE (I never used this one).

    All are sent to the OWNER window, not to the tab dialogs. You'll have to control stuff from there.
    Last edited by Michael Mattias; 7 Sep 2008, 09:27 AM.

    Leave a comment:


  • Gavin Fitz-Henry
    started a topic Tab Control Notifications

    Tab Control Notifications

    Greetings,

    I am in the process of writing a flight planning program. So far, the program has one main Dialog and five Tab Control Dialogs.
    Using the Sample Tab Control program supplied with PBWin80, I have had success in getting the Tab Controls to work just fine.
    The question I have is, "Which notification is sent to the Tab Dialog Which Presently Has Focus, when you click on another tab so as to display a different Dialog?"
    I have looked on the Microsoft Web Sight and in the PB Forum with no luck yet.
    Elsewhere in the program, I use WM_NOTIFY / EN_KILLFOCUS to update a Textbox when it looses focus and this works fine.
    I wish to emulate this process and gather / process the information entered on this dialog when it looses focus.

    Thank You
    Gavin
Working...
X