Skip to content

Commit

Permalink
プロパティシートのコントロール表示のちらつき防止
Browse files Browse the repository at this point in the history
  • Loading branch information
beru committed Oct 4, 2020
1 parent 455a7ff commit 1a1408b
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 deletions.
3 changes: 3 additions & 0 deletions sakura_core/prop/CPropComCustmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ void CPropCustmenu::SetDataMenuList(HWND hwndDlg, int nIdx)
WCHAR szLabel[300];
WCHAR szLabel2[300+4];

::SendMessageAny( hwndDlg, WM_SETREDRAW, FALSE, 0 );
/* メニュー項目一覧に文字列をセット(リストボックス)*/
HWND hwndLIST_RES = ::GetDlgItem( hwndDlg, IDC_LIST_RES );
// hwndEDIT_KEY = ::GetDlgItem( hwndDlg, IDC_EDIT_KEY );
Expand Down Expand Up @@ -694,6 +695,8 @@ void CPropCustmenu::SetDataMenuList(HWND hwndDlg, int nIdx)
::DlgItem_SetText( hwndDlg, IDC_EDIT_MENUNAME, m_Common.m_sCustomMenu.m_szCustMenuNameArr[nIdx] );

CheckDlgButtonBool( hwndDlg, IDC_CHECK_SUBMENU, m_Common.m_sCustomMenu.m_bCustMenuPopupArr[nIdx] );
::SendMessageAny( hwndDlg, WM_SETREDRAW, TRUE, 0 );
::InvalidateRect( hwndDlg, NULL, FALSE );
return;
}

Expand Down
2 changes: 2 additions & 0 deletions sakura_core/prop/CPropComKeybind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ void CPropKeybind::ChangeKeyList( HWND hwndDlg){
i |= _ALT;
wcscat( szKeyState, L"Alt+" );
}
::SendMessageAny( hwndKeyList, WM_SETREDRAW, FALSE, 0 );
/* キー一覧に文字列をセット(リストボックス)*/
List_ResetContent( hwndKeyList );
for( i = 0; i < m_Common.m_sKeyBind.m_nKeyNameArrNum; ++i ){
Expand All @@ -470,6 +471,7 @@ void CPropKeybind::ChangeKeyList( HWND hwndDlg){
List_SetCurSel( hwndKeyList, nIndex );
List_SetTopIndex( hwndKeyList, nIndexTop );
::SendMessageCmd( hwndDlg, WM_COMMAND, MAKELONG( IDC_LIST_KEY, LBN_SELCHANGE ), (LPARAM)hwndKeyList );
::SendMessageAny( hwndKeyList, WM_SETREDRAW, TRUE, 0 );
}

/* Keybind:キー割り当て設定をインポートする */
Expand Down
11 changes: 5 additions & 6 deletions sakura_core/prop/CPropComKeyword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,8 @@ void CPropKeyword::SetKeyWordSet( HWND hwndDlg, int nIdx )
HWND hwndList;
LV_ITEM lvi;

::SendMessageAny( hwndDlg, WM_SETREDRAW, FALSE, 0 );

ListView_DeleteAllItems( ::GetDlgItem( hwndDlg, IDC_LIST_KEYWORD ) );
if( 0 <= nIdx ){
::EnableWindow( ::GetDlgItem( hwndDlg, IDC_BUTTON_DELSET ), TRUE );
Expand Down Expand Up @@ -654,9 +656,6 @@ void CPropKeyword::SetKeyWordSet( HWND hwndDlg, int nIdx )
nNum = m_Common.m_sSpecialKeyword.m_CKeyWordSetMgr.GetKeyWordNum( nIdx );
hwndList = ::GetDlgItem( hwndDlg, IDC_LIST_KEYWORD );

// 2005.01.25 Moca/genta リスト追加中は再描画を抑制してすばやく表示
::SendMessageAny( hwndList, WM_SETREDRAW, FALSE, 0 );

for( i = 0; i < nNum; ++i ){
/* n番目のセットのm番目のキーワードを返す */
const WCHAR* pszKeyWord = m_Common.m_sSpecialKeyword.m_CKeyWordSetMgr.GetKeyWord( nIdx, i );
Expand All @@ -670,12 +669,12 @@ void CPropKeyword::SetKeyWordSet( HWND hwndDlg, int nIdx )
}
m_Common.m_sSpecialKeyword.m_CKeyWordSetMgr.m_nCurrentKeyWordSetIdx = nIdx;

// 2005.01.25 Moca/genta リスト追加完了のため再描画許可
::SendMessageAny( hwndList, WM_SETREDRAW, TRUE, 0 );

//キーワード数を表示する。
DispKeywordCount( hwndDlg );

::SendMessageAny( hwndDlg, WM_SETREDRAW, TRUE, 0 );
InvalidateRect(hwndDlg, NULL, FALSE);

return;
}

Expand Down
2 changes: 2 additions & 0 deletions sakura_core/prop/CPropComMainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ INT_PTR CPropMainMenu::DispatchEvent(
case CBN_SELCHANGE:
nIdxFIdx = Combo_GetCurSel( hwndComboFunkKind );

::SendMessageAny( hwndListFunk, WM_SETREDRAW, FALSE, 0 );
if (nIdxFIdx == nSpecialFuncsNum) {
// 機能一覧に特殊機能をセット
List_ResetContent( hwndListFunk );
Expand All @@ -428,6 +429,7 @@ INT_PTR CPropMainMenu::DispatchEvent(
/* 機能一覧に文字列をセット(リストボックス)*/
m_cLookup.SetListItem( hwndListFunk, nIdxFIdx );
}
::SendMessageAny( hwndListFunk, WM_SETREDRAW, TRUE, 0 );

return TRUE;
}
Expand Down
4 changes: 4 additions & 0 deletions sakura_core/prop/CPropComTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ INT_PTR CPropTab::DispatchEvent( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
/* ダイアログデータの設定 */
void CPropTab::SetData( HWND hwndDlg )
{
::SendMessage(hwndDlg, WM_SETREDRAW, (WPARAM)FALSE, 0);

// Feb. 11, 2007 genta「ウィンドウ」シートより移動
::CheckDlgButton( hwndDlg, IDC_CHECK_DispTabWnd, m_Common.m_sTabBar.m_bDispTabWnd ); //@@@ 2003.05.31 MIK
::CheckDlgButton( hwndDlg, IDC_CHECK_SameTabWidth, m_Common.m_sTabBar.m_bSameTabWidth ); //@@@ 2006.01.28 ryoji
Expand Down Expand Up @@ -233,6 +235,8 @@ void CPropTab::SetData( HWND hwndDlg )
m_hTabFont = SetFontLabel( hwndDlg, IDC_STATIC_TABFONT, m_Common.m_sTabBar.m_lf, m_Common.m_sTabBar.m_nPointSize);

EnableTabPropInput(hwndDlg);

::SendMessage(hwndDlg, WM_SETREDRAW, (WPARAM)TRUE, 0);
}

/* ダイアログデータの取得 */
Expand Down
2 changes: 2 additions & 0 deletions sakura_core/prop/CPropComToolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ INT_PTR CPropToolbar::DispatchEvent(
case CBN_SELCHANGE:
nIndex2 = Combo_GetCurSel( hwndCombo );

::SendMessageAny( hwndFuncList, WM_SETREDRAW, FALSE, 0 );
List_ResetContent( hwndFuncList );

/* 機能一覧に文字列をセット (リストボックス) */
Expand All @@ -286,6 +287,7 @@ INT_PTR CPropToolbar::DispatchEvent(
lResult = List_SetItemHeight( hwndFuncList, lResult, nListItemHeight );
}
}
::SendMessageAny( hwndFuncList, WM_SETREDRAW, TRUE, 0 );
return TRUE;
}
}else{
Expand Down
8 changes: 4 additions & 4 deletions sakura_core/sakura_rc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ END

IDD_PROP_TAB DIALOGEX 0, 0, 293, 240
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
EXSTYLE WS_EX_CONTEXTHELP | WS_EX_COMPOSITED
FONT 9, "MS Pゴシック"
BEGIN
CONTROL "タブバーを表示する(&D)", IDC_CHECK_DispTabWnd, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 11, 111, 10
Expand All @@ -1187,7 +1187,7 @@ BEGIN
LTEXT "閉じるボタン(&X)", IDC_TextTabClose, 124, 116, 48, 8
COMBOBOX IDC_CHECK_DispTabClose, 173, 113, 46, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "フォント(&F)...", IDC_BUTTON_TABFONT, 232, 113, 51, 14
RTEXT "Font", IDC_STATIC_TABFONT, 102, 127, 180, 17, SS_RIGHT
RTEXT "Font", IDC_STATIC_TABFONT, 102, 127, 180, 12, SS_RIGHT
CONTROL "タブ一覧をソートする(&S)", IDC_CHECK_SortTabList, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 15, 129, 85, 10
CONTROL "多段(&M)", IDC_CHECK_TAB_MULTILINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 15, 141, 60, 10
RTEXT "表示位置(&P)", IDC_TAB_POSITION, 80, 143, 40, 8
Expand Down Expand Up @@ -1404,7 +1404,7 @@ END

IDD_PROP_KEYBIND DIALOGEX 0, 0, 293, 240
STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
EXSTYLE WS_EX_CONTEXTHELP | WS_EX_COMPOSITED
FONT 9, "MS Pゴシック"
BEGIN
RTEXT "種別(&K)", IDC_LABEL_MENUFUNCKIND, 4, 4, 51, 8
Expand All @@ -1428,7 +1428,7 @@ END

IDD_PROP_CUSTMENU DIALOGEX 0, 0, 293, 240
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
EXSTYLE WS_EX_CONTEXTHELP | WS_EX_COMPOSITED
FONT 9, "MS Pゴシック"
BEGIN
RTEXT "種別(&K)", IDC_LABEL_MENUFUNCKIND, 4, 4, 52, 8
Expand Down

0 comments on commit 1a1408b

Please sign in to comment.