Print Page | Close Window

SetEditStyle(ES_NUMBER) = no effect

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=14109
Printed Date: 22 June 2025 at 4:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SetEditStyle(ES_NUMBER) = no effect
Posted By: znakeeye
Subject: SetEditStyle(ES_NUMBER) = no effect
Date 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/



Replies:
Posted By: Oleg
Date 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


Posted By: znakeeye
Date 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/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net