[WinAPI] Cum setez latimea separatorilor intr-un toolbar?

Folosire Windows API in programe C/C++ (forum moderat)
Post Reply
User avatar
Ovidiu Cucu
Fondator
Fondator
Posts: 3778
Joined: 11 Jul 2007, 16:10
Judet: Iaşi
Location: Iasi
Contact:

[WinAPI] Cum setez latimea separatorilor intr-un toolbar?

Post by Ovidiu Cucu » 23 Aug 2009, 12:03

Intrebare: Cum setez latimea separatorilor intr-un toolbar?

Raspuns: Daca un buton din toolbar are stilul (BTNS_SEP sau TBSTYLE_SEP) latimea lui este determinata de membrul iBitmap al structurii TBBUTTON.

Exemplu

Code: Select all

   int nIndex = 2;
   int nSeparatorWidth = 20;

   TBBUTTON tbb = {0};
   tbb.fsStyle = BTNS_SEP; // Separator
   tbb.iBitmap = nSeparatorWidth; // The width of the separator, in pixels
   
   ::SendMessage(hWndToolbar, TB_INSERTBUTTON, (WPARAM)nIndex, (LPARAM)&tbb);
Vezi si
<< Back to Windows API Index



Post Reply