Running a program minimized

This is a discussion on Running a program minimized within the C Programming forums, part of the General Programming Boards category; Is there a way to make a program run minimized? I know you can just make a shortcut that runs ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    39

    Running a program minimized

    Is there a way to make a program run minimized? I know you can just make a shortcut that runs minimize, but how can I do it without a shortcut?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Click on the little [_] box. Or you could just go to your favorite search engine, type in something about Windows programming in C and running a program minimized...


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    39
    That doesn't help...

    The program only runs for a few seconds, so I really don't see a reason to click the minimize button. I want it to run minimized from the beginning so I never have to see it.

    I already searched Google, and found nothing.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Replace main() with WinMain() and ta-da. Nothing will appear.

    Of course, that's the easiest solution

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    39
    I did that, now I get an error on "{".

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    What kind of error? (There are more than one, you know.) And also, WinMain takes different arguments than main does.

  7. #7
    Registered User
    Join Date
    Mar 2009
    Posts
    39
    Quote Originally Posted by tabstop View Post
    What kind of error? (There are more than one, you know.) And also, WinMain takes different arguments than main does.
    On line 6 ("{") I get: number of arguments doesn't match prototype.
    On line 1040 (Which doesn't exist...) I get: prototype declaration.

    What arguments do I need to use?

  8. #8
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    WinMain Function ()

    Take note of the "function information" down the bottom, especially the "include".

  9. #9
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,308
    You make it sound simple when in fact it is not. You haven't explained how he will need to change several project settings etc and what to do differently if he was using values from the command line etc.

    I suggest creating a new project of the right type and see what if different between that one and your current one.

  10. #10
    Registered User
    Join Date
    Mar 2009
    Posts
    39
    What do you mean by "the right type"?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program running long
    By smarta_982002 in forum Windows Programming
    Replies: 3
    Last Post: 03-27-2008, 06:24 AM
  2. Running my program in the background
    By shoobsie in forum Windows Programming
    Replies: 4
    Last Post: 10-09-2005, 03:38 AM
  3. Replies: 3
    Last Post: 09-05-2005, 09:57 AM
  4. Why is my program running away?
    By badkitty in forum C++ Programming
    Replies: 4
    Last Post: 09-19-2001, 05:27 PM
  5. Running program
    By muffin in forum C Programming
    Replies: 5
    Last Post: 08-30-2001, 11:57 AM

Tags for this Thread


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