Change Title in a MFC SDI

This is a discussion on Change Title in a MFC SDI within the Windows Programming forums, part of the Platform Specific Boards category; Hello, how can I change the title of a MFC SDI with a commandline parameter at the first call. A ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    8

    Change Title in a MFC SDI

    Hello,

    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
    Posts
    490

    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.
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    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, 09:21 PM
  2. MFC: Change the color of static text with button press?
    By BrianK in forum Windows Programming
    Replies: 2
    Last Post: 06-17-2004, 12:03 AM
  3. how to change font of button's caption using MFC
    By urvashi in forum Windows Programming
    Replies: 5
    Last Post: 04-27-2004, 07:09 AM
  4. Replies: 2
    Last Post: 09-04-2001, 03:12 PM
  5. Change Title
    By Witch_King in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 09-01-2001, 01:57 PM

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