Class & Caption in console

This is a discussion on Class & Caption in console within the Windows Programming forums, part of the Platform Specific Boards category; Hi, there is a way to set a class and a caption in a C (console)program ? I mean force ...

  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,831
    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 04: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, 04: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, 08:54 AM
  4. class errors
    By romeoz in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2003, 07:57 PM
  5. Abstract class problem
    By VanJay011379 in forum C++ Programming
    Replies: 9
    Last Post: 07-31-2002, 01:30 PM

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