Skip to content

Commit b7538a1

Browse files
authored
Merge pull request #1850 from sanomari/workaround/issue1845
無題シーケンス番号の保存に失敗する不具合の暫定対策
2 parents cf4763b + 537d318 commit b7538a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sakura_core/env/CAppNodeManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ BOOL CAppNodeGroupHandle::AddEditWndList( HWND hWnd )
177177
}
178178

179179
/* ウィンドウ連番 */
180-
181-
if( 0 == ::GetWindowLongPtr( hWnd, sizeof(LONG_PTR) ) )
180+
constexpr auto MY_GWLP_SEQUENCE = sizeof(LONG_PTR) * 0; // 1個目の拡張領域。
181+
if( 0 == ::GetWindowLongPtr( hWnd, MY_GWLP_SEQUENCE ) )
182182
{
183183
pShare->m_sNodes.m_nSequences++;
184-
::SetWindowLongPtr( hWnd, sizeof(LONG_PTR) , (LONG_PTR)pShare->m_sNodes.m_nSequences );
184+
::SetWindowLongPtr( hWnd, MY_GWLP_SEQUENCE, (LONG_PTR)pShare->m_sNodes.m_nSequences );
185185

186186
//連番を更新する。
187187
sMyEditNode.m_nIndex = pShare->m_sNodes.m_nSequences;

sakura_core/window/CEditWnd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ HWND CEditWnd::_CreateMainWindow(int nGroup, const STabGroupInfo& sTabGroupInfo)
376376
wc.style = CS_DBLCLKS | CS_BYTEALIGNCLIENT | CS_BYTEALIGNWINDOW;
377377
wc.lpfnWndProc = CEditWndProc;
378378
wc.cbClsExtra = 0;
379-
wc.cbWndExtra = 0;
379+
wc.cbWndExtra = sizeof(LONG_PTR) * 1; //拡張領域を1個確保。
380380
wc.hInstance = G_AppInstance();
381381
// Dec, 2, 2002 genta アイコン読み込み方法変更
382382
wc.hIcon = GetAppIcon( G_AppInstance(), ICON_DEFAULT_APP, FN_APP_ICON, false );

0 commit comments

Comments
 (0)