Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <windows.h>
#include <commctrl.h>
// Startout status bar control routine. Creates a status bar, divides it into nParts sections.
// hStatus must be zero on first call to StatusBar:
HWND StatusBar (HWND hWndParent, HWND hStatus, HINSTANCE hInst, int nParts)
{
RECT rcClient;
HLOCAL hloc;
LPINT lpParts;
int i, nWidth;
if (hStatus == 0) {
hStatus = CreateWindowEx (0, STATUSCLASSNAME, (LPCTSTR) NULL, WS_CHILD, 0, 0, 0, 0,
hWndParent,(HMENU) NULL, hInst, NULL);
ShowWindow (hStatus, SW_SHOWNORMAL);
UpdateWindow (hStatus);
}
// Get the coordinates of the parent window's client area.
GetClientRect (hWndParent, &rcClient);
// Allocate an array for holding the right edge coordinates.
hloc = LocalAlloc (LHND, sizeof (int) * (nParts + 1));
lpParts = (int*) LocalLock (hloc);
// Calculate the right edge coordinate for each part, and
// copy the coordinates to the array.
nWidth = (rcClient.right - 12) / nParts;
for (i = 0; i < nParts; i++)
lpParts[i] = i * nWidth;
lpParts [nParts] = nParts * nWidth;
// Tell the status bar to create the window parts.
SendMessage (hStatus, SB_SETPARTS, (WPARAM) nParts + 1, (LPARAM) lpParts);
// Free the array, and return.
LocalUnlock (hloc);
LocalFree (hloc);
return hStatus;
}