another ? from gcn the idiot!

This is a discussion on another ? from gcn the idiot! within the C++ Programming forums, part of the General Programming Boards category; how do you make a minimized program pop up when such = 0 like this Code: #include <iostream.h> #include <stdlib.h> ...

  1. #1
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942

    Talking another ? from gcn the idiot!

    how do you make a minimized program pop up when such = 0 like this

    Code:
    #include <iostream.h>
    #include <stdlib.h>
    #include <windows.h>
    
    int main()
    {
          int minutes;
          minutes=90;
          while(minutes > 0)
          {
                              Sleep(60000);
                              minutes-=1;
                              cout << minutes << " minutes left!" << endl;
          }
          //I want it to pop up here
          cout << "YOUR TIME IS UP!!!!" << endl;
          system("PAUSE");
          return 0;
    }

  2. #2
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    i think you could create a window class for that window and use the ShowWindow() function, but dont quote me.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    ShowWindow(YourWindowHwnd, SW_MINIMIZE);

    in the beginning and

    ShowWindow(YourWindowHwnd, SW_RESTORE);

    This will simply minimize/restore it. If you want it completely hidden use SW_HIDE and SW_SHOW.

    Or you could wait with the creation of the window after those 90 minutes have passed.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Idiot spammer.
    By brewbuck in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 03-23-2009, 08:19 PM
  2. Feel Like An Idiot
    By golfinguy4 in forum A Brief History of Cprogramming.com
    Replies: 22
    Last Post: 07-04-2003, 12:45 PM
  3. Screaming idiot - shuttle "photo".
    By adrianxw in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 03-08-2003, 07:44 PM
  4. Replies: 0
    Last Post: 02-24-2002, 08:03 PM
  5. Idiot Canadians
    By Troll_King in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 10-15-2001, 07:35 AM

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