Solved

Minimizing and time usage

Posted on 1998-04-25
2
186 Views
Last Modified: 2010-08-05
How do you minimize an app like normal windows by pressing a standard button?

Also how can I convert seconds into hh:mm:ss ?

I am using CBuilder 1 (I know, golden oldie)

Kind Regs,
Rob Green.
0
Comment
Question by:robjgreen
  • 2
2 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 1164158
answers coming.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1164159
1.  To minimize a window use the ShowWindow() procedure with the SW_MINIMIZE. "command".

2.  To convert seconds to hours divide by 3600 (that's 60*60).  Take the integer part of that (or do the math in integer instead of floating point).  Then to do the minutes take the remainder of the division and divide by 60.  The integer part is the minutes the remainder is the seconds.  For example.given the seconds in TotalSeconds.

int Hours = TotalSeconds / 3600;

TotalsSecond = TotalSeconds % 3600;

int Minutes = TotalSeconds / 60;
Int Seconds = TotalSeconds % 60;
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question