Creating a tab-less notebook? - OS2

This is a discussion on Creating a tab-less notebook? - OS2 ; The Toolkit PM Programming Guide has this to say about adding pages to a notebook without BKA_MAJOR or BKA_MINOR: Because tab pages are not mandatory, the application can create a notebook that contains no major or minor tab pages. That ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Creating a tab-less notebook?

  1. Creating a tab-less notebook?

    The Toolkit PM Programming Guide has this to say about adding pages
    to a notebook without BKA_MAJOR or BKA_MINOR:

    Because tab pages are not mandatory, the application can create a
    notebook that contains no major or minor tab pages. That style
    would be similar to that of a composition notebook.

    So I've tried this (using a BKS_TABBEDDIALOG notebook).

    pageId = (LONG) WinSendDlgItemMsg( hwnd, NBK_MAIN, BKM_INSERTPAGE, NULL,
    MPFROM2SHORT( BKA_AUTOPAGESIZE |
    BKA_STATUSTEXTON, BKA_FIRST ));

    This does indeed create a notebook without tabs, and it looks pretty
    good. Unfortunately, any mouse click which occurs in the area where
    the tabs _would_ normally appear causes an instant SYS3175 in PMCTLS.

    Does anyone know the trick?
    --
    +---------------------------------------------------------------+
    | Alex Taylor http://www.cs-club.org/~alex |
    +---------------------------------------------------------------+

  2. Re: Creating a tab-less notebook?

    Hi,

    why don't you just set the extent of the tabs to zero ? There is some
    message for that and you can do this in the INIT message of the notebook
    dialog procedure (before the dialog is actually displayed).

    Lars

    "Alex Taylor" schrieb im Newsbeitrag
    news:EzI08Q3LwTQm-pn2-2Fj2gF9Jtd0E@ifurita...
    > The Toolkit PM Programming Guide has this to say about adding pages
    > to a notebook without BKA_MAJOR or BKA_MINOR:
    >
    > Because tab pages are not mandatory, the application can create a
    > notebook that contains no major or minor tab pages. That style
    > would be similar to that of a composition notebook.
    >
    > So I've tried this (using a BKS_TABBEDDIALOG notebook).
    >
    > pageId = (LONG) WinSendDlgItemMsg( hwnd, NBK_MAIN, BKM_INSERTPAGE, NULL,
    > MPFROM2SHORT( BKA_AUTOPAGESIZE |
    > BKA_STATUSTEXTON, BKA_FIRST ));
    >
    > This does indeed create a notebook without tabs, and it looks pretty
    > good. Unfortunately, any mouse click which occurs in the area where
    > the tabs _would_ normally appear causes an instant SYS3175 in PMCTLS.
    >
    > Does anyone know the trick?
    > --
    > +---------------------------------------------------------------+
    > | Alex Taylor http://www.cs-club.org/~alex |
    > +---------------------------------------------------------------+




  3. Re: Creating a tab-less notebook?

    On Mon, 13 Dec 2004 21:53:19 UTC, "Lars Erdmann" wrote:

    > Hi,
    >
    > why don't you just set the extent of the tabs to zero ? There is some
    > message for that and you can do this in the INIT message of the notebook
    > dialog procedure (before the dialog is actually displayed).


    If you mean:

    WinSendDlgItemMsg( hwnd, NBK_MAIN, BKM_SETDIMENSIONS,
    MPFROM2SHORT( 0, 0 ), MPFROMSHORT( BKA_MAJORTAB ));

    It doesn't have any effect. I believe TABBEDDIALOG notebooks ignore
    that particular message.


    > > pageId = (LONG) WinSendDlgItemMsg( hwnd, NBK_MAIN, BKM_INSERTPAGE, NULL,
    > > MPFROM2SHORT( BKA_AUTOPAGESIZE |
    > > BKA_STATUSTEXTON, BKA_FIRST ));
    > >
    > > This does indeed create a notebook without tabs, and it looks pretty
    > > good. Unfortunately, any mouse click which occurs in the area where
    > > the tabs _would_ normally appear causes an instant SYS3175 in PMCTLS.


    --
    +---------------------------------------------------------------+
    | Alex Taylor http://www.cs-club.org/~alex |
    +---------------------------------------------------------------+

  4. Re: Creating a tab-less notebook?

    Hi,

    "Alex Taylor" schrieb im Newsbeitrag
    news:EzI08Q3LwTQm-pn2-CsDTGecZ7Zjx@ifurita...
    > On Mon, 13 Dec 2004 21:53:19 UTC, "Lars Erdmann"
    > wrote:
    >
    >> Hi,
    >>
    >> why don't you just set the extent of the tabs to zero ? There is some
    >> message for that and you can do this in the INIT message of the notebook
    >> dialog procedure (before the dialog is actually displayed).

    >
    > If you mean:
    >
    > WinSendDlgItemMsg( hwnd, NBK_MAIN, BKM_SETDIMENSIONS,
    > MPFROM2SHORT( 0, 0 ), MPFROMSHORT( BKA_MAJORTAB ));
    >
    > It doesn't have any effect. I believe TABBEDDIALOG notebooks ignore
    > that particular message.


    Yes, I was hoping for that. As a next measure you might want to set a ""
    zero-length string as tab text. Hopefully, the tab won't display at all if
    there is no text to display ...


    Lars



  5. Re: Creating a tab-less notebook?

    On Sun, 12 Dec 2004 23:00:06 UTC "Alex Taylor"
    wrote:

    > The Toolkit PM Programming Guide has this to say about adding pages
    > to a notebook without BKA_MAJOR or BKA_MINOR:
    >
    > Because tab pages are not mandatory, the application can create a
    > notebook that contains no major or minor tab pages. That style
    > would be similar to that of a composition notebook.
    >
    > So I've tried this (using a BKS_TABBEDDIALOG notebook).
    >
    > pageId = (LONG) WinSendDlgItemMsg( hwnd, NBK_MAIN, BKM_INSERTPAGE, NULL,
    > MPFROM2SHORT( BKA_AUTOPAGESIZE |
    > BKA_STATUSTEXTON, BKA_FIRST ));
    >
    > This does indeed create a notebook without tabs, and it looks pretty
    > good. Unfortunately, any mouse click which occurs in the area where
    > the tabs _would_ normally appear causes an instant SYS3175 in PMCTLS.
    >
    > Does anyone know the trick?


    Alex, which version of the toolkit are you running? I haven't seen
    that problem since the Warp 4 toolkit came out in 1996 or so. Even
    the earlier toolkits had updates to fix the problem (along with some -
    not all - irritating MLE errors). The workaround I used was to go to
    the message handler for the main notebook and grab the message causing
    the problem so it could be swallowed if the page referenced was not
    tabbed. There was a similar workaround for the very early CSET/2
    libraries that used the same method.

    --
    Will Honea

+ Reply to Thread