Thread: Several C++ and Windows questions.

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912

    Several C++ and Windows questions.

    First, can you make a program create an instance of class when a user enters a command. For example, make a string with two numbers at the end. On command, the program increments the numbers, and creates a class under that name?
    Second, Does anyone know how to make an ICO appear in a dialog window with Turbo C++ 4.5
    Third, you know that dialog box that is always the same for selecting files? How do I program that? Thanks in advance if you can help.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    1. Almost certainly, read the stuff you want from the user then pass that to an overloaded constructor.

    2. Don't know, don't use it.

    3. Look up the GetOpenFileName() API. It envokes the common dialog for selecting a file.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    1) it's possible, but it sounds really stupid. why would you want to do that???
    2) just the same in any other compiler... have a look at SetClassLong() with the GCL_HICON and/or GCL_HICONSM parameters.
    3) already been answered.

    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed