#define BKA_NEW_PAGE  0

// Задаём размер закладок.
INT Height = 25; INT Width = 150;

WinSendMsg (Notebook_window, BKM_SETDIMENSIONS,            
                             MPFROM2SHORT (
                                            Width, 
                                            Height
                                          ), 
                             MPFROMLONG   (
                                            BKA_MAJORTAB
                                          ));

WinSendMsg (Notebook_window, BKM_SETDIMENSIONS,            
                             MPFROM2SHORT (
                                            Width, 
                                            Height
                                          ), 
                             MPFROMLONG   (
                                            BKA_MINORTAB
                                          ));
...

// Добавляем страницу.
CHAR Page_name[] = "...";

ULONG Style = 0;
if (...) Style = BKA_MAJOR;
if (...) Style = BKA_MINOR;

if (Style) 
{
  ULONG New_page_id = WinSendMsg (Notebook_window, BKM_INSERTPAGE, 
                                                   MPFROMLONG   (
                                                                  BKA_NEW_PAGE
                                                                ),
                                                   MPFROM2SHORT (
                                                                  Style | BKA_AUTOPAGESIZE, 
                                                                  BKA_LAST
                                                                ));

  if (New_page_id) 
  {
    WinSendMsg (Notebook_window, BKM_SETPAGEWINDOWHWND,     
                                 MPFROMLONG (New_page_id),  
                                 MPFROMHWND (Page_window));

    WinSendMsg (Notebook_window, BKM_SETTABTEXT,            
                                 MPFROMLONG (New_page_id),  
                                 MPFROMP (Page_name));
  }
}