Thread: SendMessage()

  1. #1
    Happily-Married
    Guest

    SendMessage()

    Code:
    SendMessage(hStatus, SB_SETTEXT, 1, (LPARAM) FileName);
    Can someone please tell me how to get a space " " before FileName. as it shows to close to the edge of the status bar.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    have you tried strcat() or _tcscat() ?
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    245
    char *NewFileName = new char[strlen(FileName)+2];

    strcpy (NewFileName, " ");
    strcat (NewFileName, FileName);
    strcpy (FileName, NewFileName);
    delete [] NewFileName;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 03-19-2009, 02:15 AM
  2. SendMessage to 16bit program
    By khdani in forum Windows Programming
    Replies: 2
    Last Post: 09-02-2008, 02:37 AM
  3. Combobox problem
    By gargamel in forum Windows Programming
    Replies: 2
    Last Post: 05-06-2005, 01:37 PM
  4. Sendmessage
    By knutso in forum C++ Programming
    Replies: 2
    Last Post: 09-30-2002, 05:34 AM
  5. WM_KEYDOWN and SendMessage
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 07-13-2002, 05:23 PM