Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - SetEditStyle(ES_NUMBER) = no effect
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetEditStyle(ES_NUMBER) = no effect

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: SetEditStyle(ES_NUMBER) = no effect
    Posted: 22 April 2009 at 6:28pm
XTP 13.
 
Consider this:
pControlEdit->SetEditStyle(pControlEdit->GetEditStyle() | ES_NUMBER);
 
ES_NUMBER has no effect!
 
BOOL CXTPCommandBarEditCtrl::CreateEdit(DWORD dwStyle, CWnd* pParentWnd)
{
    if (GetRichEditContext().m_hInstance)
    {
        // Please add this to start with:
        ASSERT((dwStyle & (all CEdit-only styles)) == 0);
       
        BOOL bResult = CWnd::Create(GetRichEditContext().m_strClassName, 0, dwStyle, CRect(0, 0, 0, 0), pParentWnd, 0);
        SendMessage(EM_SETEVENTMASK, 0, ENM_CHANGE);
        SendMessage(EM_SETTEXTMODE, TM_PLAINTEXT | TM_SINGLELEVELUNDO);

        return bResult;
    }

    return Create(dwStyle, CRect(0, 0, 0, 0), pParentWnd, 0);
}

 
Secondly, it seems I cannot explicitly use CEdit here. That's bad... (I don't want to override the control for such a small thing!)
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2009 at 2:43am
Hi,
 
The thing that our Edit in CommandBars is actually RichEdit - but it doesn't support ES_NUMBER style :(
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2009 at 3:08am
Yes, so please add the ASSERT above. You should check for ES_NUMBER, ES_PASSWORD etc...
 
But, I still think it should be possible to explicitly use CEdit where needed!
PokerMemento - http://www.pokermemento.com/
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.