Ejemplo n.º 1
0
        NEdit* NEdit::SelectAll()
        {
            NAssertError(IsWndValid(), _T("call parent->AddChild first"));
            if(!IsWndValid())
                return this;

            ::SendMessage(realWindow_, EM_SETSEL, 0, -1);
            return this;
        }
Ejemplo n.º 2
0
        NEdit* NEdit::SetReadOnly(bool readOnly)
        {
            NAssertError(IsWndValid(), _T("call parent->AddChild first"));
            if(!IsWndValid())
                return this;

            ::SendMessage(realWindow_, EM_SETREADONLY, readOnly, 0);
            return this;
        }
Ejemplo n.º 3
0
        NEdit* NEdit::ShowTooltip(TooltipIconType iconType, LPCTSTR szTitle, LPCTSTR szText)
        {
            NAssertError(IsWndValid(), _T("call parent->AddChild first"));
            if(!IsWndValid())
                return this;

            nui::Base::NInstPtr<nui::Data::NStringBundle> stringBundle(MemToolParam);
            Base::NString strTitle = stringBundle->GetString(szTitle);
            Base::NString strText = stringBundle->GetString(szText);

            EDITBALLOONTIP tip = {sizeof(EDITBALLOONTIP)};
            tip.pszText = strText.GetData();
            tip.pszTitle = strTitle.GetData();
            tip.ttiIcon = iconType;
            ::SendMessage(realWindow_, EM_SHOWBALLOONTIP, 0, (LPARAM)&tip);
            return this;
        }
Ejemplo n.º 4
0
        NEdit* NEdit::SetHintText(LPCTSTR hintText)
        {
            nui::Base::NInstPtr<nui::Data::NStringBundle> stringBundle(MemToolParam);
            hintText_ = stringBundle->GetString(hintText);
            if(!IsWndValid())
                return this;

            ::SendMessage(realWindow_, EM_SETCUEBANNER, TRUE, (LPARAM)hintText_.GetData());
            return this;
        }
Ejemplo n.º 5
0
 Base::NString NWndUi::GetText() const
 {
     if(IsWndValid())
     {
         TCHAR szText[1000];
         ::GetWindowText(realWindow_, szText, 999);
         szText[1000] = 0;
         return szText;
     }
     return __super::GetText();
 }
Ejemplo n.º 6
0
 // NFrame
 // data
 void NWndUi::SetText(const Base::NString& text)
 {
     __super::SetText(text);
     if(IsWndValid())
         ::SetWindowText(realWindow_, GetText().GetData());
 }