#include <Windows.h>
#include <CommCtrl.h>
#include "gscontrols.h"
#include "resource.h"
INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
SendMessage(GetDlgItem(hDlg, IDC_PROGRESS1), PBM_SETPOS, 100, NULL);
SendMessage(GetDlgItem(hDlg, IDC_PROGRESS2), PBM_SETPOS, 100, NULL);
break;
case WM_SYSCOMMAND:
if (wParam==SC_CLOSE) {DestroyWindow(hDlg);}
break;
}
return 0;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
InitCommonControls();
InitializeGSControls();
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, DialogProc);
UninitializeGSControls();
return 0;
}
- 1
- 2
- 3
- 4
- 5
- 6
前往页