from \LC_Samples\LaserDraw\ project
HANDLE g_hStatBar; // status bar
//-----------------------------------------------
int APIENTRY _tWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
...
// Create StatusBar
g_hStatBar = lcCreateStatbar( g_hwMain );
lcStatbarCell( g_hStatBar, 1, 0 );
lcStatbarCell( g_hStatBar, 2, 100 );
lcStatbarCell( g_hStatBar, 3, 200 );
lcStatbarCell( g_hStatBar, 4, 350 );
...
}
//-----------------------------------------------
void OnAppResize (WPARAM SizeType, int Wmain, int Hmain)
{
int x, y, w, h, Hsbar;
// Default height of the status bar
Hsbar = lcPropGetInt( 0, LC_PROP_G_SBARHEIGHT );
...
// StatusBar position
x = 0;
y = Hmain - Hsbar + 1;
w = Wmain;
h = Hsbar;
lcStatbarResize( g_hStatBar, x, y, w, h );
}
//-----------------------------------------------
void OnMouseMove (HANDLE hEvent)
{
...
// Display data in status bar
// X
okDblToStr( X, szNum, 2 );
swprintf( szBuf, L"X: %s", szNum );
lcStatbarText( g_hStatBar, 1, szBuf );
// Y
okDblToStr( Y, szNum, 2 );
swprintf( szBuf, L"Y: %s", szNum );
lcStatbarText( g_hStatBar, 2, szBuf );
// redraw the status bar
lcStatbarRedraw( g_hStatBar );
}