Thread: Class & Caption in console

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    161

    Class & Caption in console

    Hi, there is a way to set a class and a caption in a C (console)program ?

    I mean force it in some way...

    That can help me handling with another program the process of the first one.

    thanx!

    (dev cpp)

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    I'm sorry, I have to say I don't understand your question at all. Can you rephrase it or be more specific please?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    161
    sure and sorry for my bad english !!

    ok..

    U know, I can terminate or "use" a process calling it by his Class e Caption, like :

    Code:
    hWnd = FindWindow ("SciCalc", "Calcolatrice")
    SciCalc is the Class and Calcolatrice is the Caption of the window created by my calc.exe

    But if i create a C program that works in dos (the black windows that appears when i doubleclick the executable) i know that i cant terminate or "use" that process by its Class because a dos shell AFAIK doesn't have a Class.

    I want to know if there is a magic trick to force a Class and Caption in a program (in the source code i mean) like that one...a C program that run in a dos windows.



    Anyway i'm interessed in how to do that in C++ too coz i can import/export modify the source i'm writting

    Thanks !

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    This is more of a Windows API question than anything. I'll move your thread to the Windows forum.

    You might find that the Console's Caption is the full path and program name for the executable you're running....
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    You can set the caption of a console window, it is covered in part 2 of my consoles tutorials here.

    You can pass NULL as the first parameter to FindWindow().
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  6. #6
    Registered User
    Join Date
    Mar 2004
    Posts
    161
    thax to everyone, this forum is great
    Last edited by BianConiglio; 04-01-2004 at 05:43 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating a database
    By Shamino in forum Game Programming
    Replies: 19
    Last Post: 06-10-2007, 01:09 PM
  2. deriving classes
    By l2u in forum C++ Programming
    Replies: 12
    Last Post: 01-15-2007, 05:01 PM
  3. Mmk, I give up, lets try your way. (Resource Management)
    By Shamino in forum Game Programming
    Replies: 31
    Last Post: 01-18-2006, 09:54 AM
  4. class errors
    By romeoz in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2003, 07:57 PM