Skip to content

Commit

Permalink
Edit设置密码
Browse files Browse the repository at this point in the history
Edit支持动态设置密码属性
  • Loading branch information
Troy committed Jun 16, 2015
1 parent fcc3bdb commit 04fdeb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.ilk
*.pdb
*.map
*.bsc
*.sdf
6 changes: 6 additions & 0 deletions DuiLib/Control/UIEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ namespace DuiLib
if( m_bPasswordMode == bPasswordMode ) return;
m_bPasswordMode = bPasswordMode;
Invalidate();
if( m_pWindow != NULL )
{
LONG styleValue = ::GetWindowLong(*m_pWindow, GWL_STYLE);
bPasswordMode ? styleValue |= ES_PASSWORD : styleValue &= ~ES_PASSWORD;
::SetWindowLong(*m_pWindow, GWL_STYLE, styleValue);
}
}

bool CEditUI::IsPasswordMode() const
Expand Down

0 comments on commit 04fdeb9

Please sign in to comment.