ReactOS
0.4.16-dev-1946-g52006dd
DefragDialog.cpp
Go to the documentation of this file.
1
#include "DefragDialog.h"
2
#include "
Defragment.h
"
3
#include "
resource.h
"
4
5
6
void
UpdateDefragInfo
(
HWND
Dlg)
7
{
8
Defragment
*
Defrag
;
9
HWND
PercentItem;
10
char
PercentText[100];
11
12
Defrag
= (
Defragment
*)
GetWindowLongPtr
(Dlg,
GWLP_USERDATA
);
13
14
sprintf
(PercentText,
"%6.2f%%"
,
Defrag
->
GetStatusPercent
());
15
PercentItem =
GetDlgItem
(Dlg,
IDC_PERCENT
);
16
SendMessage
(
GetDlgItem
(Dlg,
IDC_PERCENT
),
WM_SETTEXT
, 0, (
LPARAM
) PercentText);
17
SendMessage
(
GetDlgItem
(Dlg, IDC_STATUS_TEXT),
WM_SETTEXT
, 0, (
LPARAM
)
Defrag
->
GetStatusString
().c_str());
18
19
return
;
20
}
21
22
23
INT_PTR
CALLBACK
DefragDialogProc
(
HWND
Dlg,
UINT
Msg
,
WPARAM
WParam,
LPARAM
LParam)
24
{
25
switch
(
Msg
)
26
{
27
case
WM_INITDIALOG
:
28
SetWindowLongPtr
(Dlg,
GWLP_USERDATA
, (
LONG_PTR
)LParam);
29
UpdateDefragInfo
(Dlg);
30
return
(1);
31
32
case
WM_UPDATEINFO
:
33
UpdateDefragInfo
(Dlg);
34
return
(1);
35
}
36
37
return
(0);
38
}
DefragDialogProc
INT_PTR CALLBACK DefragDialogProc(HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LParam)
Definition:
DefragDialog.cpp:23
UpdateDefragInfo
void UpdateDefragInfo(HWND Dlg)
Definition:
DefragDialog.cpp:6
Defragment.h
Defrag
Defragment * Defrag
Definition:
Fraginator.cpp:20
WM_UPDATEINFO
#define WM_UPDATEINFO
Definition:
MainDialog.h:8
Defragment
Definition:
Defragment.h:42
Defragment::GetStatusString
wstring GetStatusString(void)
Definition:
Defragment.cpp:133
Defragment::GetStatusPercent
double GetStatusPercent(void)
Definition:
Defragment.cpp:145
Msg
struct @1765 Msg[]
CALLBACK
#define CALLBACK
Definition:
compat.h:35
void
Definition:
nsiface.idl:2307
LPARAM
LONG_PTR LPARAM
Definition:
minwindef.h:175
WPARAM
UINT_PTR WPARAM
Definition:
minwindef.h:174
IDC_PERCENT
#define IDC_PERCENT
Definition:
resource.h:15
sprintf
#define sprintf
Definition:
sprintf.c:45
LONG_PTR
__int3264 LONG_PTR
Definition:
mstsclib_h.h:276
UINT
unsigned int UINT
Definition:
ndis.h:50
GetWindowLongPtr
#define GetWindowLongPtr
Definition:
treelist.c:73
SetWindowLongPtr
#define SetWindowLongPtr
Definition:
treelist.c:70
GWLP_USERDATA
#define GWLP_USERDATA
Definition:
treelist.c:63
INT_PTR
int32_t INT_PTR
Definition:
typedefs.h:64
resource.h
WM_INITDIALOG
#define WM_INITDIALOG
Definition:
winuser.h:1767
GetDlgItem
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
WM_SETTEXT
#define WM_SETTEXT
Definition:
winuser.h:1645
SendMessage
#define SendMessage
Definition:
winuser.h:5954
modules
rosapps
applications
fraginator
DefragDialog.cpp
Generated on Thu Dec 4 2025 06:06:57 for ReactOS by
1.9.6