| |
3 |
3 |
|
| |
4 |
4 |
|
| |
5 |
5 |
|
| |
6 |
6 |
|
| |
7 |
7 |
|
| |
8 |
8 |
|
| |
9 |
9 |
|
| |
10 |
10 |
|
| |
11 |
11 |
|
| |
12 |
12 |
|
| |
13 |
13 |
|
| |
14 |
14 |
|
| |
15 |
15 |
|
| |
16 |
16 |
|
| |
17 |
17 |
|
| |
18 |
18 |
|
| |
19 |
19 |
#include "stdafx.h" |
| |
20 |
20 |
#include "ch.h" |
| |
21 |
21 |
#include "DirTreeCtrl.h" |
| |
22 |
22 |
#include "FolderDialog.h" |
| |
23 |
|
#include "Theme Helpers.h" |
| |
24 |
23 |
#include "shlobj.h" |
| |
25 |
24 |
#include "StringHelpers.h" |
| |
26 |
25 |
#include "TRecentPathsTools.h" |
| |
27 |
26 |
#include "resource.h" |
| |
28 |
27 |
#include "shortcuts.h" |
| |
29 |
28 |
|
| |
30 |
29 |
#ifdef _DEBUG |
| |
31 |
30 |
#define new DEBUG_NEW |
| |
32 |
31 |
#undef THIS_FILE |
| |
33 |
32 |
static char THIS_FILE[] = __FILE__; |
| |
34 |
33 |
#endif |
| |
35 |
34 |
|
| |
36 |
35 |
|
| |
37 |
36 |
const unsigned long __g_DlgTemplate[]={ |
| |
38 |
37 |
0x82cf0040, 0x00000000, 0x00000000, 0x011b0000, 0x000000b4, 0x00000000, 0x00540008, 0x00680061, |
| |
39 |
38 |
0x006d006f, 0x00000061 }; |
| |
40 |
39 |
|
| |
41 |
40 |
|
| |
42 |
41 |
|
| |
43 |
42 |
#ifndef WM_THEMECHANGED |
|
| |
1023 |
1022 |
m_ctlSmallIcons.Invalidate(); |
| |
1024 |
1023 |
m_ctlList.Invalidate(); |
| |
1025 |
1024 |
m_ctlReport.Invalidate(); |
| |
1026 |
1025 |
} |
| |
1027 |
1026 |
|
| |
1028 |
1027 |
|
| |
1029 |
1028 |
|
| |
1030 |
1029 |
void CFolderDialog::OnSize(UINT nType, int cx, int cy) |
| |
1031 |
1030 |
{ |
| |
1032 |
1031 |
CLanguageDialog::OnSize(nType, cx, cy); |
| |
1033 |
1032 |
|
| |
1034 |
1033 |
ResizeControls(cx, cy); |
| |
1035 |
1034 |
InvalidateRect(&m_rcGripper); |
| |
1036 |
1035 |
} |
| |
1037 |
1036 |
|
| |
1038 |
1037 |
|
| |
1039 |
1038 |
|
| |
1040 |
1039 |
void CFolderDialog::ResizeControls(int cx, int cy) |
| |
1041 |
1040 |
{ |
| |
1042 |
1041 |
|
| |
1043 |
|
CUxThemeSupport uxt; |
| |
1044 |
|
bool bThemed=uxt.IsThemeSupported() && uxt.IsAppThemed(); |
| |
|
1042 |
bool bThemed=IsAppThemed(); |
| |
1045 |
1043 |
|
| |
1046 |
1044 |
|
| |
1047 |
1045 |
const int iMargin=7; |
| |
1048 |
1046 |
const int iTextCount=3; |
| |
1049 |
1047 |
|
| |
1050 |
1048 |
|
| |
1051 |
1049 |
const int iBmpMargin=1; |
| |
1052 |
1050 |
const int iButtonWidth=(bThemed ? 20 : 16)+2*GetSystemMetrics(SM_CXEDGE)+2*iBmpMargin; |
| |
1053 |
1051 |
const int iButtonHeight=(bThemed ? 20 : 16)+2*GetSystemMetrics(SM_CYEDGE)+2*iBmpMargin; |
| |
1054 |
1052 |
|
| |
1055 |
1053 |
|
| |
1056 |
1054 |
const int iLargeButtonHeight=14; |
| |
1057 |
1055 |
const int iLargeButtonWidth=50; |
| |
1058 |
1056 |
const int iToggleButtonWidth=18; |
| |
1059 |
1057 |
|
| |
1060 |
1058 |
|
| |
1061 |
1059 |
const int iComboHeight=12; |
| |
1062 |
1060 |
const int iComboExpandedHeight=100; |
| |
1063 |
1061 |
|
| |
1064 |
1062 |
|