MCPcopy Create free account
hub / github.com/cinience/RedisStudio / PaintStatusImage

Method PaintStatusImage

DuiLib/Control/UICombo.cpp:903–939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

901}
902
903void CComboUI::PaintStatusImage(HDC hDC)
904{
905 if( IsFocused() ) m_uButtonState |= UISTATE_FOCUSED;
906 else m_uButtonState &= ~ UISTATE_FOCUSED;
907 if( !IsEnabled() ) m_uButtonState |= UISTATE_DISABLED;
908 else m_uButtonState &= ~ UISTATE_DISABLED;
909
910 if( (m_uButtonState & UISTATE_DISABLED) != 0 ) {
911 if( !m_sDisabledImage.IsEmpty() ) {
912 if( !DrawImage(hDC, (LPCTSTR)m_sDisabledImage) ) m_sDisabledImage.Empty();
913 else return;
914 }
915 }
916 else if( (m_uButtonState & UISTATE_PUSHED) != 0 ) {
917 if( !m_sPushedImage.IsEmpty() ) {
918 if( !DrawImage(hDC, (LPCTSTR)m_sPushedImage) ) m_sPushedImage.Empty();
919 else return;
920 }
921 }
922 else if( (m_uButtonState & UISTATE_HOT) != 0 ) {
923 if( !m_sHotImage.IsEmpty() ) {
924 if( !DrawImage(hDC, (LPCTSTR)m_sHotImage) ) m_sHotImage.Empty();
925 else return;
926 }
927 }
928 else if( (m_uButtonState & UISTATE_FOCUSED) != 0 ) {
929 if( !m_sFocusedImage.IsEmpty() ) {
930 if( !DrawImage(hDC, (LPCTSTR)m_sFocusedImage) ) m_sFocusedImage.Empty();
931 else return;
932 }
933 }
934
935 if( !m_sNormalImage.IsEmpty() ) {
936 if( !DrawImage(hDC, (LPCTSTR)m_sNormalImage) ) m_sNormalImage.Empty();
937 else return;
938 }
939}
940
941void CComboUI::PaintText(HDC hDC)
942{

Callers

nothing calls this directly

Calls 3

DrawImageFunction · 0.85
IsEmptyMethod · 0.80
EmptyMethod · 0.45

Tested by

no test coverage detected