Does your toolbar have a parent? If it does then the following should work. If it doesn't then just create a window with the same height and width of the toolbar.
Try this...create a toolbar without the TBSTYLE_FLAT...then send the following message to it:
SetWindowLong(g_hToolBar, GWL_STYLE, GetWindowLong(g_hToolBar, GWL_STYLE) || TB_STYLE_FLAT);
P.S. the above code works fine for me in vb and c. If it doesn't then......it doesn't :)