Hi, I have a main window and I want to put a status bar into it. How can I do that? And how can i put text into this bar?
Thanx.
Hi, I have a main window and I want to put a status bar into it. How can I do that? And how can i put text into this bar?
Thanx.
Hey,
Firstly, include <comctrl.h> and link comctl32.lib
define the following under your headers:
Code:#define ID_STATUSBAR 4997 HWND hWndStatus;
Then under where you create your main window, in winmain put this:
Code:InitCommonControls(); hWndStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0, hWnd, (HMENU)ID_STATUSBAR, hInstance, NULL);
Then to add text to your status bar, this can go where suites you or ur prog...
Code:case WM_LBUTTONDOWN: { SetWindowText(hWndStatus, "La La La Status Bar Clicked"); }
Hope that helps,
TNT
TNT
You Can Stop Me, But You Cant Stop Us All
Go to msdn and search for CreateStatusWindow(). There will be information on its use and maybe some source to look at.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
thanx for all i'll try that