============================================================================= Toolbar_Get/SetButtons()
| 784 | // Toolbar_Get/SetButtons() |
| 785 | // |
| 786 | int Toolbar_GetButtons ( HWND hwnd, int cmdBase, LPWSTR lpszButtons, int cchButtons ) |
| 787 | { |
| 788 | WCHAR tchButtons[512]; |
| 789 | WCHAR tchItem[32]; |
| 790 | int i, c; |
| 791 | TBBUTTON tbb; |
| 792 | lstrcpy ( tchButtons, L"" ); |
| 793 | c = min ( 50, ( int ) SendMessage ( hwnd, TB_BUTTONCOUNT, 0, 0 ) ); |
| 794 | for ( i = 0; i < c; i++ ) { |
| 795 | SendMessage ( hwnd, TB_GETBUTTON, ( WPARAM ) i, ( LPARAM ) &tbb ); |
| 796 | wsprintf ( tchItem, L"%i ", |
| 797 | ( tbb.idCommand == 0 ) ? 0 : tbb.idCommand - cmdBase + 1 ); |
| 798 | lstrcat ( tchButtons, tchItem ); |
| 799 | } |
| 800 | TrimString ( tchButtons ); |
| 801 | lstrcpyn ( lpszButtons, tchButtons, cchButtons ); |
| 802 | return ( c ); |
| 803 | } |
| 804 | |
| 805 | int Toolbar_SetButtons ( HWND hwnd, int cmdBase, LPCWSTR lpszButtons, LPCTBBUTTON ptbb, int ctbb ) |
| 806 | { |
no test coverage detected