I am making a paint program and I created a toolbar with my own images that works fine but I tried adding a rebar to it everything compiles fine but only the toolbar shows up not the rebar.

Code:
 #define NUMBUTTONS 3

HWND CreateToolBar(HWND hWndParent)
{
	
	TBBUTTON buttons[NUMBUTTONS];

	HIMAGELIST himlToolBar = ImageList_LoadImage(
		m_hInst,
		MAKEINTRESOURCE(IDB_BITMAP1),
		16,
		1,
		RGB(255, 0, 255),
		IMAGE_BITMAP,
		LR_CREATEDIBSECTION);

	
	hWndToolBar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL,WS_CHILD | WS_VISIBLE |TBSTYLE_FLAT  , 0, 0, 1, 1, hWndParent, NULL, m_hInst, NULL);

	SendMessage(hWndToolBar, TB_SETIMAGELIST, 0, (LPARAM)himlToolBar);

	for(int i = 0; i < NUMBUTTONS; ++i)
	{
		buttons[i].iBitmap = i;
		buttons[i].fsState = TBSTATE_ENABLED;
		buttons[i].fsStyle = TBSTYLE_BUTTON;
		buttons[i].dwData = 0L;
		buttons[i].iString = (INT_PTR)L"New";
		buttons[i].idCommand = 0;
	}

	SendMessage(hWndToolBar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);

	SendMessage(hWndToolBar, TB_ADDBUTTONS, (WPARAM)NUMBUTTONS, (LPARAM)&buttons);

	SendMessage(hWndToolBar, TB_AUTOSIZE, 0, 0);

	return hWndToolBar;
}

Code:
HWND CreateRebar(HWND hWndOwner, HWND hWndToolbar)
{
	if(hWndToolbar == NULL)
	{
		return NULL;
	}

	INITCOMMONCONTROLSEX icex;
	icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
	icex.dwICC = ICC_COOL_CLASSES | ICC_BAR_CLASSES;
	InitCommonControlsEx(&icex);

	hWndRebar = CreateWindowEx(WS_EX_TOOLWINDOW,
		REBARCLASSNAME,
		NULL,
		WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
		WS_CLIPCHILDREN | RBS_VARHEIGHT |
		CCS_NODIVIDER | RBS_BANDBORDERS,
		0, 0, 0, 0,
		hWndOwner,
		NULL,
		m_hInst,
		NULL);

	if(!hWndRebar)
	{
		return NULL;
	}

	REBARBANDINFO rbBand = { sizeof(REBARBANDINFO) };
	rbBand.fMask = 
		RBBIM_STYLE
		| RBBIM_TEXT
		| RBBIM_CHILD
		| RBBIM_CHILDSIZE
		| RBBIM_SIZE;
	rbBand.fStyle = RBBS_CHILDEDGE | RBBS_GRIPPERALWAYS;

	DWORD dwBtnSize = (DWORD)SendMessage(hWndToolbar, TB_GETBUTTONSIZE, 0, 0);

	rbBand.lpText = TEXT("");
	rbBand.hwndChild = hWndToolbar;
	rbBand.cyChild = LOWORD(dwBtnSize);
	rbBand.cxMinChild = NUMBUTTONS * HIWORD(dwBtnSize);
	rbBand.cyMinChild = LOWORD(dwBtnSize);

	rbBand.cx = 0;

	SendMessage(hWndRebar, RB_INSE*****D, (WPARAM)-1, (LPARAM)&rbBand);

	return (hWndRebar);

}

Code:
HRESULT InitializeWindow(HINSTANCE hInstance)
{

    HRESULT hr = S_OK;
	m_hInst = hInstance;
    // Create WIC factory
    hr = CoCreateInstance(
        CLSID_WICImagingFactory,
        NULL,
        CLSCTX_INPROC_SERVER,
        IID_PPV_ARGS(&m_pIWICFactory)
        );

    // Register window class
    WNDCLASS wcex;
    if (SUCCEEDED(hr))
    {
	
        wcex.style         = CS_HREDRAW | CS_VREDRAW;
		wcex.lpfnWndProc   = (WNDPROC)WndProc;
        wcex.cbClsExtra    = 0;
        wcex.cbWndExtra    = sizeof(LONG_PTR);
        wcex.hInstance     = hInstance;
		wcex.hIcon         = NULL;
        wcex.hCursor       = LoadCursor(NULL, IDC_ARROW);
		wcex.hbrBackground = (HBRUSH)::GetStockObject(WHITE_BRUSH);
		wcex.lpszMenuName  = 0;
        wcex.lpszClassName = L"WICViewerGDI";
       


      

        hr = RegisterClass(&wcex) ? S_OK : E_FAIL;
    }

    if (SUCCEEDED(hr))
    {

		
        // Create window
         ghMainWnd = CreateWindow(
            L"WICViewerGDI",
            L"PaintProgram",
            WS_OVERLAPPEDWINDOW | WS_VISIBLE,
            CW_USEDEFAULT,
            CW_USEDEFAULT,
            1920,
            1080,
            NULL,
			NULL,
            hInstance,
            0
            );

		 hr = ghMainWnd ? S_OK : E_FAIL;

		 ShowWindow(ghMainWnd, SW_SHOW);
		 UpdateWindow(ghMainWnd);

		 
    }

	CreateRebar(ghMainWnd, hWndToolBar);
	CreateToolBar(ghMainWnd);
	
    return hr;
}

I cant seem to figure it out any help is appreciated.