void CSkinListBox::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue ) { ISkinControl::SetAttribute(pstrName,pstrValue); // if( _tcscmp(pstrName, _T("itemheight")) == 0 ) // { // LPTSTR pstr = NULL; // SetItemHeight(-1,_tcstol(pstrValue, &pstr, 10)); // } // else if( _tcscmp(pstrName, _T("scrollimage")) == 0 ) { SetScrollImage(this,pstrValue); } }
void CSkinEdit::SetAttribute( LPCTSTR pstrName, LPCTSTR pstrValue ) { ISkinControl::SetAttribute(pstrName,pstrValue); if( _tcscmp(pstrName, _T("defaulttext")) == 0 ) { SetDefaultText(pstrValue); SetDefaultTextMode(TRUE); } else if( _tcscmp(pstrName, _T("iconimage")) == 0 ) { SetIconImage(pstrValue); } else if( _tcscmp(pstrName, _T("passwordchar")) == 0 ) { SetPasswordChar(pstrValue[0]); } else if( _tcscmp(pstrName, _T("clientpos")) == 0 ) { LPTSTR pstr = NULL; CPoint pt; pt.x = _tcstol(pstrValue, &pstr, 10); ASSERT(pstr); pt.y = _tcstol(pstr + 1, &pstr, 10); ASSERT(pstr); SetClientPoint(pt); } else if( _tcscmp(pstrName, _T("handcur")) == 0 ) { m_bHandCursor = _tcscmp(pstrValue, _T("true")) == 0; } else if( _tcscmp(pstrName, _T("scrollimage")) == 0 ) { SetScrollImage(this,pstrValue); } //else if( _tcscmp(pstrName, _T("multiline")) == 0 ) //{ // if( _tcscmp(pstrValue, _T("true")) == 0 ) // // //SetWindowLong(GetSafeHwnd(),GWL_STYLE,GetWindowLong(GetSafeHwnd(),GWL_STYLE)| ES_MULTILINE|ES_WANTRETURN|ES_AUTOVSCROLL| WS_VSCROLL); // ModifyStyle(ES_AUTOHSCROLL,ES_MULTILINE|ES_WANTRETURN|ES_AUTOVSCROLL| WS_VSCROLL ); // //ModifyStyle(ES_MULTILINE|ES_WANTRETURN|ES_AUTOVSCROLL| WS_VSCROLL,0); //} }