سؤال

Is there any method in MFC to find out "Is CToolBar docking or floating?". In my program I need to knew it exactly.

I don't want to use such code:

void MyCToolBAR:: ...
{
   RECT rc; 
   GetClientRect(&rc);
}

For example. If bar we will get

(0,0) - leftTop angle,

(x,y) - data.

That is mean: BAR IS PROBABLY DOCKED.

Thanks for your solutions.

هل كانت مفيدة؟

المحلول

Try calling GetBarStyle() and checking for CBRS_FLOATING flag. Other flags that could be set are shown in help file for CToolBar::Create().

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top