any way to modify static text? lol

This is a discussion on any way to modify static text? lol within the Windows Programming forums, part of the Platform Specific Boards category; is there any way to edit static text boxes in win32? i looked on msdn, but i didnt' see anything ...

  1. #1
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903

    any way to modify static text? lol

    is there any way to edit static text boxes in win32? i looked on msdn, but i didnt' see anything about changing the value of static text

    i'm assuming that you can't, but i didn't find anything on edit boxes, (and i don't want to use an edit box, because i just want to be able to show some text on the fly)

    i know this probably isn't possible cuz it's static and all, but if there is a way, i'd like to know.......


    thank you

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Use SetWindowText, which just sends a WM_SETTEXT message:
    Code:
    TCHAR chTxt[]=TEXT("New text to add");
    SetWindowText(hStatic,chTxt);
    where hStatic is the handle of your static control.

    edit: editing
    Last edited by Ken Fitlike; 04-27-2003 at 06:33 AM.

  3. #3
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    did you try SetDlgItemText()?

    I assume you mean that you want the program to change the text and not the user?

    EDIT: And this is for a dialog box. For some reason I had it in my head you were making a dialog box .
    Last edited by minesweeper; 04-27-2003 at 06:35 AM.

  4. #4
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    yah, i just remember the SetWindowText command, thanks anyways though, lol I got it to work now

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. LNK2001 ERROR!!! need help
    By lifeafterdeath in forum C++ Programming
    Replies: 7
    Last Post: 05-27-2008, 05:05 PM
  2. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  3. MFC: Change the color of static text with button press?
    By BrianK in forum Windows Programming
    Replies: 2
    Last Post: 06-16-2004, 11:03 PM
  4. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM
  5. Problem with static text in dialog boxes
    By Clyde in forum Windows Programming
    Replies: 11
    Last Post: 05-28-2002, 12:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21