Help -> floating bar is not being displayed correctly

B

buliwyf_23

I have this:

CSize sz;

sz.cx = dwOutX1;
sz.cy = dwOutY1;

CPoint pt(sz);

ClientToScreen(&pt);
cCoolBar->EnableDocking(0);
FloatControlBar(cCoolBar, pt);

cCoolBar is CControlBar type. dwOutX1 and dwOutY1 values are being
opened from the registry.

I'm trying to display the bar in a "floating" state... but I can't...
It is displayed an error message with an assert error... When it is
compiling the floating bar is displayed when the app is loading...
and after that it crashes... As our app has 5 different frames inside
a Mainframe, it seems to me that the focus is setted on the floating
bar... and when the app tries to create the other windows it can't
beacuse the floating bar is not the mainframe window...

the code that I put above is inside the mainframe class that is a
CFrameWnd... where the registry values are being opened.

Thnx anyway.
 
C

Carl Daniel [VC++ MVP]

buliwyf_23 said:
I have this:

CSize sz;

sz.cx = dwOutX1;
sz.cy = dwOutY1;

CPoint pt(sz);

ClientToScreen(&pt);
cCoolBar->EnableDocking(0);
FloatControlBar(cCoolBar, pt);

I'd suggest posting this in microsoft.public.vc.mfc

-cd
 
Top