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

    Question Invalidate Method Problem

    The problem I have is I am trying to set a string in a label to equal '&whatever'. I am trying to place headers and footers into my application and have a dialog box that comes up allowing you to put stuff in on the left, centre and right. Once you have finished doing this you click 'ok' which updates the header and footers dialog box underneath it. I suspect the problem may be in the call to invalidate, (so that the whole window is re-drawn next time), however i am aware that had the problem existed before the invalidate call then I would not have known about it, until the call to Invalidate.

    The problem is when you type '&whatever' in the string

    the & sign is removed and the first letter of the string is underlined.

    Its a long shot that its Invalidate's fault but, has any one come across this before?


    Many thanks

    Will

  2. #2
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Lightbulb Re: Invalidate Method Problem

    use
    if it's a CString type just go through this.

    CString str ="&str";

    now u can see value of str = &str

    and i din't found any of the problem

    first use "&whatever" not '&whatever'

    if not just put your code.
    Last edited by humptydumpty; September 8th, 2005 at 03:25 AM.

  3. #3
    Join Date
    Apr 2003
    Location
    Athens, Greece
    Posts
    1,094

    Re: Invalidate Method Problem

    If you need to escape the '&' character for a menu item or a label you may use a double "&&"
    E.g. "&&whatever" should show "&whatever"
    Extreme situations require extreme measures

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