CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2002
    Posts
    756

    Text control as ES_NUMBER

    Hi, ALL,
    I am trying to create a text control that will only accept numbers and so I used the style ES_NUMBER.
    Everything is built and ran fine.

    But when I tried to enter a character, the tooltip showed up saying:

    Unacceptable character
    You can only type the numbers here
    Is there a way to suppress this tooltip?

    Thank you.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Text control as ES_NUMBER

    Not sure, however did you try EM_HIDEBALLOONTIP message?
    Victor Nijegorodov

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Text control as ES_NUMBER

    Quote Originally Posted by VictorN View Post
    Not sure, however did you try EM_HIDEBALLOONTIP message?
    If it won't help then see https://stackoverflow.com/questions/...cedit/51041222
    Victor Nijegorodov

  4. #4
    Join Date
    Aug 2002
    Posts
    756

    Re: Text control as ES_NUMBER

    Hi,
    Quote Originally Posted by VictorN View Post
    Not sure, however did you try EM_HIDEBALLOONTIP message?
    Yes, I did. And I did include the manifest file (embedded into an executable).

    Thank you.

    I'm on Windows 8.1 with MSVC 2017 Community.

    One question though - is there a difference between defining and not defining ISOLATION_AWARE_ENABLED?

    Thank you

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Text control as ES_NUMBER

    Quote Originally Posted by OneEyeMan View Post
    Hi,
    Yes, I did. And I did include the manifest file (embedded into an executable).
    Thank you.
    So did you solve your problem?

    Quote Originally Posted by OneEyeMan View Post
    One question though - is there a difference between defining and not defining ISOLATION_AWARE_ENABLED?
    Sorry, I have no idea... Try to find something useful in MSDN.
    Victor Nijegorodov

  6. #6
    Join Date
    Aug 2002
    Posts
    756

    Re: Text control as ES_NUMBER

    Hi,
    Quote Originally Posted by VictorN View Post
    So did you solve your problem?
    No.

    Quote Originally Posted by VictorN View Post
    Sorry, I have no idea... Try to find something useful in MSDN.
    The problem - debugger doesn't even stop there...

    Thank you.

  7. #7
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Text control as ES_NUMBER

    Regarding ISOLATION_AWARE_ENABLED. Is your app a COM app or does it host COM objects?

  8. #8
    Join Date
    Aug 2002
    Posts
    756

    Re: Text control as ES_NUMBER

    Hi,
    Quote Originally Posted by Arjay View Post
    Regarding ISOLATION_AWARE_ENABLED. Is your app a COM app or does it host COM objects?
    No, nothing like this.

    Thank you.

  9. #9
    Join Date
    Aug 2002
    Posts
    756

    Re: Text control as ES_NUMBER

    Hi,
    Des this message has to be handed in WindowProc()?
    Because it looks like I did it inside the MSWOnNotify()...

    Thank you.

  10. #10
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Text control as ES_NUMBER

    Quote Originally Posted by OneEyeMan View Post
    Des this message has to be handed in WindowProc()?
    Because it looks like I did it inside the MSWOnNotify()...
    1. What is MSWOnNotify?
    2. What message do you mean? If it is EM_HIDEBALLOONTIP, then no, it is not a notification message. It is the message you are to send to the edit control.
    Victor Nijegorodov

  11. #11
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Text control as ES_NUMBER

    Quote Originally Posted by OneEyeMan View Post
    Quote Originally Posted by VictorN View Post
    So did you solve your problem?
    No.
    But didn't you try the solution I had suggested in the post#3?
    It works for me!
    Victor Nijegorodov

  12. #12
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Text control as ES_NUMBER

    Quote Originally Posted by OneEyeMan View Post
    Hi,


    No, nothing like this.

    Thank you.
    I asked because the ISOLATION_AWARE_ENABLED docs indicate this flag is related to COM apps (only).

  13. #13
    Join Date
    Aug 2002
    Posts
    756

    Re: Text control as ES_NUMBER

    Hi,
    Quote Originally Posted by VictorN View Post
    But didn't you try the solution I had suggested in the post#3?
    It works for me!
    Yes, it works for me as well.
    I just did handle it as a notification message instead of a regular one.

    Sorry for the noise.

    Thank you.

  14. #14
    Join Date
    Aug 2002
    Posts
    756

    Re: Text control as ES_NUMBER

    Hi,
    Quote Originally Posted by Arjay View Post
    I asked because the ISOLATION_AWARE_ENABLED docs indicate this flag is related to COM apps (only).
    Thx for clarifying.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured