Thread: Change Title in a MFC SDI

  1. #1
    Registered User
    Join Date
    Feb 2003

    Change Title in a MFC SDI


    how can I change the title of a MFC SDI with a commandline parameter at the first call.

    A program call for example:
    program.exe -title "Nice title"

    thanks for help

    cu hick.hack

  2. #2
    Programming is fun, mkay?
    Join Date
    Oct 2001

    Post Possible solution ...

    Well, in the MainFrm.cpp source file, you can edit the "int CMainFrame::OnCreate(LPCREATESTRUCT);" function like this. Try using the "GetCommandLine()" function, and just call "SetWindowText()". It shouldn't be too hard to figure out how to use the functions. I hope this helps.


    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. type casting?
    By greatonesv in forum C Programming
    Replies: 12
    Last Post: 10-22-2008, 08:21 PM
  2. 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
  3. how to change font of button's caption using MFC
    By urvashi in forum Windows Programming
    Replies: 5
    Last Post: 04-27-2004, 06:09 AM
  4. Replies: 2
    Last Post: 09-04-2001, 02:12 PM
  5. Change Title
    By Witch_King in forum A Brief History of
    Replies: 23
    Last Post: 09-01-2001, 12:57 PM