Placing Items on Tab Sheet and Rebar Problem

Placing Items on Tab Sheet and Rebar Problem

Post by Reginald Johnso » Wed, 10 May 2000 04:00:00



Hello,
    I'm trying to figure out the process of placing items on the sheets in a
tab dialog.  Specifically I want to place some dialog controls on them with
one sheet also containing a vertically scrolling window.  Also, is it
possible to add multiple progress controls to the vertically scrolling
window at runtime?
    I am also having problems with a rebar cutting off the bottom half of my
toolbar buttons.  Also, the buttons have static on them instead of the
pictures I want them to show.  The code I am using for the rebar and toolbar
is below:

/***************************************************************************
*
*
*    FUNCTION: CreateRebar(HWND)
*
*    PURPOSE:  Creates the rebar
*
****************************************************************************
/
UINT CreateRebar(HWND hWndParent)
{
     INITCOMMONCONTROLSEX icex;

     /*This is where we create the rebar control*/
     // initialize the common controls
     icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
     icex.dwICC = ICC_COOL_CLASSES | ICC_USEREX_CLASSES; // load the rebar
and combo
     InitCommonControlsEx(&icex);

     // Create the REBAR control
     hWndRebar =
ateWindowEx(
        0L,
        REBARCLASSNAME,
        NULL,
                WS_VISIBLE | WS_BORDER | WS_CHILD | WS_CLIPCHILDREN |
                  WS_CLIPSIBLINGS | CCS_NODIVIDER | CCS_NOPARENTALIGN |
      RBS_VARHEIGHT | RBS_BANDBORDERS,
        0, 0, 400, 80,
        hWndParent,
        0,
        hInstance,
        NULL );

     if (!hWndRebar)
      return 0;

     // Create the toolbar to be added
     if ((hWndToolBar = CreateToolBar(hWndRebar)) == NULL)
          MessageBox (NULL, TEXT("Could not create the toolbar"), NULL, MB_OK );

     return 1;

Quote:}

/****************************************************************************
*
*    FUNCTION: CreateTheToolBar(REBARBANDINFO)
*
*    PURPOSE:  Creates the toolbar
*
****************************************************************************/
HWND CreateToolB
ar (HWND hWndParent)
{
     REBARBANDINFO rbBand;

     hWndToolBar = CreateToolbarEx(hWndParent,
        WS_CHILD | TBSTYLE_LIST | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS |
WS_CLIPCHILDREN |
           WS_CLIPSIBLINGS | CCS_NODIVIDER | CCS_NORESIZE | WS_VISIBLE,
        IDR_TOOLBAR,                 /*what kind of resource is this, a
bitmap, menu....?*/
      NUM_TBBITMAPS,          /*set to 6*/
      (HINSTANCE)hInstance,
      IDB_TOOLBAR,                   /*a bitmap with the pictures I want on
the buttons*/
        (LPCTBBUTTON)&tbButtons,
        NUM_TBBUTTONS,        /*set to 6 since there are no seperators in
the bar*/
      BMP_CX,BMP_CY,                  /* BMP_CX=32, BMP_CY=32*/
      BMP_CX,BMP_CY,                  /* width & height of bitmaps*/
      sizeof(TBBUTTON));

      if (hWndToolBar == NULL )
     {
          MessageBox (NULL, TEXT("Toolbar not created!"), NULL, MB_OK );
          return (HWND)NULL;
     }

     // Initialize REBARBANDINFO for all rebar bands
     rbBand.cbSize = sizeof(REBARBANDINFO);
     rbBand.fMask = RBBIM_COLORS | // clrFore and clrBack are valid
      RBBIM_CHILD |    // hwndChild is valid
      RBBIM_CHILDSIZE |   // cxMinChild and cyMinChild are valid
      RBBIM_STYLE |    // fStyle is valid
      RBBIM_ID;      // wID is valid
     rbBand.clrFore = GetSysColor(COLOR_BTNTEXT);
     rbBand.clrBack = GetSysColor(COLOR_BTNFACE);
     rbBand.fStyle = RBBS_NOVERT | // do not display in vertical orientation
      RBBS_CHILDEDGE |
      RBBS_FIXEDBMP;

     rbBand.hwndChild = hWndToolBar;
     rbBand.wID = ID_TOOLBAR;
     rbBand.cxMinChild = MIN_TBCX; /*MIN_TBCX=32*/
     rbBand.cyMinChild = MIN_CY;  /*MIN_CY=32*/

     // Insert band into rebar
     SendMessage(hWndRebar, RB_INSERTBAND, (UINT) -1, (LPARAM)
(LPREBARBANDINFO) &rbBand);

     return (hWndToolBar);

Quote:}

 
 
 

1. Tab Order backward once a dialog is placed in a Property Sheet

I've got an odd problem.  I've inherited an application that contains a TabCtrl
with 3 tabs.  This app does not use MFC, so this is all done via Property Sheet
macro's.  I've got a dialog that, when being tested in MSDev, has the correct
tab order, but when I am running the app, and the dialog is inserted in the
Property Sheet, the tab order is backwards

The app has two keyboard hooks, but even when they are disabled, I cannot get
the tab order to go the correct direction.  Shift+Tab works how Tab does, and
Tab works how Shift+Tab should.

Is there something stupid I am missing?
--
=====================
Michael Scott

  michael.scott.vcf
< 1K Download

2. "ILPS91 Preliminary Program Announcement"

3. Capturing Cntrl-Tab in place of Tab for tab indexing

4. comp.dcom.isdn FAQ Location - Periodic Announcement

5. How could i get the property sheet tab control with single row tabs?

6. netbios

7. Tab Controls/Property sheets problem (again)

8. CD-ROM Recorders

9. Tab Controls/Property sheets problem

10. newbie - tabstrip problems - placing controls on tabs

11. rebar and tab control

12. how to place a minimize button on a property sheet?

13. Wizard/Property sheet: How to place where you want on the screen?