Enable high dpi awareness for play. Still some polishing to do.

This commit is contained in:
Ian Brown 2014-05-22 23:28:37 +01:00 committed by Jean-Philip Desjardins
parent 7651fb181c
commit 5ada8dd415
12 changed files with 100 additions and 63 deletions

Binary file not shown.

View File

@ -3,6 +3,7 @@
#include "DisAsm.h"
#include "resource.h"
#include "win32/InputBox.h"
#include "win32/Font.h"
#include "string_cast.h"
#include "lexical_cast_ex.h"
#include "WinUtils.h"
@ -24,7 +25,7 @@
CDisAsm::CDisAsm(HWND hParent, const RECT& rect, CVirtualMachine& virtualMachine, CMIPS* ctx)
: m_virtualMachine(virtualMachine)
, m_font(CreateFont(-11, 0, 0, 0, FW_NORMAL, 0, 0, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, _T("Courier New")))
, m_font(Framework::Win32::CreateFont(_T("Courier New"), 11))
, m_ctx(ctx)
, m_selected(0)
, m_selectionEnd(-1)
@ -651,11 +652,10 @@ void CDisAsm::Paint(HDC hDC)
BitBlt(hDC, 0, 0, rwin.right, rwin.bottom, NULL, 0, 0, WHITENESS);
SIZE s;
deviceContext.SelectObject(m_font);
GetTextExtentPoint32(hDC, _T("0"), 1, &s);
GetTextExtentPoint32(hDC, _T("0"), 1, &m_char_extent);
int lines = (rwin.bottom - (YMARGIN * 2)) / (s.cy + YSPACE);
int lines = (rwin.bottom - (YMARGIN * 2)) / (m_char_extent.cy + YSPACE);
lines++;
RECT rmarg;
@ -732,7 +732,7 @@ void CDisAsm::Paint(HDC hDC)
)
{
RECT rsel;
SetRect(&rsel, 18, y, rwin.right, y + s.cy + YSPACE);
SetRect(&rsel, 18, y, rwin.right, y + m_char_extent.cy + YSPACE);
if(m_focus)
{
FillRect(hDC, &rsel, (HBRUSH)GetStockObject(BLACK_BRUSH));
@ -762,27 +762,27 @@ void CDisAsm::Paint(HDC hDC)
SelectObject(hDC, ltGrayPen);
if(address == sub->start)
{
MoveToEx(hDC, 90, y + s.cy + YSPACE, NULL);
LineTo(hDC, 90, y + ((s.cy + YSPACE) / 2) - 1);
LineTo(hDC, 95, y + ((s.cy + YSPACE) / 2));
MoveToEx(hDC, 90, y + m_char_extent.cy + YSPACE, NULL);
LineTo(hDC, 90, y + ((m_char_extent.cy + YSPACE) / 2) - 1);
LineTo(hDC, 95, y + ((m_char_extent.cy + YSPACE) / 2));
}
else if(address == sub->end)
{
MoveToEx(hDC, 90, y, NULL);
LineTo(hDC, 90, y + ((s.cy + YSPACE) / 2));
LineTo(hDC, 95, y + ((s.cy + YSPACE) / 2));
LineTo(hDC, 90, y + ((m_char_extent.cy + YSPACE) / 2));
LineTo(hDC, 95, y + ((m_char_extent.cy + YSPACE) / 2));
}
else
{
MoveToEx(hDC, 90, y, NULL);
LineTo(hDC, 90, y + s.cy + YSPACE);
LineTo(hDC, 90, y + m_char_extent.cy + YSPACE);
}
}
DrawInstructionDetails(deviceContext, address, y);
DrawInstructionMetadata(deviceContext, address, y);
y += s.cy + YSPACE;
y += m_char_extent.cy + YSPACE;
}
DeleteObject(ltGrayPen);
@ -824,24 +824,24 @@ std::tstring CDisAsm::GetInstructionDetailsText(uint32 address)
unsigned int CDisAsm::GetMetadataPosition() const
{
return 450;
return m_char_extent.cx * 45;
}
void CDisAsm::DrawInstructionDetails(Framework::Win32::CDeviceContext& deviceContext, uint32 address, int y)
{
uint32 data = GetInstruction(address);
deviceContext.TextOut(100, y, lexical_cast_hex<std::tstring>(data, 8).c_str());
deviceContext.TextOut(m_char_extent.cx*10, y, lexical_cast_hex<std::tstring>(data, 8).c_str());
{
char disAsm[256];
m_ctx->m_pArch->GetInstructionMnemonic(m_ctx, address, data, disAsm, 256);
deviceContext.TextOut(200, y, string_cast<std::tstring>(disAsm).c_str());
deviceContext.TextOut(m_char_extent.cx * 20, y, string_cast<std::tstring>(disAsm).c_str());
}
{
char disAsm[256];
m_ctx->m_pArch->GetInstructionOperands(m_ctx, address, data, disAsm, 256);
deviceContext.TextOut(300, y, string_cast<std::tstring>(disAsm).c_str());
deviceContext.TextOut(m_char_extent.cx * 30, y, string_cast<std::tstring>(disAsm).c_str());
}
}

View File

@ -40,6 +40,8 @@ protected:
CMIPS* m_ctx;
int32 m_instructionSize;
SIZE m_char_extent;
private:
enum
{

View File

@ -80,7 +80,7 @@ std::tstring CDisAsmVu::GetInstructionDetailsText(uint32 address)
unsigned int CDisAsmVu::GetMetadataPosition() const
{
return 900;
return m_char_extent.cx * 80;
}
void CDisAsmVu::DrawInstructionDetails(Framework::Win32::CDeviceContext& deviceContext, uint32 address, int y)
@ -91,29 +91,29 @@ void CDisAsmVu::DrawInstructionDetails(Framework::Win32::CDeviceContext& deviceC
uint32 upperInstruction = GetInstruction(address + 4);
std::tstring instructionCode = lexical_cast_hex<std::tstring>(upperInstruction, 8) + _T(" ") + lexical_cast_hex<std::tstring>(lowerInstruction, 8);
deviceContext.TextOut(100, y, instructionCode.c_str());
deviceContext.TextOut(m_char_extent.cx * 10, y, instructionCode.c_str());
{
char disAsm[256];
m_ctx->m_pArch->GetInstructionMnemonic(m_ctx, address + 4, upperInstruction, disAsm, 256);
deviceContext.TextOut(250, y, string_cast<std::tstring>(disAsm).c_str());
deviceContext.TextOut(m_char_extent.cx * 28, y, string_cast<std::tstring>(disAsm).c_str());
}
{
char disAsm[256];
m_ctx->m_pArch->GetInstructionOperands(m_ctx, address + 4, upperInstruction, disAsm, 256);
deviceContext.TextOut(350, y, string_cast<std::tstring>(disAsm).c_str());
deviceContext.TextOut(m_char_extent.cx * 36, y, string_cast<std::tstring>(disAsm).c_str());
}
{
char disAsm[256];
m_ctx->m_pArch->GetInstructionMnemonic(m_ctx, address + 0, lowerInstruction, disAsm, 256);
deviceContext.TextOut(600, y, string_cast<std::tstring>(disAsm).c_str());
deviceContext.TextOut(m_char_extent.cx * 55, y, string_cast<std::tstring>(disAsm).c_str());
}
{
char disAsm[256];
m_ctx->m_pArch->GetInstructionOperands(m_ctx, address + 0, lowerInstruction, disAsm, 256);
deviceContext.TextOut(700, y, string_cast<std::tstring>(disAsm).c_str());
deviceContext.TextOut(m_char_extent.cx * 62, y, string_cast<std::tstring>(disAsm).c_str());
}
}

View File

@ -14,6 +14,7 @@
#define CLSNAME _T("CMcManagerWnd")
#define WNDSTYLE (WS_CAPTION | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU)
#define WNDSTYLEEX (WS_EX_DLGMODALFRAME)
#define SCALE(x) MulDiv(x, ydpi, 96)
namespace filesystem = boost::filesystem;
@ -45,7 +46,9 @@ CMcManagerWnd::CMcManagerWnd(HWND hParent)
RegisterClassEx(&wc);
}
Create(WNDSTYLEEX, CLSNAME, _T("Memory Card Manager"), WNDSTYLE, Framework::Win32::CRect(0, 0, 600, 500), hParent, NULL);
int ydpi = GetDeviceCaps(GetDC(NULL), LOGPIXELSY);
Create(WNDSTYLEEX, CLSNAME, _T("Memory Card Manager"), WNDSTYLE, Framework::Win32::CRect(0, 0, SCALE(600), SCALE(500)), hParent, NULL);
SetClassPtr();
RECT rc = GetClientRect();
@ -64,24 +67,24 @@ CMcManagerWnd::CMcManagerWnd(HWND hParent)
m_pMemoryCardList->SetSelection(0);
Framework::FlatLayoutPtr pSubLayout0 = Framework::CHorizontalLayout::Create();
pSubLayout0->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(200, 23, m_pMemoryCardList));
pSubLayout0->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_pImportButton));
pSubLayout0->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(200), SCALE(23), m_pMemoryCardList));
pSubLayout0->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(100), SCALE(23), m_pImportButton));
pSubLayout0->InsertObject(Framework::CLayoutStretch::Create());
Framework::FlatLayoutPtr pSubLayout1 = Framework::CHorizontalLayout::Create();
pSubLayout1->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(130, 23, m_pMemoryCardView));
pSubLayout1->InsertObject(Framework::Win32::CLayoutWindow::CreateCustomBehavior(100, 100, 1, 1, m_pSaveView));
pSubLayout1->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(130), SCALE(23), m_pMemoryCardView));
pSubLayout1->InsertObject(Framework::Win32::CLayoutWindow::CreateCustomBehavior(SCALE(100), SCALE(100), 1, 1, m_pSaveView));
pSubLayout1->SetVerticalStretch(1);
Framework::FlatLayoutPtr pSubLayout2 = Framework::CHorizontalLayout::Create();
pSubLayout2->InsertObject(Framework::CLayoutStretch::Create());
pSubLayout2->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_pCloseButton));
pSubLayout2->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(100), SCALE(23), m_pCloseButton));
m_pLayout = Framework::CVerticalLayout::Create();
m_pLayout->InsertObject(pSubLayout0);
m_pLayout->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(200, 2, new Framework::Win32::CStatic(m_hWnd, rc, SS_ETCHEDFRAME)));
m_pLayout->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(200), 2, new Framework::Win32::CStatic(m_hWnd, rc, SS_ETCHEDFRAME)));
m_pLayout->InsertObject(pSubLayout1);
m_pLayout->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(200, 2, new Framework::Win32::CStatic(m_hWnd, rc, SS_ETCHEDFRAME)));
m_pLayout->InsertObject(Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(200), 2, new Framework::Win32::CStatic(m_hWnd, rc, SS_ETCHEDFRAME)));
m_pLayout->InsertObject(pSubLayout2);
RefreshLayout();

View File

@ -8,6 +8,8 @@
using namespace Framework;
#define SCALE(x) MulDiv(x, ydpi, 96)
template <typename T>
COptionWnd<T>::COptionWnd(HWND hParent, const TCHAR* sTitle)
: m_pTreeView(nullptr)
@ -26,15 +28,17 @@ COptionWnd<T>::COptionWnd(HWND hParent, const TCHAR* sTitle)
RegisterClassEx(&wc);
}
Create(NULL, CLSNAME, sTitle, WNDSTYLE, Framework::Win32::CRect(0, 0, 640, 480), hParent, NULL);
int ydpi = GetDeviceCaps(GetDC(NULL), LOGPIXELSY);
Create(NULL, CLSNAME, sTitle, WNDSTYLE, Framework::Win32::CRect(0, 0, SCALE(640), SCALE(480)), hParent, NULL);
SetClassPtr();
m_pTreeView = new Win32::CTreeView(m_hWnd, Framework::Win32::CRect(0, 0, 1, 1), TVS_LINESATROOT | TVS_HASBUTTONS | TVS_SHOWSELALWAYS | TVS_HASLINES);
m_pContainer = new Win32::CStatic(m_hWnd, Framework::Win32::CRect(0, 0, 1, 1));
m_pLayout = CHorizontalLayout::Create();
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateCustomBehavior(25, 20, 1, 0, m_pTreeView, false));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateCustomBehavior(75, 20, 3, 0, m_pContainer));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateCustomBehavior(25, SCALE(20), 1, 0, m_pTreeView, false));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateCustomBehavior(75, SCALE(20), 3, 0, m_pContainer));
RefreshLayout();
}

View File

@ -12,6 +12,7 @@
#define CLSNAME _T("ContollerSettingsWnd")
#define WNDSTYLE (WS_CAPTION | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU)
#define WNDSTYLEEX (WS_EX_DLGMODALFRAME)
#define SCALE(x) MulDiv(x, ydpi, 96)
using namespace PH_DirectInput;
@ -36,7 +37,9 @@ CControllerSettingsWnd::CControllerSettingsWnd(HWND parent, CInputManager& input
RegisterClassEx(&wc);
}
Create(WNDSTYLEEX, CLSNAME, _T("Controller Settings"), WNDSTYLE, Framework::Win32::CRect(0, 0, 550, 400), parent, NULL);
int ydpi = GetDeviceCaps(GetDC(NULL), LOGPIXELSY);
Create(WNDSTYLEEX, CLSNAME, _T("Controller Settings"), WNDSTYLE, Framework::Win32::CRect(0, 0, SCALE(550), SCALE(400)), parent, NULL);
SetClassPtr();
m_bindingList = new Framework::Win32::CListView(m_hWnd, Framework::Win32::CRect(0, 0, 1, 1), LVS_REPORT | LVS_NOSORTHEADER);
@ -48,12 +51,12 @@ CControllerSettingsWnd::CControllerSettingsWnd(HWND parent, CInputManager& input
m_layout =
Framework::VerticalLayoutContainer(
Framework::Win32::CLayoutWindow::CreateCustomBehavior(100, 100, 1, 1, m_bindingList) +
Framework::Win32::CLayoutWindow::CreateCustomBehavior(SCALE(100), SCALE(100), 1, 1, m_bindingList) +
Framework::HorizontalLayoutContainer(
Framework::Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_autoConfigButton) +
Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(100), SCALE(23), m_autoConfigButton) +
Framework::CLayoutStretch::Create() +
Framework::Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_ok) +
Framework::Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_cancel)
Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(100), SCALE(23), m_ok) +
Framework::Win32::CLayoutWindow::CreateButtonBehavior(SCALE(100), SCALE(23), m_cancel)
)
);

View File

@ -12,6 +12,8 @@
using namespace Framework;
#define SCALE(x) MulDiv(x, ydpi, 96)
CRendererSettingsWnd::CRendererSettingsWnd(HWND hParent, CGSH_OpenGL* pRenderer) :
CModalWindow(hParent)
{
@ -33,7 +35,11 @@ CModalWindow(hParent)
RegisterClassEx(&w);
}
Create(WNDSTYLEEX, CLSNAME, _T("Renderer Settings"), WNDSTYLE, Framework::Win32::CRect(0, 0, 400, 350), hParent, NULL);
int ydpi = GetDeviceCaps(GetDC(NULL), LOGPIXELSY);
int width = MulDiv(400, ydpi, 96);
int height = MulDiv(350, ydpi, 96);
Create(WNDSTYLEEX, CLSNAME, _T("Renderer Settings"), WNDSTYLE, Framework::Win32::CRect(0, 0, width, height), hParent, NULL);
SetClassPtr();
m_pOk = new Win32::CButton(_T("OK"), m_hWnd, Framework::Win32::CRect(0, 0, 1, 1));
@ -60,28 +66,28 @@ CModalWindow(hParent)
FlatLayoutPtr pSubLayout0 = CHorizontalLayout::Create();
{
pSubLayout0->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(150, 23, new Win32::CStatic(m_hWnd, _T("Swap frame buffer at:"), SS_CENTERIMAGE)));
pSubLayout0->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(150, SCALE(23), new Win32::CStatic(m_hWnd, _T("Swap frame buffer at:"), SS_CENTERIMAGE)));
pSubLayout0->InsertObject(CLayoutStretch::Create());
pSubLayout0->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 23, m_pFlipModeComboBox));
pSubLayout0->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, SCALE(23), m_pFlipModeComboBox));
pSubLayout0->SetVerticalStretch(0);
}
FlatLayoutPtr pSubLayout1 = CHorizontalLayout::Create();
{
pSubLayout1->InsertObject(CLayoutStretch::Create());
pSubLayout1->InsertObject(Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_pOk));
pSubLayout1->InsertObject(Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_pCancel));
pSubLayout1->InsertObject(Win32::CLayoutWindow::CreateButtonBehavior(100, SCALE(23), m_pOk));
pSubLayout1->InsertObject(Win32::CLayoutWindow::CreateButtonBehavior(100, SCALE(23), m_pCancel));
pSubLayout1->SetVerticalStretch(0);
}
m_pLayout = CVerticalLayout::Create();
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 15, m_pLineCheck));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 15, m_pForceBilinearCheck));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, SCALE(15), m_pLineCheck));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, SCALE(15), m_pForceBilinearCheck));
m_pLayout->InsertObject(pSubLayout0);
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 2, new Win32::CStatic(m_hWnd, rc, SS_ETCHEDHORZ)));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 15, new Win32::CStatic(m_hWnd, _T("OpenGL extension availability report:"))));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, SCALE(15), new Win32::CStatic(m_hWnd, _T("OpenGL extension availability report:"))));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateCustomBehavior(1, 1, 1, 1, m_pExtList));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 30, new Win32::CStatic(m_hWnd, _T("For more information about the consequences of the absence of an extension, please consult the documentation."), SS_LEFT)));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, SCALE(30), new Win32::CStatic(m_hWnd, _T("For more information about the consequences of the absence of an extension, please consult the documentation."), SS_LEFT)));
m_pLayout->InsertObject(pSubLayout1);
RefreshLayout();

View File

@ -81,7 +81,11 @@ Win32::CModalWindow(hParent)
EnableWindow(hParent, FALSE);
}
Create(WNDSTYLEEX, CLSNAME, _T("System Information"), WNDSTYLE, Framework::Win32::CRect(0, 0, 200, 285), hParent, NULL);
int ydpi = GetDeviceCaps(GetDC(NULL), LOGPIXELSY);
int width = MulDiv(200, ydpi, 96);
int height = MulDiv(285, ydpi, 96);
Create(WNDSTYLEEX, CLSNAME, _T("System Information"), WNDSTYLE, Framework::Win32::CRect(0, 0, width, height), hParent, NULL);
SetClassPtr();
m_pProcessor = new Win32::CStatic(m_hWnd, _T(""));
@ -89,13 +93,15 @@ Win32::CModalWindow(hParent)
m_pThreads = new Win32::CStatic(m_hWnd, _T(""));
m_pFeatures = new Win32::CListBox(m_hWnd, Framework::Win32::CRect(0, 0, 1, 1), WS_VSCROLL | LBS_SORT);
int lineHeight = MulDiv(20, ydpi, 96);
m_pLayout = CVerticalLayout::Create();
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 20, m_pProcesses));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 20, m_pThreads));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 20, new Win32::CStatic(m_hWnd, _T("Processor:"))));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 20, m_pProcessor));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 20, new Win32::CStatic(m_hWnd, _T("Processor Features:"))));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateCustomBehavior(200, 200, 1, 1, m_pFeatures));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, lineHeight, m_pProcesses));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, lineHeight, m_pThreads));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, lineHeight, new Win32::CStatic(m_hWnd, _T("Processor:"))));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, lineHeight, m_pProcessor));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateTextBoxBehavior(100, lineHeight, new Win32::CStatic(m_hWnd, _T("Processor Features:"))));
m_pLayout->InsertObject(Win32::CLayoutWindow::CreateCustomBehavior(lineHeight * 10, lineHeight*10, 1, 1, m_pFeatures));
m_nRDTSCThread = NULL;

View File

@ -15,6 +15,7 @@
#define CLSNAME _T("VFSManagerWnd")
#define WNDSTYLE (WS_CAPTION | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU)
#define WNDSTYLEEX (WS_EX_DLGMODALFRAME)
#define SCALE(x) MulDiv(x, ydpi, 96)
using namespace Framework;
using namespace std;
@ -36,7 +37,9 @@ CModalWindow(hParent)
RegisterClassEx(&w);
}
Create(WNDSTYLEEX, CLSNAME, _T("Virtual File System Manager"), WNDSTYLE, Framework::Win32::CRect(0, 0, 400, 250), hParent, NULL);
int ydpi = GetDeviceCaps(GetDC(NULL), LOGPIXELSY);
Create(WNDSTYLEEX, CLSNAME, _T("Virtual File System Manager"), WNDSTYLE, Framework::Win32::CRect(0, 0, SCALE(400), SCALE(250)), hParent, NULL);
SetClassPtr();
m_pList = new Win32::CListView(m_hWnd, Framework::Win32::CRect(0, 0, 1, 1), LVS_REPORT | LVS_SORTASCENDING);
@ -48,11 +51,11 @@ CModalWindow(hParent)
m_pLayout =
VerticalLayoutContainer(
LayoutExpression(Win32::CLayoutWindow::CreateCustomBehavior(1, 1, 1, 1, m_pList)) +
LayoutExpression(Win32::CLayoutWindow::CreateTextBoxBehavior(100, 40, new Win32::CStatic(m_hWnd, _T("Warning: Changing file system bindings while a program is running might be dangerous. Changes to 'cdrom0' bindings will take effect next time you load an executable."), SS_LEFT))) +
LayoutExpression(Win32::CLayoutWindow::CreateTextBoxBehavior(SCALE(100), SCALE(50), new Win32::CStatic(m_hWnd, _T("Warning: Changing file system bindings while a program is running might be dangerous. Changes to 'cdrom0' bindings will take effect next time you load an executable."), SS_LEFT))) +
HorizontalLayoutContainer(
LayoutExpression(CLayoutStretch::Create()) +
LayoutExpression(Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_pOk)) +
LayoutExpression(Win32::CLayoutWindow::CreateButtonBehavior(100, 23, m_pCancel))
LayoutExpression(Win32::CLayoutWindow::CreateButtonBehavior(SCALE(100), SCALE(23), m_pOk)) +
LayoutExpression(Win32::CLayoutWindow::CreateButtonBehavior(SCALE(100), SCALE(23), m_pCancel))
)
);

View File

@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Play" type="win32" />
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Play" type="win32" />
<description>Play! - PlayStation 2 Emulator</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>
</dependency>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

View File

@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<assemblyIdentity version="1.0.0.0" processorArchitecture="AMD64" name="Play" type="win32" />
<description>Play! - PlayStation 2 Emulator</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="AMD64" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>
</dependency>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>