Skip to content

Commit

Permalink
Project Priscilla 適用作業中...
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyohiyo committed Apr 25, 2020
1 parent bf7da85 commit 4203572
Show file tree
Hide file tree
Showing 66 changed files with 6,851 additions and 2,112 deletions.
83 changes: 43 additions & 40 deletions AboutDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@
IMPLEMENT_DYNCREATE(CAboutDlg, CDialog)

CAboutDlg::CAboutDlg(CWnd* pParent /*=NULL*/)
: CDialogCx(CAboutDlg::IDD, pParent)
: CDialogFx(CAboutDlg::IDD, pParent)
{
m_CurrentLangPath = ((CMainDialog*)pParent)->m_CurrentLangPath;
m_DefaultLangPath = ((CMainDialog*)pParent)->m_DefaultLangPath;
m_ZoomType = ((CMainDialog*)pParent)->GetZoomType();

m_FontFace = ((CMainDialog*)pParent)->m_FontFace;
m_FontType = FT_GDI_PLUS;//((CMainDialog*) pParent)->m_FontType;
m_CxThemeDir = ((CDiskInfoApp*)AfxGetApp())->m_ThemeDir;
m_CxCurrentTheme = ((CMainDialog*)pParent)->m_CurrentTheme;
m_CxDefaultTheme = ((CMainDialog*)pParent)->m_DefaultTheme;
CMainDialog* p = (CMainDialog*)pParent;

m_ZoomType = p->GetZoomType();
m_FontScale = p->GetFontScale();
m_FontRatio = p->GetFontRatio();
m_FontFace = p->GetFontFace();
m_CurrentLangPath = p->GetCurrentLangPath();
m_DefaultLangPath = p->GetDefaultLangPath();
m_ThemeDir = p->GetThemeDir();
m_CurrentTheme = p->GetCurrentTheme();
m_DefaultTheme = p->GetDefaultTheme();
m_Ini = p->GetIniPath();

#ifdef SUISHO_SHIZUKU_SUPPORT
#ifdef KUREI_KEI_SUPPORT
Expand All @@ -42,7 +45,7 @@ CAboutDlg::~CAboutDlg()

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogCx::DoDataExchange(pDX);
CDialogFx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_CRYSTAL_DEW_WORLD, m_CtrlCrystalDewWorld);

DDX_Control(pDX, IDC_PROJECT_SITE_1, m_CtrlProjectSite1);
Expand All @@ -62,11 +65,11 @@ void CAboutDlg::DoDataExchange(CDataExchange* pDX)

BOOL CAboutDlg::OnInitDialog()
{
CDialogCx::OnInitDialog();
CDialogFx::OnInitDialog();

SetWindowText(i18n(_T("WindowTitle"), _T("ABOUT")));

m_FlagShowWindow = TRUE;
m_bShowWindow = TRUE;
m_CtrlVersion.SetWindowTextW(PRODUCT_NAME L" " PRODUCT_VERSION);
m_CtrlEdition.SetWindowTextW(PRODUCT_EDITION);
m_CtrlRelease.SetWindowTextW(L"Release: " PRODUCT_RELEASE);
Expand All @@ -89,7 +92,7 @@ BOOL CAboutDlg::OnInitDialog()
return TRUE;
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialogCx)
BEGIN_MESSAGE_MAP(CAboutDlg, CDialogFx)
ON_BN_CLICKED(IDC_CRYSTAL_DEW_WORLD, &CAboutDlg::OnCrystalDewWorld)
#ifdef SUISHO_SHIZUKU_SUPPORT
ON_BN_CLICKED(IDC_SECRET_VOICE, &CAboutDlg::OnSecretVoice)
Expand All @@ -104,13 +107,13 @@ END_MESSAGE_MAP()
void CAboutDlg::UpdateDialogSize()
{
ChangeZoomType(m_ZoomType);
if (m_IsHighContrast)
if (m_bHighContrast)
{
SetClientRect((DWORD)(SIZE_X * m_ZoomRatio), (DWORD)(SIZE_HC_Y * m_ZoomRatio), 0);
SetClientSize((DWORD)(SIZE_X * m_ZoomRatio), (DWORD)(SIZE_HC_Y * m_ZoomRatio), 0);
}
else
{
SetClientRect((DWORD)(SIZE_X * m_ZoomRatio), (DWORD)(SIZE_Y * m_ZoomRatio), 0);
SetClientSize((DWORD)(SIZE_X * m_ZoomRatio), (DWORD)(SIZE_Y * m_ZoomRatio), 0);
}

UpdateBackground(true);
Expand All @@ -121,20 +124,20 @@ void CAboutDlg::UpdateDialogSize()
#ifdef SUISHO_SHIZUKU_SUPPORT

#ifdef KUREI_KEI_SUPPORT
m_CtrlProjectSite1.InitControl(340, 232, 268, 100, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite2.InitControl(386, 376, 48, 40, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite3.InitControl(492, 376, 108, 40, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite4.InitControl(386, 600, 224, 60, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite5.InitControl(0, 0, 0, 0, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite1.InitControl(340, 232, 268, 100, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite2.InitControl(386, 376, 48, 40, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite3.InitControl(492, 376, 108, 40, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite4.InitControl(386, 600, 224, 60, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite5.InitControl(0, 0, 0, 0, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite5.ShowWindow(SW_HIDE);
m_CtrlSecretVoice.InitControl(132, 324, 48, 28, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlSecretVoice.InitControl(132, 324, 48, 28, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
#else
m_CtrlProjectSite1.InitControl(340, 324, 292, 20, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite2.InitControl(340, 368, 292, 20, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite3.InitControl(340, 392, 292, 20, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite4.InitControl(340, 416, 292, 20, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite5.InitControl(320, 192, 292, 92, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlSecretVoice.InitControl(200, 412, 40, 40, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlProjectSite1.InitControl(340, 324, 292, 20, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite2.InitControl(340, 368, 292, 20, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite3.InitControl(340, 392, 292, 20, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite4.InitControl(340, 416, 292, 20, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlProjectSite5.InitControl(320, 192, 292, 92, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
m_CtrlSecretVoice.InitControl(200, 412, 40, 40, m_ZoomRatio, NULL, 0, 0, CButtonCx::OwnerDrawTransparent | m_bHighContrast);
#endif

m_CtrlProjectSite1.SetHandCursor();
Expand All @@ -145,17 +148,17 @@ void CAboutDlg::UpdateDialogSize()
m_CtrlSecretVoice.SetHandCursor();
#endif

m_CtrlVersion.SetFontEx(m_FontFace, 28, m_ZoomRatio, 255, RGB(0, 0, 0), FW_BOLD, m_FontType);
m_CtrlEdition.SetFontEx(m_FontFace, 28, m_ZoomRatio, 255, RGB(0, 0, 0), FW_BOLD, m_FontType);
m_CtrlRelease.SetFontEx(m_FontFace, 16, m_ZoomRatio, 255, RGB(0, 0, 0), FW_NORMAL, m_FontType);
m_CtrlCopyright.SetFontEx(m_FontFace, 16, m_ZoomRatio, 255, RGB(0, 0, 0), FW_NORMAL, m_FontType);
m_CtrlLicense.SetFontEx(m_FontFace, 16, m_ZoomRatio, 255, RGB(0, 0, 0), FW_NORMAL, m_FontType);

m_CtrlVersion.InitControl(200, 12, 420, 36, m_ZoomRatio, NULL, 0, SS_CENTER, CStaticCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlEdition.InitControl(200, 48, 420, 36, m_ZoomRatio, NULL, 0, SS_CENTER, CStaticCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlRelease.InitControl(200, 88, 420, 24, m_ZoomRatio, NULL, 0, SS_CENTER, CStaticCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlCopyright.InitControl(200, 112, 420, 24, m_ZoomRatio, NULL, 0, SS_CENTER, CStaticCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlLicense.InitControl(200, 136, 420, 24, m_ZoomRatio, NULL, 0, SS_CENTER, CStaticCx::OwnerDrawTransparent | m_IsHighContrast);
m_CtrlVersion.SetFontEx(m_FontFace, 28, m_ZoomRatio, 255, RGB(0, 0, 0), FW_BOLD);
m_CtrlEdition.SetFontEx(m_FontFace, 28, m_ZoomRatio, 255, RGB(0, 0, 0), FW_BOLD);
m_CtrlRelease.SetFontEx(m_FontFace, 16, m_ZoomRatio, 255, RGB(0, 0, 0), FW_NORMAL);
m_CtrlCopyright.SetFontEx(m_FontFace, 16, m_ZoomRatio, 255, RGB(0, 0, 0), FW_NORMAL);
m_CtrlLicense.SetFontEx(m_FontFace, 16, m_ZoomRatio, 255, RGB(0, 0, 0), FW_NORMAL);

m_CtrlVersion.InitControl(200, 12, 420, 36, m_ZoomRatio, NULL, 0, SS_CENTER, OwnerDrawTransparent | m_bHighContrast);
m_CtrlEdition.InitControl(200, 48, 420, 36, m_ZoomRatio, NULL, 0, SS_CENTER, OwnerDrawTransparent | m_bHighContrast);
m_CtrlRelease.InitControl(200, 88, 420, 24, m_ZoomRatio, NULL, 0, SS_CENTER, OwnerDrawTransparent | m_bHighContrast);
m_CtrlCopyright.InitControl(200, 112, 420, 24, m_ZoomRatio, NULL, 0, SS_CENTER, OwnerDrawTransparent | m_bHighContrast);
m_CtrlLicense.InitControl(200, 136, 420, 24, m_ZoomRatio, NULL, 0, SS_CENTER, OwnerDrawTransparent | m_bHighContrast);

Invalidate();
}
Expand Down
4 changes: 2 additions & 2 deletions AboutDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
/*---------------------------------------------------------------------------*/

#pragma once
#include "DialogCx.h"
#include "DialogFx.h"
#include "StaticCx.h"
#include "ButtonCx.h"

class CAboutDlg : public CDialogCx
class CAboutDlg : public CDialogFx
{
DECLARE_DYNCREATE(CAboutDlg)

Expand Down
44 changes: 23 additions & 21 deletions AtaSmart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,20 @@ CAtaSmart::CAtaSmart()
GetVersionEx((OSVERSIONINFO *)&m_Os);
}

m_FlagAtaPassThrough = FALSE;
m_FlagAtaPassThroughSmart = FALSE;
m_FlagNVMeStorageQuery = FALSE;
m_bAtaPassThrough = FALSE;
m_bAtaPassThroughSmart = FALSE;
m_bNVMeStorageQuery = FALSE;

if (m_Os.dwMajorVersion >= 10)
{
m_FlagAtaPassThrough = TRUE;
m_FlagAtaPassThroughSmart = TRUE;
m_FlagNVMeStorageQuery = TRUE;
m_bAtaPassThrough = TRUE;
m_bAtaPassThroughSmart = TRUE;
m_bNVMeStorageQuery = TRUE;
}
else if(m_Os.dwMajorVersion >= 6 || (m_Os.dwMajorVersion == 5 && m_Os.dwMinorVersion == 2))
{
m_FlagAtaPassThrough = TRUE;
m_FlagAtaPassThroughSmart = TRUE;
m_bAtaPassThrough = TRUE;
m_bAtaPassThroughSmart = TRUE;
}
else if(m_Os.dwMajorVersion == 5 && m_Os.dwMinorVersion == 1)
{
Expand All @@ -113,8 +113,8 @@ CAtaSmart::CAtaSmart()
cstr.Replace(_T("Service Pack "), _T(""));
if(_tstoi(cstr) >= 2)
{
m_FlagAtaPassThrough = TRUE;
m_FlagAtaPassThroughSmart = TRUE;
m_bAtaPassThrough = TRUE;
m_bAtaPassThroughSmart = TRUE;
}
}
}
Expand All @@ -126,7 +126,7 @@ CAtaSmart::~CAtaSmart()
/* PUBLIC FUNCTION */
VOID CAtaSmart::SetAtaPassThroughSmart(BOOL flag)
{
m_FlagAtaPassThroughSmart = flag;
m_bAtaPassThroughSmart = flag;
}

/* PUBLIC FUNCTION */
Expand All @@ -143,7 +143,7 @@ DWORD CAtaSmart::UpdateSmartInfo(DWORD i)
{
NVMeSmartToATASmart(vars[i].SmartReadData, &(vars[i].Attribute));

if ((m_FlagNVMeStorageQuery && vars[i].CommandType == CMD_TYPE_NVME_STORAGE_QUERY && GetSmartAttributeNVMeStorageQuery(vars[i].PhysicalDriveId, vars[i].ScsiPort, vars[i].ScsiTargetId, &(vars[i])))
if ((m_bNVMeStorageQuery && vars[i].CommandType == CMD_TYPE_NVME_STORAGE_QUERY && GetSmartAttributeNVMeStorageQuery(vars[i].PhysicalDriveId, vars[i].ScsiPort, vars[i].ScsiTargetId, &(vars[i])))
|| (vars[i].CommandType == CMD_TYPE_NVME_INTEL && GetSmartAttributeNVMeIntel(vars[i].PhysicalDriveId, vars[i].ScsiPort, vars[i].ScsiTargetId, &(vars[i])))
|| (vars[i].CommandType == CMD_TYPE_NVME_INTEL_RST && GetSmartAttributeNVMeIntelRst(vars[i].PhysicalDriveId, vars[i].ScsiPort, vars[i].ScsiTargetId, &(vars[i])))
|| (vars[i].CommandType == CMD_TYPE_NVME_SAMSUNG && GetSmartAttributeNVMeSamsung(vars[i].PhysicalDriveId, vars[i].ScsiPort, vars[i].ScsiTargetId, &(vars[i])))
Expand Down Expand Up @@ -1119,7 +1119,9 @@ VOID CAtaSmart::Init(BOOL useWmi, BOOL advancedDiskSearch, PBOOL flagChangeDisk,
VariantClear(&pVal);
if(cstr.Find(_T("USBSTOR")) >= 0)
{
EXTERNAL_DISK_INFO edi = {0};
EXTERNAL_DISK_INFO edi;
edi.UsbProductId = 0;
edi.UsbVendorId = 0;
int curPos= 0;
CString resToken;
resToken = deviceId.Tokenize(_T("\\&"), curPos);
Expand Down Expand Up @@ -2648,7 +2650,7 @@ BOOL CAtaSmart::AddDisk(INT physicalDriveId, INT scsiPort, INT scsiTargetId, INT
asi.IsSmartEnabled = FALSE;

/* 2013/04/12 Disabled
m_FlagAtaPassThroughSmart = TRUE; // Force Enable ATA_PASS_THROUGH
m_bAtaPassThroughSmart = TRUE; // Force Enable ATA_PASS_THROUGH
debug.Format(_T("GetSmartAttributePd(%d) - 1"), physicalDriveId);
DebugPrint(debug);
Expand Down Expand Up @@ -3180,7 +3182,7 @@ BOOL CAtaSmart::AddDiskNVMe(INT physicalDriveId, INT scsiPort, INT scsiTargetId,
+ ((ULONG64)(asi.IdentifyDevice.B.Bin[10]));
*/
if (
(m_FlagNVMeStorageQuery && commandType == CMD_TYPE_NVME_STORAGE_QUERY && GetSmartAttributeNVMeStorageQuery(physicalDriveId, scsiPort, scsiTargetId, &asi))
(m_bNVMeStorageQuery && commandType == CMD_TYPE_NVME_STORAGE_QUERY && GetSmartAttributeNVMeStorageQuery(physicalDriveId, scsiPort, scsiTargetId, &asi))
|| (commandType == CMD_TYPE_NVME_INTEL && GetSmartAttributeNVMeIntel(physicalDriveId, scsiPort, scsiTargetId, &asi))
|| (commandType == CMD_TYPE_NVME_INTEL_RST && GetSmartAttributeNVMeIntelRst(physicalDriveId, scsiPort, scsiTargetId, &asi))
|| (commandType == CMD_TYPE_NVME_SAMSUNG && GetSmartAttributeNVMeSamsung(physicalDriveId, scsiPort, scsiTargetId, &asi))
Expand Down Expand Up @@ -4654,7 +4656,7 @@ BOOL CAtaSmart::GetDiskInfo(INT physicalDriveId, INT scsiPort, INT scsiTargetId,

debug.Format(_T("DoIdentifyDeviceNVMeStorageQuery"));
DebugPrint(debug);
if (m_FlagNVMeStorageQuery && DoIdentifyDeviceNVMeStorageQuery(physicalDriveId, scsiPort, scsiTargetId, &identify))
if (m_bNVMeStorageQuery && DoIdentifyDeviceNVMeStorageQuery(physicalDriveId, scsiPort, scsiTargetId, &identify))
{
debug.Format(_T("AddDiskNVMe - CMD_TYPE_NVME_STORAGE_QUERY"));
DebugPrint(debug);
Expand Down Expand Up @@ -5034,7 +5036,7 @@ BOOL CAtaSmart::DoIdentifyDevicePd(INT physicalDriveId, BYTE target, IDENTIFY_DE
return FALSE;
}

if(m_FlagAtaPassThrough && m_FlagAtaPassThroughSmart)
if(m_bAtaPassThrough && m_bAtaPassThroughSmart)
{
DebugPrint(_T("SendAtaCommandPd - IDENTIFY_DEVICE (ATA_PASS_THROUGH)"));
bRet = SendAtaCommandPd(physicalDriveId, target, 0xEC, 0x00, 0x00, (PBYTE)data, sizeof(IDENTIFY_DEVICE));
Expand Down Expand Up @@ -5086,7 +5088,7 @@ BOOL CAtaSmart::GetSmartAttributePd(INT physicalDriveId, BYTE target, ATA_SMART_
SMART_READ_DATA_OUTDATA sendCmdOutParam;
SENDCMDINPARAMS sendCmd;

if(m_FlagAtaPassThrough && m_FlagAtaPassThroughSmart)
if(m_bAtaPassThrough && m_bAtaPassThroughSmart)
{
DebugPrint(_T("SendAtaCommandPd - SMART_READ_DATA (ATA_PASS_THROUGH)"));
bRet = SendAtaCommandPd(physicalDriveId, target, SMART_CMD, READ_ATTRIBUTES, 0x00,
Expand Down Expand Up @@ -5141,7 +5143,7 @@ BOOL CAtaSmart::GetSmartThresholdPd(INT physicalDriveId, BYTE target, ATA_SMART_
SMART_READ_DATA_OUTDATA sendCmdOutParam;
SENDCMDINPARAMS sendCmd;

if(m_FlagAtaPassThrough && m_FlagAtaPassThroughSmart)
if(m_bAtaPassThrough && m_bAtaPassThroughSmart)
{
DebugPrint(_T("SendAtaCommandPd - SMART_READ_THRESHOLDS (ATA_PASS_THROUGH)"));
bRet = SendAtaCommandPd(physicalDriveId, target, SMART_CMD, READ_THRESHOLDS, 0x00,
Expand Down Expand Up @@ -5196,7 +5198,7 @@ BOOL CAtaSmart::ControlSmartStatusPd(INT physicalDriveId, BYTE target, BYTE comm
SENDCMDINPARAMS sendCmd;
SENDCMDOUTPARAMS sendCmdOutParam;

if(m_FlagAtaPassThrough && m_FlagAtaPassThroughSmart)
if(m_bAtaPassThrough && m_bAtaPassThroughSmart)
{
DebugPrint(_T("SendAtaCommandPd - SMART_CONTROL_STATUS (ATA_PASS_THROUGH)"));
bRet = SendAtaCommandPd(physicalDriveId, target, SMART_CMD, command, 0x00, NULL, 0);
Expand Down Expand Up @@ -5246,7 +5248,7 @@ BOOL CAtaSmart::SendAtaCommandPd(INT physicalDriveId, BYTE target, BYTE main, BY
return FALSE;
}

if(m_FlagAtaPassThrough)
if(m_bAtaPassThrough)
{
ATA_PASS_THROUGH_EX_WITH_BUFFERS ab;
::ZeroMemory(&ab, sizeof(ab));
Expand Down
6 changes: 3 additions & 3 deletions AtaSmart.h
Original file line number Diff line number Diff line change
Expand Up @@ -1740,9 +1740,9 @@ struct MEGARAID_PHYSICAL_DRIVE_LIST
protected:
OSVERSIONINFOEX m_Os;
CString m_SerialNumberA_Z[26];
BOOL m_FlagAtaPassThrough;
BOOL m_FlagAtaPassThroughSmart;
BOOL m_FlagNVMeStorageQuery;
BOOL m_bAtaPassThrough;
BOOL m_bAtaPassThroughSmart;
BOOL m_bNVMeStorageQuery;

BOOL GetDiskInfo(INT physicalDriveId, INT scsiPort, INT scsiTargetId, INTERFACE_TYPE interfaceType, COMMAND_TYPE commandType, VENDOR_ID vendorId, DWORD productId = 0, INT scsiBus = -1, DWORD siliconImageId = 0, BOOL FlagNvidiaController = 0, BOOL FlagMarvellController = 0, CString pnpDeviceId = _T(""), BOOL FlagNVMe = FALSE, BOOL FlagUasp = FALSE);
BOOL AddDisk(INT PhysicalDriveId, INT ScsiPort, INT scsiTargetId, INT scsiBus, BYTE target, COMMAND_TYPE commandType, IDENTIFY_DEVICE* identify, INT siliconImageType = -1, PCSMI_SAS_PHY_ENTITY sasPhyEntity = NULL, CString pnpDeviceId = _T(""));
Expand Down
72 changes: 72 additions & 0 deletions CommonFx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*---------------------------------------------------------------------------*/
// Author : hiyohiyo
// Mail : [email protected]
// Web : https://crystalmark.info/
// License : The MIT License
/*---------------------------------------------------------------------------*/

#pragma once

//------------------------------------------------
// Naming Conventions
//------------------------------------------------
// BOOL bXxxxYyyy
// HANDLE hXxxxYyyy
// Pointer pXxxxYyyy
// Function SampleFunction
// Variable sampleVariable
// Const Value ConstVaiable
// Member Variable m_XxxxYyyy

//------------------------------------------------
// Order for C*****Fx Control
//------------------------------------------------
// Control > Draw Control > Image > Font > Mouse > ToolTip
//

//------------------------------------------------
// Utility Macros
//------------------------------------------------

#define SAFE_DELETE(p) {if(p){delete (p);(p)=NULL;}}

//------------------------------------------------
// WM_APP
//------------------------------------------------
// WM_APP + 0x0000-0x0FFF: User Application
// WM_APP + 0x1000-0x1FFF: Project Priscilla
// WM_APP + 0x2000-0x2FFF: Themes
// WM_APP + 0x3000-0x3FFF: Languages

#define WM_UPDATE_DIALOG_SIZE (WM_APP + 0x1000)
#define WM_THEME_ID (WM_APP + 0x2000)
#define WM_LANGUAGE_ID (WM_APP + 0x3000)

//------------------------------------------------
// TIMER ID
//------------------------------------------------

static const int TimerUpdateDialogSize = 0x2001;

//------------------------------------------------
// Const Values
//------------------------------------------------

static const int ControlImageNormal = 0x0000;
static const int ControlImageHover = 0x0001;
static const int ControlImageFocus = 0x0002;
static const int ControlImageDisabled = 0x0003;

static const int HighContrast = 0x0001;
static const int SystemDraw = 0x0002;
static const int OwnerDrawImage = 0x0004;
static const int OwnerDrawGlass = 0x0008;
static const int OwnerDrawTransparent = 0x0010;

static const int ZoomTypeAuto = 0;
static const int ZoomType100 = 100;
static const int ZoomType125 = 125;
static const int ZoomType150 = 150;
static const int ZoomType200 = 200;
static const int ZoomType250 = 250;
static const int ZoomType300 = 300;
Loading

0 comments on commit 4203572

Please sign in to comment.