[.net] Status bar/Tools bar in Win32 API

Started by
2 comments, last by ff8 17 years, 10 months ago
Hello everyone ^^, i am trying to divide the Status bar to 3 parts i tried it like this

HWND hStatus;
int statwidths[] = {100,100,90,-1};
hStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL,
				WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0,
				hwnd, (HMENU)IDC_MAIN_STATUS, GetModuleHandle(NULL), NULL);
			SendMessage(hStatus, SB_SETPARTS, sizeof(statwidths)/sizeof(int), (LPARAM)statwidths);
			SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)"Hi there :)");

all i got was 2 parts one small and one big =\ i don't know what to do and about Tools bar i want make more than one tools bar one after one like usually apps thank you ,
Advertisement
Just curious, if you are using .Net why are you not using the .Net equivalents to these controls instead of using an (ugly) diversion into Win32 API? In general it will be easier, and you can use a nice IDE (Google "Visual Studio Express" if you don't have one) to place status bars and tool bars and edit them visually.
Turring Machines are better than C++ any day ^_~
Its been a while but try this...

int statwidths[] = {100,200,290,-1};

I think this was posted in the wrong forum too.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

thanks Mike2343 ^^

This topic is closed to new replies.

Advertisement