Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f46f5148a3 | ||
|
|
97b083ed07 | ||
|
|
9743c6f757 | ||
|
|
481d2c3d5d | ||
|
|
2b831c83d1 | ||
|
|
42e47c057b | ||
|
|
965c1aad87 | ||
|
|
08084c2faf | ||
|
|
b5f9ed44eb | ||
|
|
bbc1bd8820 | ||
|
|
1efdd070bf | ||
|
|
90109d0014 | ||
|
|
6b7b711cea | ||
|
|
0c7d760a56 |
94
FontSel.cpp
94
FontSel.cpp
@@ -3,6 +3,7 @@ noMeiryoUI (C) 2005,2012,2013 Tatsuhiko Shoji
|
||||
The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
*/
|
||||
#include "FontSel.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
@@ -24,6 +25,16 @@ bool operator>(const FontInfo& left, const FontInfo& right)
|
||||
return (_tcscmp(left.logFont.lfFaceName, right.logFont.lfFaceName) < 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* EnumFontFamiliesEx<45>̃R<CC83>[<5B><><EFBFBD>o<EFBFBD>b<EFBFBD>N
|
||||
*
|
||||
*
|
||||
* @param lpelfe <20>_<EFBFBD><5F><EFBFBD>I<EFBFBD>ȃt<C883>H<EFBFBD><48><EFBFBD>g<EFBFBD>f<EFBFBD>[<5B>^
|
||||
* @param lpntme <20><><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD>ȃt<C883>H<EFBFBD><48><EFBFBD>g<EFBFBD>f<EFBFBD>[<5B>^
|
||||
* @param FontType <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>̎<EFBFBD><CC8E><EFBFBD>
|
||||
* @param lParam <20>A<EFBFBD>v<EFBFBD><76><EFBFBD>P<EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>`<60>̃f<CC83>[<5B>^
|
||||
* @return 0:<3A>𒆎~<7E><><EFBFBD><EFBFBD> 1:<3A><><EFBFBD>̃t<CC83>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><F18B9382><EFBFBD><EFBFBD>B
|
||||
*/
|
||||
int CALLBACK EnumFontFamExProc(
|
||||
ENUMLOGFONTEX *lpelfe, // <20>_<EFBFBD><5F><EFBFBD>I<EFBFBD>ȃt<C883>H<EFBFBD><48><EFBFBD>g<EFBFBD>f<EFBFBD>[<5B>^
|
||||
NEWTEXTMETRICEX *lpntme, // <20><><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD>ȃt<C883>H<EFBFBD><48><EFBFBD>g<EFBFBD>f<EFBFBD>[<5B>^
|
||||
@@ -89,8 +100,9 @@ int getFont()
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <20>R<EFBFBD><52><EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>N<EFBFBD>^
|
||||
*/
|
||||
FontSel::FontSel(HWND parent, int resource) : BaseDialog(parent, resource)
|
||||
{
|
||||
m_fontNameList = NULL;
|
||||
@@ -98,8 +110,12 @@ FontSel::FontSel(HWND parent, int resource) : BaseDialog(parent, resource)
|
||||
m_ChersetList = NULL;
|
||||
m_styleList = NULL;
|
||||
m_underline = NULL;
|
||||
previousFont = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>f<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>N<EFBFBD>^
|
||||
*/
|
||||
FontSel::~FontSel(void)
|
||||
{
|
||||
if (m_fontSizeList != NULL) {
|
||||
@@ -119,6 +135,9 @@ FontSel::~FontSel(void)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>_<EFBFBD>C<EFBFBD>A<EFBFBD><41><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
INT_PTR FontSel::OnInitDialog()
|
||||
{
|
||||
getFont();
|
||||
@@ -161,11 +180,68 @@ INT_PTR FontSel::OnInitDialog()
|
||||
m_fontSizeList->addItem(_T("48"));
|
||||
m_fontSizeList->addItem(_T("72"));
|
||||
|
||||
m_fontSizeList->setSelectedIndex(4);
|
||||
// <20>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
||||
if (previousFont != NULL) {
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>T<EFBFBD>C<EFBFBD>Y
|
||||
int count = m_fontSizeList->getCount();
|
||||
int point = getFontPointInt(previousFont, this->getHwnd());
|
||||
int selection = 0;
|
||||
for (int i = 0; i < count; i++) {
|
||||
int itemSize = _tstoi(m_fontSizeList->getItem(i).c_str());
|
||||
if (point >= itemSize) {
|
||||
selection = i;
|
||||
}
|
||||
}
|
||||
if (selection > -1) {
|
||||
m_fontSizeList->setSelectedIndex(selection);
|
||||
}
|
||||
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>t<EFBFBD>F<EFBFBD>C<EFBFBD>X
|
||||
for (int i = 0; i < fonts; i++) {
|
||||
if (!_tcscmp(fontList[i].logFont.lfFaceName, previousFont->lfFaceName)) {
|
||||
m_fontNameList->setSelectedIndex(i);
|
||||
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>ɍ<EFBFBD><C98D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>R<EFBFBD>[<5B>h<EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD><67><EFBFBD>ݒ肷<DD92><E882B7><EFBFBD>B
|
||||
setCharset();
|
||||
int charsetCount = fontList[i].charsetList.size();
|
||||
for (int j = 0; j < charsetCount; j++) {
|
||||
if (fontList[i].charsetList[j] == previousFont->lfCharSet) {
|
||||
m_ChersetList->setSelectedIndex(j);
|
||||
}
|
||||
}
|
||||
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>ɍ<EFBFBD><C98D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>^<5E>C<EFBFBD><43>(<28><><EFBFBD><EFBFBD><EFBFBD>E<EFBFBD>C<EFBFBD>^<5E><><EFBFBD>b<EFBFBD>N)<29><><EFBFBD>ݒ肷<DD92><E882B7><EFBFBD>B
|
||||
setStyle();
|
||||
int style = 0;
|
||||
// <20>C<EFBFBD>^<5E><><EFBFBD>b<EFBFBD>N
|
||||
if (previousFont->lfItalic) {
|
||||
style |= 1;
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
if (previousFont->lfWeight > 400) {
|
||||
style |= 2;
|
||||
}
|
||||
m_styleList->setSelectedIndex(style);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
if (previousFont->lfUnderline) {
|
||||
m_underline->setChecked(true);
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (previousFont->lfStrikeOut) {
|
||||
m_strike->setChecked(true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (INT_PTR)FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <20>e<EFBFBD><65><EFBFBD><EFBFBD><EFBFBD>ɑ<C991><CE82>鏈<EFBFBD><E98F88><EFBFBD>̕<EFBFBD><CC95><EFBFBD>
|
||||
*
|
||||
@@ -322,6 +398,9 @@ void FontSel::setStyle(void)
|
||||
m_styleList->setSelectedIndex(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* OK<4F>{<7B>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̓<EFBFBD><CC93><EFBFBD>
|
||||
*/
|
||||
INT_PTR FontSel::onOK(void)
|
||||
{
|
||||
int selectedFontIndex = m_fontNameList->getSelectedIndex();
|
||||
@@ -384,6 +463,15 @@ INT_PTR FontSel::onOK(void)
|
||||
selectedFont.lfWidth = 0;
|
||||
ReleaseDC(this->hWnd, hDC);
|
||||
|
||||
// Windows 8<>݊<EFBFBD><DD8A>̏ꍇ<CC8F>̓s<CD83>N<EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>g<EFBFBD><67><EFBFBD>w<EFBFBD>肵<EFBFBD><E882B5><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>g<EFBFBD><67><EFBFBD>菬<EFBFBD><E88FAC><EFBFBD><EFBFBD><EFBFBD>ꍇ<EFBFBD>A
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>̍<EFBFBD><CC8D><EFBFBD><EFBFBD>̃s<CC83>N<EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD>̐<EFBFBD><CC90>Βl<CE92>𑝂₷<F0919D82>B
|
||||
if (WIN8_SIZE) {
|
||||
if (abs(getFontPointInt(&selectedFont, this->getHwnd())) < point) {
|
||||
// <20>s<EFBFBD>N<EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD>̓}<7D>C<EFBFBD>i<EFBFBD>X<EFBFBD>Ŏw<C58E>肷<EFBFBD><E882B7><EFBFBD>̂<EFBFBD>1<EFBFBD><31><EFBFBD>炵<EFBFBD>Đ<EFBFBD><C490>Βl<CE92>𑝂₷<F0919D82>B
|
||||
selectedFont.lfHeight--;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_underline->isChecked()) {
|
||||
selectedFont.lfUnderline = TRUE;
|
||||
} else {
|
||||
|
||||
@@ -28,6 +28,7 @@ private:
|
||||
TwrCheckbox *m_strike;
|
||||
|
||||
LOGFONT selectedFont;
|
||||
LOGFONT *previousFont;
|
||||
|
||||
void setCharset(void);
|
||||
void setStyle(void);
|
||||
@@ -44,6 +45,9 @@ public:
|
||||
LOGFONT getSelectedFont() {
|
||||
return selectedFont;
|
||||
}
|
||||
void setPreviousFont(LOGFONT *item) {
|
||||
previousFont = item;
|
||||
}
|
||||
void setNoMeiryoUI();
|
||||
|
||||
};
|
||||
|
||||
@@ -95,6 +95,21 @@ int TwrCombobox::getSelectedIndex(void)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>v<EFBFBD>f<EFBFBD>̐<EFBFBD><CC90><EFBFBD><EFBFBD>擾<EFBFBD><E693BE><EFBFBD>܂<EFBFBD><DC82>B
|
||||
*
|
||||
* @return -1:<3A>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>Ȃ<EFBFBD> -1<>ȊO:<3A>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>ꂽ<EFBFBD>ꏊ
|
||||
*/
|
||||
int TwrCombobox::getCount(void)
|
||||
{
|
||||
LRESULT result = SendMessage(hWnd, CB_GETCOUNT, 0, 0);
|
||||
if (result == CB_ERR) {
|
||||
return -1;
|
||||
} else {
|
||||
return (int)result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>R<EFBFBD><52><EFBFBD>{<7B>{<7B>b<EFBFBD>N<EFBFBD>X<EFBFBD><58><EFBFBD>N<EFBFBD><4E><EFBFBD>A<EFBFBD><41><EFBFBD>܂<EFBFBD><DC82>B
|
||||
*/
|
||||
@@ -142,3 +157,28 @@ tstring TwrCombobox::getSelectedText(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>w<EFBFBD>肵<EFBFBD><E882B5><EFBFBD>ʒu<CA92>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԃ<EFBFBD><D482>܂<EFBFBD><DC82>B
|
||||
*
|
||||
* @param index <20>擾<EFBFBD><E693BE><EFBFBD>鍀<EFBFBD>ڂ̈ʒu
|
||||
* @return <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĂȂ<C482><C882>ꍇ<EFBFBD>͋<EFBFBD>)
|
||||
*/
|
||||
tstring TwrCombobox::getItem(int index)
|
||||
{
|
||||
TCHAR *buf;
|
||||
tstring ret = _T("");
|
||||
LRESULT len;
|
||||
|
||||
len = SendMessage(hWnd, CB_GETLBTEXTLEN, index, 0);
|
||||
try {
|
||||
buf = new TCHAR[len + 1];
|
||||
SendMessage(hWnd, CB_GETLBTEXT, index, (LPARAM)buf);
|
||||
|
||||
ret = buf;
|
||||
delete []buf;
|
||||
} catch (...) {
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ public:
|
||||
HWND create(HWND parent);
|
||||
void addItem(const TCHAR *item);
|
||||
int getSelectedIndex(void);
|
||||
int getCount(void);
|
||||
tstring getItem(int index);
|
||||
void setStyle(int newStyle) {
|
||||
style = newStyle;
|
||||
}
|
||||
|
||||
@@ -66,4 +66,30 @@ bool TwrMenu::isChecked(int item)
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[<5B>̗L<CC97><4C><EFBFBD><EFBFBD><EFBFBD>Ԃ<EFBFBD><D482>ݒ肷<DD92><E882B7><EFBFBD>B
|
||||
*
|
||||
* @param id <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[ID
|
||||
* @param true:<3A>L<EFBFBD><4C><EFBFBD>ɂ<EFBFBD><C982><EFBFBD> false:<3A>L<EFBFBD><4C><EFBFBD>ɂ<EFBFBD><C982>Ȃ<EFBFBD>
|
||||
*/
|
||||
void TwrMenu::setEnabled(int id, bool enabled)
|
||||
{
|
||||
MENUITEMINFO info;
|
||||
|
||||
memset(&info, 0, sizeof(MENUITEMINFO));
|
||||
info.cbSize = sizeof(MENUITEMINFO);
|
||||
info.fMask = MIIM_STATE;
|
||||
|
||||
GetMenuItemInfo(menuHandle, id, FALSE, &info);
|
||||
if (enabled) {
|
||||
if (info.fState & MFS_ENABLED) {
|
||||
info.fState ^= MFS_ENABLED;
|
||||
}
|
||||
} else {
|
||||
info.fState |= MFS_DISABLED;
|
||||
}
|
||||
SetMenuItemInfo(menuHandle, id, FALSE, &info);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ public:
|
||||
TwrMenu(HWND wnd);
|
||||
void CheckMenuItem(int id,bool checked);
|
||||
bool isChecked(int item);
|
||||
void setEnabled(int id, bool enabled);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
413
noMeiryoUI.cpp
413
noMeiryoUI.cpp
@@ -13,12 +13,10 @@ The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
#include <process.h>
|
||||
#include <Objbase.h>
|
||||
#include <shellapi.h>
|
||||
#ifdef DEBUG
|
||||
#include <vld.h>
|
||||
#endif
|
||||
#include "noMeiryoUI.h"
|
||||
#include "FontSel.h"
|
||||
#include "NCFileDialog.h"
|
||||
#include "util.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
@@ -29,6 +27,7 @@ The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
|
||||
// <20>A<EFBFBD>v<EFBFBD><76><EFBFBD>P<EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g
|
||||
NoMeiryoUI *appObj;
|
||||
static bool use7Compat = true;
|
||||
|
||||
/**
|
||||
* <20>A<EFBFBD>v<EFBFBD><76><EFBFBD>P<EFBFBD>[<5B>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>I<EFBFBD>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>쐬<EFBFBD><EC90AC><EFBFBD>܂<EFBFBD><DC82>B
|
||||
@@ -88,6 +87,30 @@ int NoMeiryoUI::OnAppliStart(TCHAR *lpCmdLine)
|
||||
noMeiryoUI = true;
|
||||
}
|
||||
|
||||
DWORD dwVersion = GetVersion();
|
||||
|
||||
DWORD major = (DWORD)(LOBYTE(LOWORD(dwVersion)));
|
||||
DWORD minor = (DWORD)(HIBYTE(LOWORD(dwVersion)));
|
||||
if (major < 6) {
|
||||
// Windows XP or earlyer
|
||||
WIN8_SIZE = false;
|
||||
use7Compat = false;
|
||||
} else if (major == 6) {
|
||||
if (minor < 2) {
|
||||
// Windows Vista/7
|
||||
WIN8_SIZE = false;
|
||||
use7Compat = false;
|
||||
} else {
|
||||
// Windows 8/8.1
|
||||
WIN8_SIZE = true;
|
||||
use7Compat = true;
|
||||
}
|
||||
} else {
|
||||
// Windows 10 or later
|
||||
WIN8_SIZE = false;
|
||||
use7Compat = false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -128,6 +151,20 @@ INT_PTR NoMeiryoUI::OnInitDialog()
|
||||
|
||||
appMenu = new TwrMenu(this->hWnd);
|
||||
|
||||
if (!use7Compat) {
|
||||
// Windows 7<>ȑO<C891>̏ꍇ<CC8F>̓t<CD83>H<EFBFBD><48><EFBFBD>g<EFBFBD>T<EFBFBD>C<EFBFBD>Y<EFBFBD>̎<EFBFBD><CC8E>舵<EFBFBD><E888B5><EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD><68><EFBFBD>ύX<CF8D>ł<EFBFBD><C582>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
||||
appMenu->setEnabled(IDM_COMPAT7, false);
|
||||
}
|
||||
appMenu->CheckMenuItem(IDM_ANOTHER, true);
|
||||
|
||||
// Windows 8.1<EFBFBD>ȑO<EFBFBD>ł<EFBFBD>Windows 10<31>p<EFBFBD>̃v<CC83><76><EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD><67><EFBFBD>g<EFBFBD>p<EFBFBD>s<EFBFBD>Ƃ<C282><C682><EFBFBD><EFBFBD>B
|
||||
DWORD dwVersion = GetVersion();
|
||||
|
||||
DWORD major = (DWORD)(LOBYTE(LOWORD(dwVersion)));
|
||||
DWORD minor = (DWORD)(HIBYTE(LOWORD(dwVersion)));
|
||||
if (major < 10) {
|
||||
appMenu->setEnabled(IDM_SET_10, false);
|
||||
}
|
||||
return (INT_PTR)FALSE;
|
||||
}
|
||||
|
||||
@@ -169,8 +206,6 @@ int NoMeiryoUI::OnWindowShow()
|
||||
&iconFont,
|
||||
0);
|
||||
|
||||
double point = getFontPoint(&(metrics.lfCaptionFont));
|
||||
|
||||
//
|
||||
// <20><><EFBFBD>ׂẴt<CC83>H<EFBFBD><48><EFBFBD>g<EFBFBD>p<EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD>擾
|
||||
//
|
||||
@@ -188,69 +223,19 @@ int NoMeiryoUI::OnWindowShow()
|
||||
&iconFontAll,
|
||||
0);
|
||||
|
||||
allFontName = metricsAll.lfMenuFont.lfFaceName;
|
||||
titleFontName = metrics.lfCaptionFont.lfFaceName;
|
||||
iconFontName = iconFont.lfFaceName;
|
||||
paletteFontName = metrics.lfSmCaptionFont.lfFaceName;
|
||||
hintFontName = metrics.lfStatusFont.lfFaceName;
|
||||
messageFontName = metrics.lfMessageFont.lfFaceName;
|
||||
// <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[<5B>ƑI<C691><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
menuFontName = metrics.lfMenuFont.lfFaceName;
|
||||
|
||||
// <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[<5B>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD>𑼂̃t<CC83>H<EFBFBD><48><EFBFBD>g<EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD>ɂ<EFBFBD><C982>Ă<EFBFBD><C482>B
|
||||
metricsAll.lfStatusFont = metricsAll.lfMenuFont;
|
||||
metricsAll.lfMessageFont = metricsAll.lfMenuFont;
|
||||
metricsAll.lfCaptionFont = metricsAll.lfMenuFont;
|
||||
metricsAll.lfSmCaptionFont = metricsAll.lfMenuFont;
|
||||
iconFontAll = metricsAll.lfMenuFont;
|
||||
|
||||
UpdateData(false);
|
||||
// <20>\<5C><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>B
|
||||
updateDisplay();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>T<EFBFBD>C<EFBFBD>Y<EFBFBD><59><EFBFBD>Z<EFBFBD>o<EFBFBD><6F><EFBFBD><EFBFBD><EFBFBD>B
|
||||
*
|
||||
* @param font
|
||||
* @return <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>T<EFBFBD>C<EFBFBD>Y
|
||||
*/
|
||||
double NoMeiryoUI::getFontPoint(LOGFONT *font)
|
||||
{
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>쐬<EFBFBD><EC90AC><EFBFBD><EFBFBD><EFBFBD>B
|
||||
HFONT hFont = CreateFontIndirect(font);
|
||||
// <20><><EFBFBD>g<EFBFBD>̃E<CC83>C<EFBFBD><43><EFBFBD>h<EFBFBD>E<EFBFBD>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쐬<EFBFBD><EC90AC><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>o<EFBFBD>C<EFBFBD>X<EFBFBD>R<EFBFBD><52><EFBFBD>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD><67>
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>ݒ肷<DD92><E882B7><EFBFBD>B
|
||||
HDC dc = GetDC(this->getHwnd());
|
||||
SelectFont(dc, hFont);
|
||||
|
||||
// <20>f<EFBFBD>o<EFBFBD>C<EFBFBD>X<EFBFBD>R<EFBFBD><52><EFBFBD>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD>TEXTMETRIC<49><43><EFBFBD>擾<EFBFBD><E693BE><EFBFBD><EFBFBD><EFBFBD>B
|
||||
TEXTMETRIC metric;
|
||||
GetTextMetrics(dc, &metric);
|
||||
|
||||
int logPixelY = GetDeviceCaps(dc, LOGPIXELSY);
|
||||
|
||||
ReleaseDC(this->getHwnd(), dc);
|
||||
DeleteObject(hFont);
|
||||
|
||||
int height;
|
||||
if (font->lfHeight < 0) {
|
||||
// <20><><EFBFBD>̏ꍇ<CC8F><EA8D87>lfHeight<68>̓t<CD83>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>̂̍<CC82><CC8D><EFBFBD><EFBFBD>B
|
||||
height = 0 - font->lfHeight;
|
||||
} else if (font->lfHeight > 0) {
|
||||
// <20><><EFBFBD>̏ꍇ<CC8F>͂<EFBFBD><CD82>ł<EFBFBD>Internal Leading<6E><67><EFBFBD>܂<EFBFBD><DC82>ł<EFBFBD><C582><EFBFBD><EFBFBD>̂ł<CC82><C582>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
||||
height = font->lfHeight - metric.tmInternalLeading;
|
||||
} else {
|
||||
// 0<>̏ꍇ<CC8F>̓f<CD83>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>̑傫<CC91><E582AB><EFBFBD><EFBFBD><EFBFBD>쐬<EFBFBD><EC90AC><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>擾<EFBFBD><E693BE><EFBFBD><EFBFBD><EFBFBD>B
|
||||
height = metric.tmAscent + metric.tmDescent - metric.tmInternalLeading;
|
||||
}
|
||||
|
||||
double point = (double)height * 72 / logPixelY;
|
||||
|
||||
return point;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <20>_<EFBFBD>C<EFBFBD>A<EFBFBD><41><EFBFBD>O<EFBFBD>R<EFBFBD><52><EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>ƃI<C683>u<EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>̓<EFBFBD><CC93>e<EFBFBD>̓<EFBFBD><CC93><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
||||
*
|
||||
@@ -268,6 +253,53 @@ void NoMeiryoUI::UpdateData(bool toObj)
|
||||
DDX_Text(toObj,IDC_EDIT_MENU, menuFontName);
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>\<5C><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>B
|
||||
*/
|
||||
void NoMeiryoUI::updateDisplay(void)
|
||||
{
|
||||
int point;
|
||||
TCHAR buf[16];
|
||||
|
||||
allFontName = metricsAll.lfMenuFont.lfFaceName;
|
||||
point = getFontPointInt(&(metricsAll.lfMenuFont), this->getHwnd());
|
||||
_stprintf(buf, _T(" %3dpt"), point);
|
||||
allFontName = allFontName + buf;
|
||||
|
||||
titleFontName = metrics.lfCaptionFont.lfFaceName;
|
||||
point = getFontPointInt(&(metrics.lfCaptionFont), this->getHwnd());
|
||||
_stprintf(buf, _T(" %3dpt"), point);
|
||||
titleFontName = titleFontName + buf;
|
||||
|
||||
iconFontName = iconFont.lfFaceName;
|
||||
point = getFontPointInt(&iconFont, this->getHwnd());
|
||||
_stprintf(buf, _T(" %3dpt"), point);
|
||||
iconFontName = iconFontName + buf;
|
||||
|
||||
paletteFontName = metrics.lfSmCaptionFont.lfFaceName;
|
||||
point = getFontPointInt(&metrics.lfSmCaptionFont, this->getHwnd());
|
||||
_stprintf(buf, _T(" %3dpt"), point);
|
||||
paletteFontName = paletteFontName + buf;
|
||||
|
||||
hintFontName = metrics.lfStatusFont.lfFaceName;
|
||||
point = getFontPointInt(&metrics.lfStatusFont, this->getHwnd());
|
||||
_stprintf(buf, _T(" %3dpt"), point);
|
||||
hintFontName = hintFontName + buf;
|
||||
|
||||
messageFontName = metrics.lfMessageFont.lfFaceName;
|
||||
point = getFontPointInt(&metrics.lfMessageFont, this->getHwnd());
|
||||
_stprintf(buf, _T(" %3dpt"), point);
|
||||
messageFontName = messageFontName + buf;
|
||||
|
||||
// <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[<5B>ƑI<C691><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
menuFontName = metrics.lfMenuFont.lfFaceName;
|
||||
point = getFontPointInt(&metrics.lfMenuFont, this->getHwnd());
|
||||
_stprintf(buf, _T(" %3dpt"), point);
|
||||
menuFontName = menuFontName + buf;
|
||||
|
||||
UpdateData(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>e<EFBFBD><65><EFBFBD><EFBFBD><EFBFBD>ɑ<C991><CE82>鏈<EFBFBD><E98F88><EFBFBD>̕<EFBFBD><CC95><EFBFBD>
|
||||
*
|
||||
@@ -318,19 +350,36 @@ INT_PTR NoMeiryoUI::OnCommand(WPARAM wParam)
|
||||
case IDM_EXIT:
|
||||
EndDialog(hWnd, LOWORD(wParam));
|
||||
break;
|
||||
case IDM_SET_8:
|
||||
OnSet8();
|
||||
return (INT_PTR)0;
|
||||
case IDM_SET_10:
|
||||
OnSet10();
|
||||
return (INT_PTR)0;
|
||||
case IDM_ANOTHER:
|
||||
if (appMenu->isChecked(IDM_ANOTHER)) {
|
||||
appMenu->CheckMenuItem(IDM_ANOTHER, false);
|
||||
} else {
|
||||
appMenu->CheckMenuItem(IDM_ANOTHER, true);
|
||||
}
|
||||
return (INT_PTR)0;
|
||||
case IDM_COMPAT7:
|
||||
if (appMenu->isChecked(IDM_COMPAT7)) {
|
||||
appMenu->CheckMenuItem(IDM_COMPAT7, false);
|
||||
WIN8_SIZE = true;
|
||||
} else {
|
||||
appMenu->CheckMenuItem(IDM_COMPAT7, true);
|
||||
WIN8_SIZE = false;
|
||||
}
|
||||
updateDisplay();
|
||||
|
||||
return (INT_PTR)0;
|
||||
case IDM_HELPTOPIC:
|
||||
showHelp();
|
||||
return (INT_PTR)0;
|
||||
case IDM_ABOUT:
|
||||
MessageBox(hWnd,
|
||||
_T("Meiryo UI<55><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>炢!! Version 2.14\n\nBy Tatsuhiko Syoji(Tatsu) 2005,2012-2015"),
|
||||
_T("Meiryo UI<55><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>炢!! Version 2.16\n\nBy Tatsuhiko Syoji(Tatsu) 2005,2012-2015"),
|
||||
_T("Meiryo UI<55><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>炢!!<21>ɂ<C982><C282><EFBFBD>"),
|
||||
MB_OK | MB_ICONINFORMATION);
|
||||
|
||||
@@ -369,11 +418,45 @@ void NoMeiryoUI::selectFont(enum fontType type)
|
||||
// font.rgbColors = rgbCurrent;
|
||||
|
||||
try {
|
||||
LOGFONT *target;
|
||||
switch (type) {
|
||||
case all:
|
||||
target = &metricsAll.lfMenuFont;
|
||||
break;
|
||||
|
||||
case title:
|
||||
target = &metrics.lfCaptionFont;
|
||||
break;
|
||||
|
||||
case icon:
|
||||
target = &iconFont;
|
||||
break;
|
||||
|
||||
case palette:
|
||||
target = &metrics.lfSmCaptionFont;
|
||||
break;
|
||||
|
||||
case hint:
|
||||
target = &metrics.lfStatusFont;
|
||||
break;
|
||||
|
||||
case message:
|
||||
target = &metrics.lfMessageFont;
|
||||
break;
|
||||
|
||||
case menu:
|
||||
// <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[<5B>ƑI<C691><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
target = &metrics.lfMenuFont;
|
||||
break;
|
||||
}
|
||||
|
||||
// result = ChooseFont(&font);
|
||||
FontSel *selector = new FontSel(this->hWnd, IDD_DIALOG_FONTSEL);
|
||||
if (noMeiryoUI) {
|
||||
selector->setNoMeiryoUI();
|
||||
}
|
||||
// <20>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>I<EFBFBD><49><EFBFBD>_<EFBFBD>C<EFBFBD>A<EFBFBD><41><EFBFBD>O<EFBFBD>ɐݒ肷<DD92><E882B7><EFBFBD>B
|
||||
selector->setPreviousFont(target);
|
||||
|
||||
result = selector->showModal();
|
||||
if (result != IDOK){
|
||||
@@ -438,7 +521,9 @@ void NoMeiryoUI::selectFont(enum fontType type)
|
||||
menuFontName = logfont.lfFaceName;
|
||||
break;
|
||||
}
|
||||
UpdateData(false);
|
||||
|
||||
// <20>\<5C><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>B
|
||||
updateDisplay();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -476,7 +561,7 @@ void NoMeiryoUI::OnLoad()
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>ۑ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
||||
* <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>ǂݍ<EFBFBD><EFBFBD>݂<EFBFBD><EFBFBD>J<EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
||||
*
|
||||
* @param filename ini<6E>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD>
|
||||
* @result TRUE:<3A>ۑ<EFBFBD><DB91><EFBFBD><EFBFBD><EFBFBD> FALSE:<3A>ۑ<EFBFBD><DB91><EFBFBD><EFBFBD>s
|
||||
@@ -523,13 +608,8 @@ BOOL NoMeiryoUI::startLoadFont(TCHAR *filename)
|
||||
metrics.lfMessageFont = messageFont;
|
||||
metrics.lfMenuFont = menuFont;
|
||||
|
||||
titleFontName = metrics.lfCaptionFont.lfFaceName;
|
||||
iconFontName = iconFont.lfFaceName;
|
||||
paletteFontName = metrics.lfSmCaptionFont.lfFaceName;
|
||||
hintFontName = metrics.lfStatusFont.lfFaceName;
|
||||
messageFontName = metrics.lfMessageFont.lfFaceName;
|
||||
menuFontName = metrics.lfMenuFont.lfFaceName;
|
||||
UpdateData(false);
|
||||
// <20>\<5C><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>B
|
||||
updateDisplay();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -981,23 +1061,168 @@ void NoMeiryoUI::OnBnClickedAll()
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>ύX<CF8D><58><EFBFBD><EFBFBD><EFBFBD>{<7B><><EFBFBD><EFBFBD><EFBFBD>B
|
||||
setFont(&metricsAll, &iconFontAll);
|
||||
|
||||
titleFontName = metricsAll.lfCaptionFont.lfFaceName;
|
||||
titleFontName = metricsAll.lfCaptionFont.lfFaceName;
|
||||
iconFontName = iconFontAll.lfFaceName;
|
||||
paletteFontName = metricsAll.lfCaptionFont.lfFaceName;
|
||||
hintFontName = metricsAll.lfCaptionFont.lfFaceName;
|
||||
messageFontName = metricsAll.lfCaptionFont.lfFaceName;
|
||||
// <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[<5B>ƑI<C691><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
menuFontName = metricsAll.lfCaptionFont.lfFaceName;
|
||||
|
||||
memcpy(&metrics, &metricsAll,sizeof(NONCLIENTMETRICS));
|
||||
memcpy(&iconFont, &iconFontAll,sizeof(LOGFONT));
|
||||
|
||||
UpdateData(false);
|
||||
// <20>\<5C><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>B
|
||||
updateDisplay();
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>V<EFBFBD>X<EFBFBD>e<EFBFBD><65><EFBFBD><EFBFBD>DPI<50><49><EFBFBD>擾<EFBFBD><E693BE><EFBFBD><EFBFBD><EFBFBD>B
|
||||
*
|
||||
* @return <20>擾<EFBFBD><E693BE><EFBFBD><EFBFBD>DPI
|
||||
*/
|
||||
int NoMeiryoUI::getDPI(void)
|
||||
{
|
||||
// DPI<50><49><EFBFBD>擾<EFBFBD><E693BE><EFBFBD><EFBFBD><EFBFBD>B
|
||||
int dpiY = 96;
|
||||
HDC hdc = GetDC(NULL);
|
||||
|
||||
if (hdc) {
|
||||
dpiY = GetDeviceCaps(hdc, LOGPIXELSY);
|
||||
ReleaseDC(NULL, hdc);
|
||||
}
|
||||
|
||||
return dpiY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Windows 8/8.1<EFBFBD>̏ꍇ<EFBFBD>̃v<EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD>l<EFBFBD><EFBFBD><EFBFBD>ݒ肷<EFBFBD><EFBFBD><EFBFBD>B
|
||||
*/
|
||||
void NoMeiryoUI::OnSet8(void)
|
||||
{
|
||||
// DPI<50><49><EFBFBD>擾<EFBFBD><E693BE><EFBFBD><EFBFBD><EFBFBD>B
|
||||
int dpiY = getDPI();
|
||||
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>ȊO<C88A><4F>NONCLIENTMETRICS<43>̌<EFBFBD><CC8C>ݒl<DD92><6C><EFBFBD>ێ<EFBFBD><DB8E><EFBFBD><EFBFBD>邽<EFBFBD>߁A
|
||||
// NONCLIENTMETRICS<43>̓<EFBFBD><CC93>e<EFBFBD><65><EFBFBD>擾<EFBFBD><E693BE><EFBFBD>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD>B
|
||||
FillMemory(&metrics,sizeof(NONCLIENTMETRICS),0x00);
|
||||
metrics.cbSize = sizeof(NONCLIENTMETRICS);
|
||||
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
|
||||
sizeof(NONCLIENTMETRICS),
|
||||
&metrics,
|
||||
0);
|
||||
|
||||
memset(&metrics.lfCaptionFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfCaptionFont.lfFaceName, _T("Meiryo UI"));
|
||||
metrics.lfCaptionFont.lfHeight = MulDiv(-15,dpiY,96);
|
||||
metrics.lfCaptionFont.lfWeight = 400;
|
||||
metrics.lfCaptionFont.lfCharSet = 1;
|
||||
metrics.lfCaptionFont.lfQuality = 5;
|
||||
|
||||
memset(&iconFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(iconFont.lfFaceName, _T("Meiryo UI"));
|
||||
iconFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
iconFont.lfWeight = 400;
|
||||
iconFont.lfCharSet = 1;
|
||||
iconFont.lfQuality = 5;
|
||||
|
||||
memset(&metrics.lfSmCaptionFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfSmCaptionFont.lfFaceName, _T("Meiryo UI"));
|
||||
metrics.lfSmCaptionFont.lfHeight = MulDiv(-15, dpiY, 96);
|
||||
metrics.lfSmCaptionFont.lfWeight = 400;
|
||||
metrics.lfSmCaptionFont.lfCharSet = 1;
|
||||
metrics.lfSmCaptionFont.lfQuality = 5;
|
||||
|
||||
memset(&metrics.lfStatusFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfStatusFont.lfFaceName, _T("Meiryo UI"));
|
||||
metrics.lfStatusFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
metrics.lfStatusFont.lfWeight = 400;
|
||||
metrics.lfStatusFont.lfCharSet = 1;
|
||||
metrics.lfStatusFont.lfQuality = 5;
|
||||
|
||||
memset(&metrics.lfMessageFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfMessageFont.lfFaceName, _T("Meiryo UI"));
|
||||
metrics.lfMessageFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
metrics.lfMessageFont.lfWeight = 400;
|
||||
metrics.lfMessageFont.lfCharSet = 1;
|
||||
metrics.lfMessageFont.lfQuality = 5;
|
||||
|
||||
memset(&metrics.lfMenuFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfMenuFont.lfFaceName, _T("Meiryo UI"));
|
||||
metrics.lfMenuFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
metrics.lfMenuFont.lfWeight = 400;
|
||||
metrics.lfMenuFont.lfCharSet = 1;
|
||||
metrics.lfMenuFont.lfQuality = 5;
|
||||
|
||||
// <20>\<5C><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>B
|
||||
updateDisplay();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Windows 10<31>̏ꍇ<CC8F>̃v<CC83><76><EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD>l<EFBFBD><6C><EFBFBD>ݒ肷<DD92><E882B7><EFBFBD>B
|
||||
*/
|
||||
void NoMeiryoUI::OnSet10(void)
|
||||
{
|
||||
// DPI<50><49><EFBFBD>擾<EFBFBD><E693BE><EFBFBD><EFBFBD><EFBFBD>B
|
||||
int dpiY = getDPI();
|
||||
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>ȊO<C88A><4F>NONCLIENTMETRICS<43>̌<EFBFBD><CC8C>ݒl<DD92><6C><EFBFBD>ێ<EFBFBD><DB8E><EFBFBD><EFBFBD>邽<EFBFBD>߁A
|
||||
// NONCLIENTMETRICS<43>̓<EFBFBD><CC93>e<EFBFBD><65><EFBFBD>擾<EFBFBD><E693BE><EFBFBD>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD>B
|
||||
FillMemory(&metrics, sizeof(NONCLIENTMETRICS), 0x00);
|
||||
metrics.cbSize = sizeof(NONCLIENTMETRICS);
|
||||
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
|
||||
sizeof(NONCLIENTMETRICS),
|
||||
&metrics,
|
||||
0);
|
||||
|
||||
memset(&metrics.lfCaptionFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfCaptionFont.lfFaceName, _T("Yu Gothic UI"));
|
||||
metrics.lfCaptionFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
metrics.lfCaptionFont.lfWeight = 400;
|
||||
metrics.lfCaptionFont.lfCharSet = 1;
|
||||
metrics.lfCaptionFont.lfQuality = 5;
|
||||
|
||||
memset(&iconFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(iconFont.lfFaceName, _T("Yu Gothic UI"));
|
||||
iconFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
iconFont.lfWeight = 400;
|
||||
iconFont.lfCharSet = 1;
|
||||
iconFont.lfQuality = 5;
|
||||
|
||||
memset(&metrics.lfSmCaptionFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfSmCaptionFont.lfFaceName, _T("Yu Gothic UI"));
|
||||
metrics.lfSmCaptionFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
metrics.lfSmCaptionFont.lfWeight = 400;
|
||||
metrics.lfSmCaptionFont.lfCharSet = 1;
|
||||
metrics.lfSmCaptionFont.lfQuality = 5;
|
||||
|
||||
memset(&metrics.lfStatusFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfStatusFont.lfFaceName, _T("Yu Gothic UI"));
|
||||
metrics.lfStatusFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
metrics.lfStatusFont.lfWeight = 400;
|
||||
metrics.lfStatusFont.lfCharSet = 1;
|
||||
metrics.lfStatusFont.lfQuality = 5;
|
||||
|
||||
memset(&metrics.lfMessageFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfMessageFont.lfFaceName, _T("Yu Gothic UI"));
|
||||
metrics.lfMessageFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
metrics.lfMessageFont.lfWeight = 400;
|
||||
metrics.lfMessageFont.lfCharSet = 1;
|
||||
metrics.lfMessageFont.lfQuality = 5;
|
||||
|
||||
memset(&metrics.lfMenuFont, 0, sizeof(LOGFONTW));
|
||||
_tcscpy(metrics.lfMenuFont.lfFaceName, _T("Yu Gothic UI"));
|
||||
metrics.lfMenuFont.lfHeight = MulDiv(-12, dpiY, 96);
|
||||
metrics.lfMenuFont.lfWeight = 400;
|
||||
metrics.lfMenuFont.lfCharSet = 1;
|
||||
metrics.lfMenuFont.lfQuality = 5;
|
||||
|
||||
// <20>\<5C><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>B
|
||||
updateDisplay();
|
||||
|
||||
}
|
||||
|
||||
NONCLIENTMETRICS *s_fontMetrics;
|
||||
|
||||
/**
|
||||
* <20>X<EFBFBD><58><EFBFBD>b<EFBFBD>h<EFBFBD>ŃA<C583>C<EFBFBD>R<EFBFBD><52><EFBFBD>ȊO<C88A>̃t<CC83>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>ݒ肷<DD92><E882B7><EFBFBD>B
|
||||
*
|
||||
* @param p <20>X<EFBFBD><58><EFBFBD>b<EFBFBD>h<EFBFBD>ɓn<C993><6E><EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>[<5B>^(<28><><EFBFBD>g<EFBFBD>p)
|
||||
* @return 0
|
||||
*/
|
||||
unsigned _stdcall setOnThread(void *p)
|
||||
{
|
||||
DWORD_PTR ptr;
|
||||
@@ -1008,7 +1233,6 @@ unsigned _stdcall setOnThread(void *p)
|
||||
s_fontMetrics,
|
||||
SPIF_UPDATEINIFILE); // | SPIF_SENDCHANGE);
|
||||
|
||||
_endthreadex(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1056,13 +1280,21 @@ void NoMeiryoUI::setFont(
|
||||
// <20><><EFBFBD>s<EFBFBD><73><EFBFBD><EFBFBD><EFBFBD>B
|
||||
s_fontMetrics = fontMetrics;
|
||||
|
||||
HANDLE handle;
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>ݒ<EFBFBD><DD92><EFBFBD><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD><73><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD><58><EFBFBD>b<EFBFBD>h<EFBFBD><68><EFBFBD>J<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD>B
|
||||
uintptr_t startResult = _beginthreadex(NULL, 0, setOnThread, NULL, 0, NULL);
|
||||
if (startResult != 0) {
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ɃX<C983><58><EFBFBD>b<EFBFBD>h<EFBFBD><68><EFBFBD>J<EFBFBD>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD><58><EFBFBD>b<EFBFBD>h<EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>ҋ@<40><><EFBFBD><EFBFBD><EFBFBD>B
|
||||
HANDLE handle;
|
||||
handle = (HANDLE)startResult;
|
||||
|
||||
handle = (HANDLE)_beginthreadex(NULL,0,setOnThread,NULL,0,NULL);
|
||||
|
||||
// <20>ꉞ5<EA899E>b<EFBFBD>قǑ҂<C791>
|
||||
WaitForSingleObject( handle, 5000 );
|
||||
CloseHandle(handle);
|
||||
// <20>ꉞ5<EA899E>b<EFBFBD>قǑ҂<C791>
|
||||
DWORD waitResult = WaitForSingleObject(handle, 5000);
|
||||
if (waitResult == WAIT_TIMEOUT) {
|
||||
// <20>X<EFBFBD><58><EFBFBD>b<EFBFBD>h<EFBFBD><68><EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>ꍇ<EFBFBD>͂ǂ<CD82><C782><EFBFBD><EFBFBD>悤<EFBFBD><E682A4><EFBFBD>Ȃ<EFBFBD><C882>̂ŃX<C583><58><EFBFBD>b<EFBFBD>h<EFBFBD><68><EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
||||
TerminateThread(handle, 0);
|
||||
}
|
||||
CloseHandle(handle);
|
||||
}
|
||||
} else {
|
||||
// UI<55>Ɠ<EFBFBD><C693><EFBFBD><EFBFBD>X<EFBFBD><58><EFBFBD>b<EFBFBD>h<EFBFBD><68>SystemParametersInfo(SPI_SETNONCLIENTMETRICS<43><53>
|
||||
// <20><><EFBFBD>s<EFBFBD><73><EFBFBD><EFBFBD><EFBFBD>B
|
||||
@@ -1210,6 +1442,17 @@ void NoMeiryoUI::SetWinVer()
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (infoEx.wProductType == VER_NT_WORKSTATION) {
|
||||
_stprintf(buf,
|
||||
_T("Windows 10 (%d.%d)"),
|
||||
major,minor);
|
||||
} else {
|
||||
_stprintf(buf,
|
||||
_T("Windows Server 2016 (%d.%d)"),
|
||||
major,minor);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (infoEx.wProductType == VER_NT_WORKSTATION) {
|
||||
_stprintf(buf,
|
||||
|
||||
@@ -1,26 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="2.1.4.0"
|
||||
processorArchitecture="X86"
|
||||
name="TatsuhikoSyoji.noMeiryoUI.noMeiryoUI"
|
||||
type="win32"
|
||||
/>
|
||||
<description>noMeiryoUI set system fonts on Windows 8/8.1</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<assemblyIdentity
|
||||
version="2.1.6.2"
|
||||
processorArchitecture="X86"
|
||||
name="TatsuhikoSyoji.noMeiryoUI.noMeiryoUI"
|
||||
type="win32"
|
||||
/>
|
||||
<description>noMeiryoUI set system fonts on Windows 8.x/10</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>True</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!--Windows 8-->
|
||||
@@ -30,5 +37,5 @@
|
||||
<!--Windows Vista-->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
</compatibility>
|
||||
</assembly>
|
||||
|
||||
@@ -47,11 +47,15 @@ private:
|
||||
BOOL startSaveFont(TCHAR *filename);
|
||||
BOOL saveFont(TCHAR *filename, TCHAR *section, LOGFONT *font);
|
||||
void selectFont(enum fontType type);
|
||||
void updateDisplay(void);
|
||||
|
||||
INT_PTR OnBnClickedOk();
|
||||
void OnBnClickedAll();
|
||||
void OnSet8();
|
||||
void OnSet10(void);
|
||||
void SetWinVer();
|
||||
double getFontPoint(LOGFONT *font);
|
||||
int getDPI(void);
|
||||
|
||||
void setFont(
|
||||
NONCLIENTMETRICS *fontMetrics,
|
||||
LOGFONT *iconLogFont
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
/*
|
||||
noMeiryoUI (C) 2005,2012-2015 Tatsuhiko Shoji
|
||||
The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
*/
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
@@ -22,13 +18,11 @@ The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD>{<7B><> resources
|
||||
// <20><><EFBFBD>{<7B><> (<28><><EFBFBD>{) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
#pragma code_page(932)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -45,7 +39,7 @@ IDI_SMALL ICON "noMeiryoUI.ico"
|
||||
// Accelerator
|
||||
//
|
||||
|
||||
IDC_NOMEIRYOUI ACCELERATORS
|
||||
IDC_NOMEIRYOUI ACCELERATORS
|
||||
BEGIN
|
||||
"?", IDM_ABOUT, ASCII, ALT
|
||||
"/", IDM_ABOUT, ASCII, ALT
|
||||
@@ -63,7 +57,7 @@ CAPTION "Meiryo UI
|
||||
MENU IDR_MENU1
|
||||
FONT 10, "<22>l<EFBFBD>r <20>o<EFBFBD>S<EFBFBD>V<EFBFBD>b<EFBFBD>N", 400, 0, 0x80
|
||||
BEGIN
|
||||
LTEXT "Meiryo UI<55><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>炢!! Version 2.14",IDC_STATIC,7,7,138,8,SS_NOPREFIX
|
||||
LTEXT "Meiryo UI<55><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>炢!! Version 2.16",IDC_STATIC,7,7,138,8,SS_NOPREFIX
|
||||
RTEXT "Copyright (C) Tatsu 2005,2012-2015",IDC_STATIC,161,7,137,8
|
||||
LTEXT "<22><><EFBFBD>ׂẴt<CC83>H<EFBFBD><48><EFBFBD>g",IDC_STATIC,7,37,89,12
|
||||
EDITTEXT IDC_EDIT_ALL,102,37,91,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
@@ -119,7 +113,7 @@ END
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_MAIN_DIALOG, DIALOG
|
||||
BEGIN
|
||||
@@ -177,8 +171,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,1,4,0
|
||||
PRODUCTVERSION 2,1,4,0
|
||||
FILEVERSION 2,1,6,2
|
||||
PRODUCTVERSION 2,1,6,2
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -195,12 +189,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "T.Syoji's Personal Development"
|
||||
VALUE "FileDescription", "Meiryo UI<55><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>炢!!"
|
||||
VALUE "FileVersion", "2, 1, 4, 0"
|
||||
VALUE "FileVersion", "2.1.6.2"
|
||||
VALUE "InternalName", "noMeiryo"
|
||||
VALUE "LegalCopyright", "Copyright (C) Tatsuhiko Syoji 2005,2012-2015"
|
||||
VALUE "OriginalFilename", "noMeiryoUI.exe"
|
||||
VALUE "ProductName", "Meiryo UI<55><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>炢!!"
|
||||
VALUE "ProductVersion", "2, 1, 4, 0"
|
||||
VALUE "ProductVersion", "2.1.6.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
@@ -222,7 +216,7 @@ IDR_RT_MANIFEST RT_MANIFEST "noMeiryoUI.exe.manifest"
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_MENU1 MENU
|
||||
IDR_MENU1 MENU
|
||||
BEGIN
|
||||
POPUP "<22>t<EFBFBD>@<40>C<EFBFBD><43>(&F)"
|
||||
BEGIN
|
||||
@@ -232,9 +226,15 @@ BEGIN
|
||||
MENUITEM "<22>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>ݒ肵<DD92>ďI<C48F><49>(&S)", IDOK
|
||||
MENUITEM "<22>I<EFBFBD><49>(&X)", IDM_EXIT
|
||||
END
|
||||
POPUP "<22>v<EFBFBD><76><EFBFBD>Z<EFBFBD>b<EFBFBD>g(&P)"
|
||||
BEGIN
|
||||
MENUITEM "Windows 8/8.1", IDM_SET_8
|
||||
MENUITEM "Windows 10", IDM_SET_10
|
||||
END
|
||||
POPUP "<22>c<EFBFBD>[<5B><>(&T)"
|
||||
BEGIN
|
||||
MENUITEM "<22>ʃX<CA83><58><EFBFBD>b<EFBFBD>h<EFBFBD>Ńt<C583>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>ύX<CF8D><58><EFBFBD><EFBFBD><EFBFBD>B(&A)", IDM_ANOTHER
|
||||
MENUITEM "<22>ʃX<CA83><58><EFBFBD>b<EFBFBD>h<EFBFBD>Ńt<C583>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>ύX<CF8D><58><EFBFBD><EFBFBD>(&A)", IDM_ANOTHER
|
||||
MENUITEM "<22>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>T<EFBFBD>C<EFBFBD>Y<EFBFBD><59>Windows 7<>Ɠ<EFBFBD><C693>l<EFBFBD>Ɉ<EFBFBD><C988><EFBFBD>(&7)", IDM_COMPAT7
|
||||
END
|
||||
POPUP "<22>w<EFBFBD><77><EFBFBD>v(&H)"
|
||||
BEGIN
|
||||
@@ -249,13 +249,13 @@ END
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_APP_TITLE "noMeiryoUI"
|
||||
IDC_NOMEIRYOUI "NOMEIRYOUI"
|
||||
END
|
||||
|
||||
#endif // <20><><EFBFBD>{<7B><> resources
|
||||
#endif // <20><><EFBFBD>{<7B><> (<28><><EFBFBD>{) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "noMeiryoUI", "noMeiryoUI.vcproj", "{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}"
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "noMeiryoUI", "noMeiryoUI.vcxproj", "{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_2013|Win32 = Debug_2013|Win32
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release_2013|Win32 = Release_2013|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Debug_2013|Win32.ActiveCfg = Debug_2013|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Debug_2013|Win32.Build.0 = Debug_2013|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Release_2013|Win32.ActiveCfg = Release_2013|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Release_2013|Win32.Build.0 = Release_2013|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
|
||||
@@ -207,6 +207,10 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\util.cpp"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="TWR"
|
||||
>
|
||||
@@ -273,6 +277,10 @@
|
||||
RelativePath=".\targetver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\util.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="TWR"
|
||||
>
|
||||
|
||||
237
noMeiryoUI.vcxproj
Normal file
237
noMeiryoUI.vcxproj
Normal file
@@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug_2013|Win32">
|
||||
<Configuration>Debug_2013</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release_2013|Win32">
|
||||
<Configuration>Release_2013</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}</ProjectGuid>
|
||||
<RootNamespace>noMeiryoUI</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v90</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2013|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v90</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2013|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_2013|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2013|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2013|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2013|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>TWR;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2013|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>TWR;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>true</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>TWR;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_2013|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>TWR;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="FontSel.cpp" />
|
||||
<ClCompile Include="noMeiryoUI.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_2013|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_2013|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\BaseDialog.cpp" />
|
||||
<ClCompile Include="TWR\DialogAppliBase.cpp" />
|
||||
<ClCompile Include="TWR\ModelessDialog.cpp" />
|
||||
<ClCompile Include="TWR\NCFileDialog.cpp" />
|
||||
<ClCompile Include="TWR\TwrCheckbox.cpp" />
|
||||
<ClCompile Include="TWR\TwrCombobox.cpp" />
|
||||
<ClCompile Include="TWR\TwrCore.cpp" />
|
||||
<ClCompile Include="TWR\TwrMenu.cpp" />
|
||||
<ClCompile Include="TWR\TwrWnd.cpp" />
|
||||
<ClCompile Include="util.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="FontSel.h" />
|
||||
<ClInclude Include="noMeiryoUI.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="TWR\AppliBase.h" />
|
||||
<ClInclude Include="TWR\BaseDialog.h" />
|
||||
<ClInclude Include="TWR\DialogAppliBase.h" />
|
||||
<ClInclude Include="TWR\ModelessDialog.h" />
|
||||
<ClInclude Include="TWR\NCFileDialog.h" />
|
||||
<ClInclude Include="TWR\stdafx.h" />
|
||||
<ClInclude Include="TWR\tstring.h" />
|
||||
<ClInclude Include="TWR\TwrCheckbox.h" />
|
||||
<ClInclude Include="TWR\TwrCombobox.h" />
|
||||
<ClInclude Include="TWR\TwrCore.h" />
|
||||
<ClInclude Include="TWR\TwrMenu.h" />
|
||||
<ClInclude Include="TWR\TwrWnd.h" />
|
||||
<ClInclude Include="util.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="noMeiryoUI.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="noMeiryoUI.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="noMeiryoUI.exe.manifest">
|
||||
<SubType>Designer</SubType>
|
||||
</Manifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
136
noMeiryoUI.vcxproj.filters
Normal file
136
noMeiryoUI.vcxproj.filters
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="ソース ファイル">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="ソース ファイル\TWR">
|
||||
<UniqueIdentifier>{0f14fc6b-c5ac-4eff-9e3f-67d982331a10}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ヘッダー ファイル">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="ヘッダー ファイル\TWR">
|
||||
<UniqueIdentifier>{0b7db99e-612d-46b4-b5c0-6ce958f4eadc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="リソース ファイル">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="FontSel.cpp">
|
||||
<Filter>ソース ファイル</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="noMeiryoUI.cpp">
|
||||
<Filter>ソース ファイル</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>ソース ファイル</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="util.cpp">
|
||||
<Filter>ソース ファイル</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\BaseDialog.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\DialogAppliBase.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\ModelessDialog.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\NCFileDialog.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\TwrCheckbox.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\TwrCombobox.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\TwrCore.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\TwrMenu.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TWR\TwrWnd.cpp">
|
||||
<Filter>ソース ファイル\TWR</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="FontSel.h">
|
||||
<Filter>ヘッダー ファイル</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="noMeiryoUI.h">
|
||||
<Filter>ヘッダー ファイル</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>ヘッダー ファイル</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>ヘッダー ファイル</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>ヘッダー ファイル</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="util.h">
|
||||
<Filter>ヘッダー ファイル</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\AppliBase.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\BaseDialog.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\DialogAppliBase.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\ModelessDialog.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\NCFileDialog.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\stdafx.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\tstring.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\TwrCheckbox.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\TwrCombobox.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\TwrCore.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\TwrMenu.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TWR\TwrWnd.h">
|
||||
<Filter>ヘッダー ファイル\TWR</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="noMeiryoUI.ico">
|
||||
<Filter>リソース ファイル</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="noMeiryoUI.rc">
|
||||
<Filter>リソース ファイル</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="noMeiryoUI.exe.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
20
noMeiryoUI_2008.sln
Normal file
20
noMeiryoUI_2008.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "noMeiryoUI", "noMeiryoUI_2008.vcproj", "{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
362
noMeiryoUI_2008.vcproj
Normal file
362
noMeiryoUI_2008.vcproj
Normal file
@@ -0,0 +1,362 @@
|
||||
<?xml version="1.0" encoding="shift_jis"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="noMeiryoUI"
|
||||
ProjectGUID="{0F28EA7F-B997-4CBB-8BCA-96A013FCBE7D}"
|
||||
RootNamespace="noMeiryoUI"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="TWR"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/SAFESEH"
|
||||
AdditionalDependencies="comctl32.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="2"
|
||||
DataExecutionPrevention="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="TWR"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/SAFESEH "
|
||||
AdditionalDependencies="comctl32.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
GenerateMapFile="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>\<5C>[<5B>X <20>t<EFBFBD>@<40>C<EFBFBD><43>"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\FontSel.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\noMeiryoUI.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\util.cpp"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="TWR"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\TWR\BaseDialog.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\DialogAppliBase.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\ModelessDialog.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\NCFileDialog.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrCheckbox.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrCombobox.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrCore.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrMenu.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrWnd.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22>w<EFBFBD>b<EFBFBD>_<EFBFBD>[ <20>t<EFBFBD>@<40>C<EFBFBD><43>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\FontSel.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\noMeiryoUI.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\targetver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\util.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="TWR"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\TWR\AppliBase.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\BaseDialog.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\DialogAppliBase.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\ModelessDialog.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\NCFileDialog.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\stdafx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\tstring.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrCheckbox.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrCombobox.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrCore.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrMenu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TWR\TwrWnd.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>\<5C>[<5B>X <20>t<EFBFBD>@<40>C<EFBFBD><43>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\noMeiryoUI.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\noMeiryoUI.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\noMeiryoUI.exe.manifest"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
15
resource.h
15
resource.h
@@ -1,10 +1,6 @@
|
||||
/*
|
||||
noMeiryoUI (C) 2005,2012-2015 Tatsuhiko Shoji
|
||||
The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
*/
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by noMeiryoUI.rc
|
||||
// Microsoft Visual C++ <EFBFBD>Ő<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ꂽ<EFBFBD>C<EFBFBD><EFBFBD><EFBFBD>N<EFBFBD><EFBFBD><EFBFBD>[<5B>h <20>t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD>B
|
||||
// noMeiryoUI.rc <20>Ŏg<C58E>p
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define ID_SEL_ALL 3
|
||||
@@ -54,6 +50,11 @@ The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
#define ID_Menu 32780
|
||||
#define IDM_OPEN 32781
|
||||
#define IDM_SAVE 32782
|
||||
#define ID_32783 32783
|
||||
#define IDM_SET_8 32784
|
||||
#define IDM_COMPAT7 32786
|
||||
#define ID_32787 32787
|
||||
#define IDM_SET_10 32788
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
@@ -62,7 +63,7 @@ The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 134
|
||||
#define _APS_NEXT_COMMAND_VALUE 32783
|
||||
#define _APS_NEXT_COMMAND_VALUE 32789
|
||||
#define _APS_NEXT_CONTROL_VALUE 1010
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
|
||||
87
util.cpp
Normal file
87
util.cpp
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
noMeiryoUI (C) 2005,2012-2015 Tatsuhiko Shoji
|
||||
The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
|
||||
/** Windows 8<>̃t<CC83>H<EFBFBD><48><EFBFBD>g<EFBFBD>T<EFBFBD>C<EFBFBD>Y<EFBFBD>Z<EFBFBD>o<EFBFBD><6F><EFBFBD><EFBFBD><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD>邩<EFBFBD>H */
|
||||
bool WIN8_SIZE = true;
|
||||
|
||||
/**
|
||||
* <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>̃s<CC83>N<EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD>ɑΉ<C991><CE89><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>g<EFBFBD><67><EFBFBD>𐮐<EFBFBD><F090AE90>ŎZ<C58E>o<EFBFBD><6F><EFBFBD><EFBFBD><EFBFBD>B(Windows 8)
|
||||
*
|
||||
* @param font <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD>
|
||||
* @param hWnd <20>E<EFBFBD>C<EFBFBD><43><EFBFBD>h<EFBFBD>E<EFBFBD>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68>
|
||||
* @return <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>T<EFBFBD>C<EFBFBD>Y
|
||||
*/
|
||||
int getFontPointInt(LOGFONT *font, HWND hWnd)
|
||||
{
|
||||
double point = getFontPoint(font, hWnd);
|
||||
|
||||
if (WIN8_SIZE) {
|
||||
// Windows 8<>f<EFBFBD>B<EFBFBD>X<EFBFBD>v<EFBFBD><76><EFBFBD>C<EFBFBD>R<EFBFBD><52><EFBFBD>g<EFBFBD><67><EFBFBD>[<5B><><EFBFBD>p<EFBFBD>l<EFBFBD><6C><EFBFBD>݊<EFBFBD>
|
||||
if ((point > 10) || (point < 8)) {
|
||||
return (int)point;
|
||||
} else {
|
||||
// 10pt<70>܂ł<DC82>Windows 7<>Ɠ<EFBFBD><C693>l<EFBFBD>Ɍv<C98C>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD>B
|
||||
// Windows 7<>ȑO<C891>݊<EFBFBD>
|
||||
if (point - abs((int)point) > 0.49) {
|
||||
return (int)point + 1;
|
||||
} else {
|
||||
return (int)point;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Windows 7<>ȑO<C891>݊<EFBFBD>
|
||||
if (point - abs((int)point) > 0.49) {
|
||||
return (int)point + 1;
|
||||
} else {
|
||||
return (int)point;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>̃s<CC83>N<EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD>ɑΉ<C991><CE89><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|<7C>C<EFBFBD><43><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD>o<EFBFBD><6F><EFBFBD><EFBFBD><EFBFBD>B
|
||||
* (Windows 7/<2F>R<EFBFBD><52><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD>C<EFBFBD>A<EFBFBD><41><EFBFBD>O<EFBFBD>݊<EFBFBD>)
|
||||
*
|
||||
* @param font <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD>
|
||||
* @param hWnd <20>E<EFBFBD>C<EFBFBD><43><EFBFBD>h<EFBFBD>E<EFBFBD>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68>
|
||||
* @return <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>T<EFBFBD>C<EFBFBD>Y
|
||||
*/
|
||||
double getFontPoint(LOGFONT *font, HWND hWnd)
|
||||
{
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>쐬<EFBFBD><EC90AC><EFBFBD><EFBFBD><EFBFBD>B
|
||||
HFONT hFont = CreateFontIndirect(font);
|
||||
// <20><><EFBFBD>g<EFBFBD>̃E<CC83>C<EFBFBD><43><EFBFBD>h<EFBFBD>E<EFBFBD>n<EFBFBD><6E><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쐬<EFBFBD><EC90AC><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>o<EFBFBD>C<EFBFBD>X<EFBFBD>R<EFBFBD><52><EFBFBD>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD><67>
|
||||
// <20>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>ݒ肷<DD92><E882B7><EFBFBD>B
|
||||
HDC dc = GetDC(hWnd);
|
||||
SelectFont(dc, hFont);
|
||||
|
||||
// <20>f<EFBFBD>o<EFBFBD>C<EFBFBD>X<EFBFBD>R<EFBFBD><52><EFBFBD>e<EFBFBD>L<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD>TEXTMETRIC<49><43><EFBFBD>擾<EFBFBD><E693BE><EFBFBD><EFBFBD><EFBFBD>B
|
||||
TEXTMETRIC metric;
|
||||
GetTextMetrics(dc, &metric);
|
||||
|
||||
int logPixelY = GetDeviceCaps(dc, LOGPIXELSY);
|
||||
|
||||
ReleaseDC(hWnd, dc);
|
||||
DeleteObject(hFont);
|
||||
|
||||
int height;
|
||||
if (font->lfHeight < 0) {
|
||||
// <20><><EFBFBD>̏ꍇ<CC8F><EA8D87>lfHeight<68>̓t<CD83>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD>̂̍<CC82><CC8D><EFBFBD><EFBFBD>B
|
||||
height = 0 - font->lfHeight;
|
||||
} else if (font->lfHeight > 0) {
|
||||
// <20><><EFBFBD>̏ꍇ<CC8F>͂<EFBFBD><CD82>ł<EFBFBD>Internal Leading<6E><67><EFBFBD>܂<EFBFBD><DC82>ł<EFBFBD><C582><EFBFBD><EFBFBD>̂ł<CC82><C582>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
||||
height = font->lfHeight - metric.tmInternalLeading;
|
||||
} else {
|
||||
// 0<>̏ꍇ<CC8F>̓f<CD83>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>̑傫<CC91><E582AB><EFBFBD><EFBFBD><EFBFBD>쐬<EFBFBD><EC90AC><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD>擾<EFBFBD><E693BE><EFBFBD><EFBFBD><EFBFBD>B
|
||||
height = metric.tmAscent + metric.tmDescent - metric.tmInternalLeading;
|
||||
}
|
||||
|
||||
double point = (double)height * 72 / logPixelY;
|
||||
|
||||
return point;
|
||||
}
|
||||
|
||||
17
util.h
Normal file
17
util.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
noMeiryoUI (C) 2005,2012-2015 Tatsuhiko Shoji
|
||||
The sources for noMeiryoUI are distributed under the MIT open source license
|
||||
*/
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
|
||||
extern bool WIN8_SIZE;
|
||||
|
||||
int getFontPointInt(LOGFONT *font, HWND hWnd);
|
||||
double getFontPoint(LOGFONT *font, HWND hWnd);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user