Win32 API Examples
» Create and play a wave signal
» Create a modal dialog box
» Create a message box
» Create a save dialog box
» Create an open dialog box
» Enable/Disable window items
» Set text in edit controls
» Get text from edit controls
» Set integer in edit controls
» Get integer from edit controls
» Open a homepage
» Get size of screen
» Get/Set position of mouse
» Set/Read check box
» Use Progress Bars

// Include ComCtl32.Lib in the project

// Include header for common controls
#include "commctrl.h"

// Be sure that the common controls are initialized before creating the dialog
InitCommonControls();

// Create Dialog including Progress Bar

// Set range
SendMessage(GetDlgItem(hWnd, IDC_PROGRESS), PBM_SETRANGE, 0, MAKELPARAM(0, 100)); 

// Set size of step
SendMessage(GetDlgItem(hWnd, IDC_PROGRESS), PBM_SETSTEP, (WPARAM)10, 0);

// Step one step
SendMessage(GetDlgItem(hWnd, IDC_PROGRESS), PBM_STEPIT, 0, 0);
Copyright (c) 2004 PerErik Klarenfjord, All Rights Reserved
All trademarks are the property of their owners
Any actions you take after reading this website are your own responsibility
MADE IN SWEDEN
Hosted by GMQ