Thread: SetWindowText()

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    15

    SetWindowText()

    If i have a variable buffer containing a string for example "18" and i wanted to add a 9 to the end of the string and place it in an edit window. How would i code that im sure its a stupid question but im coming from a java background my code looks a bit like this
    Code:
    	TCHAR buffer [256];
    	GetWindowText(hwndEdit,buffer,255);
    	SetWindowText(hwndEdit,TEXT("buffer + 9"));
    where buffer contins the original string.I know my code is wrong, I just put it like that to show what im trying to do.
    Last edited by jay kay; 03-14-2005 at 09:34 AM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    One way is to append the TCHAR string using _tcscat() from tchar.h.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SetWindowText(...) in richedit controls
    By jimmy_anttila in forum Windows Programming
    Replies: 8
    Last Post: 05-21-2004, 01:57 PM
  2. SetWindowText();
    By psychopath in forum Windows Programming
    Replies: 3
    Last Post: 04-04-2004, 02:56 AM
  3. SetWindowText()
    By COBOL2C++ in forum Windows Programming
    Replies: 4
    Last Post: 09-17-2003, 10:39 PM
  4. SetWindowText Error ;(
    By NickName-Here in forum Windows Programming
    Replies: 8
    Last Post: 07-19-2003, 06:17 PM
  5. SetWindowText
    By Thantos in forum Windows Programming
    Replies: 7
    Last Post: 12-10-2001, 03:26 AM