CToolBarCtrl GPF during Create
Posted on 1997-04-30
I'm trying to create a tool bar control in a dialog (something like the small toolbar in the standard Open/Save dialog). However, when the program is first run it GPF's when creating the toolbar control. After the program has been run once, subsequent executions of the program work fine. This only seems to happen under Windows 95. NT doesn't "seem" to have a problem creating the control.
Here's a snippet of code - just the creation part that actually GPF's.
if( ! MyToolBar.Create( WS_CHILD | WS_VISIBLE | CCS_TOP | CCS_NOPARENTALIGN |
CCS_NODIVIDER | TBSTYLE_TOOLTIPS,
CRect(10,10,100,40), this, 50384 ) )
TRACE( "Failed to create toolbar\n" );
Am I completely missing something? I've tried putting both a call to InitCommonControls and AfxOleInit with no effect.