TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Erwin Hogeweg
date: 1996-10-06 19:43:00
subject: Creating a Notebook from a dialogbo

Hi,

I have a problem that drives me crazy. I have spent many days trying to
solve it but although it looks prety straight forward I must be overlooking
something.

I open a notebook dialog from an other dialog window but when I close the
notebook the application closes with it... (and it isn't redrawn properly
either).

The code to start the notebook is as follows:

=========
        .
        .
        .
  case DDPLOT_PB_OPTIONS:
  {
    BOOL fSuccess;
    HAB hab;
    HWND hwndFrame,
      hwndClient;
    ULONG flFrame = ( FCF_TITLEBAR   \
                    | FCF_SIZEBORDER \
      | FCF_SYSMENU    \
      | FCF_MINMAX)
        .
        .
        .

    hab = WinQueryAnchorBlock (hwndWnd);

    fSuccess = WinRegisterClass (hab, NOTEBOOK_CLIENT, notebook_dialog,
                                 CS_CLIPCHILDREN | CS_SIZEREDRAW, 0);
    if (fSuccess)
    {
//       hwndFrame = WinCreateWindow (HWND_DESKTOP, 0, &flFrame,
      hwndFrame = WinCreateWindow (hwndWnd, 0, &flFrame,
      NOTEBOOK_CLIENT, NULL, 0, NULLHANDLE,
      ID_NBWINFRAME, &hwndClient);
    }
    else
    {
      fSuccess = TRUE;  // debug breakpoint
    }

    if (hwndFrame)
    {
      fSuccess = TurnToFirstPage (hwndClient);
      if (fSuccess)
        .
        .
        .

Can somebody give me a hint or a code-example to help me a little further?


Erwin

e.hogeweg{at}dosgg.nl

---
* Origin: Highway Express/2 (2:500/120.6046)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/888 800/1
@PATH: 500/120 7 9 28/777 2802/100 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.