Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ターゲットwindowsをwindows7に上げる #548

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
395c925
_WIN32_WINNTを_WIN32_WINNT_WIN7に更新
berryzplus Oct 13, 2018
6667aba
vista以降チェックの方法を他に合わせる
berryzplus Oct 13, 2018
ccb4911
実効性がないバージョンチェックを除去
berryzplus Oct 13, 2018
b0fd56c
バージョン確認関数のリファクタリング
berryzplus Oct 13, 2018
8409397
SDKの定数を独自定義するのをやめる
berryzplus Oct 13, 2018
abf3ab1
IsWin32NT除去
berryzplus Oct 13, 2018
3707b82
HasWinHelpContentsProblem除去
berryzplus Oct 13, 2018
9c013c8
OsSupportReconvertを除去
berryzplus Oct 13, 2018
1beb197
IsWinV5forOfnを除去
berryzplus Oct 13, 2018
53274ea
IsWinVista_or_laterを除去
berryzplus Oct 13, 2018
e14801a
IsWinXP_or_later除去
berryzplus Oct 13, 2018
0ba38d4
IsWin2000_or_laterを除去
berryzplus Oct 13, 2018
b726762
IsWinMeを除去
berryzplus Oct 13, 2018
17db5f6
IsWineを除去
berryzplus Oct 13, 2018
46a149a
COsVersionInfo.hのインクルードを除去
berryzplus Oct 13, 2018
66bffd0
不要となったファイルを除去
berryzplus Oct 13, 2018
1b81d46
要らなくなったGetProcAddressを除去
berryzplus Oct 13, 2018
24d519f
実効性のないコードを除去
berryzplus Oct 13, 2018
05f6df4
CHtmlHelpを他実装に合わせる
berryzplus Oct 13, 2018
1094464
古いOS向けのコメント除去
berryzplus Oct 14, 2018
185e68e
固定配列にstd::vectorを使っていたのをやめる
berryzplus Oct 14, 2018
3e54587
std::wstringをstd::unique_ptrに変える
berryzplus Oct 14, 2018
8ca7819
std::unique_ptrを固定配列に変える
berryzplus Oct 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
IsWinXP_or_later除去
  • Loading branch information
berryzplus committed Oct 13, 2018
commit e14801a9193b0317c4747e7a39e38320b92d2017
2 changes: 0 additions & 2 deletions sakura_core/_os/COsVersionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#define _COSVERSIONINFO_H_


// 稼働中のOSはxp以降か?=常に真。
inline bool IsWinXP_or_later() { return true; }
// 稼働中のOSはw2k以降か?=常に真。
inline bool IsWin2000_or_later() { return true; }
// 稼働中のOSはwindows Meか?=常に偽。
Expand Down
31 changes: 20 additions & 11 deletions sakura_core/window/CEditWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4043,17 +4043,26 @@ void CEditWnd::PrintMenubarMessage( const TCHAR* msg )
rc.top = po.y - m_nCaretPosInfoCharHeight - 2;
rc.bottom = rc.top + m_nCaretPosInfoCharHeight;
::SetTextColor( hdc, ::GetSysColor( COLOR_MENUTEXT ) );
// Sep. 6, 2003 genta Windows XP(Luna)の場合にはCOLOR_MENUBARを使わなくてはならない
COLORREF bkColor =
::GetSysColor( IsWinXP_or_later() ? COLOR_MENUBAR : COLOR_MENU );
::SetBkColor( hdc, bkColor );
/*
int m_pnCaretPosInfoDx[64]; // 文字列描画用文字幅配列
for( i = 0; i < _countof( m_pnCaretPosInfoDx ); ++i ){
m_pnCaretPosInfoDx[i] = ( m_nCaretPosInfoCharWidth );
}
*/
::ExtTextOut( hdc,rc.left,rc.top,ETO_CLIPPED | ETO_OPAQUE,&rc,m_pszMenubarMessage,nStrLen,NULL/*m_pnCaretPosInfoDx*/); //2007.10.17 kobake めんどいので今のところは文字間隔配列を使わない。
::SetBkColor( hdc, ::GetSysColor( COLOR_MENUBAR ) );
{
const WCHAR* pchText = m_pszMenubarMessage;
const ULONG cchText = nStrLen;
const INT nMaxExtent = rc.right - rc.left;
const DWORD dwFlags = ::GetFontLanguageInfo(hdc);
std::vector<INT> vDx(cchText, 0);
beru marked this conversation as resolved.
Show resolved Hide resolved
std::wstring strGlyphs(::MulDiv(cchText, 3, 2) + 16, '\0');
beru marked this conversation as resolved.
Show resolved Hide resolved

GCP_RESULTS results = { sizeof(GCP_RESULTS) };
results.lpDx = vDx.data();
results.lpGlyphs = &*strGlyphs.begin();
results.nGlyphs = strGlyphs.size();
results.nMaxFit = cchText;
auto placement = ::GetCharacterPlacement(hdc, pchText, cchText, nMaxExtent, &results, dwFlags);

if (placement != NULL) {
::ExtTextOut(hdc, rc.left, rc.top, ETO_CLIPPED | ETO_OPAQUE, &rc, m_pszMenubarMessage, nStrLen, &*vDx.begin());
}
}
::SelectObject( hdc, hFontOld );
::ReleaseDC( GetHwnd(), hdc );
}
Expand Down