The specific steps to use Settime in mfc

Updated on vogue 2024-02-09
3 answers
  1. Anonymous users2024-02-05

    You're talking about settimer, right?

    uint_ptr settimer(

    hwnd hwnd, window handle.

    uint ptr nidevent, timer ID, which can be used to determine which timer is the one when there are multiple timers.

    uint nelapse, time interval in milliseconds.

    timerproc lptimerfunc function.

    If you're using it in MFC, it's already encapsulated, so you don't need to specify the hwnd parameter.

    The iidevent flag is generally a self-defined flag, for example, a timer is needed to calculate time, and a timer is needed to calculate other things, that is, different timers need to be distinguished.

    Nelapse is how often the timer is triggered.

    The last parameter is the ** function, which means which function is needed to process the data when the timer is triggered, and when it is set to null, it is called the ontime function, and you can overload the function in mfc.

    For example. #define um_timer wm_user+1

    settimer(um_timer,1000,null);Triggers every 1 second interval and uses the ontimer function.

    And then. c**:ontimer(uint_ptr nidevent)

    if(nidevent == umtimer)

    This place fills in with what you need to deal with.

  2. Anonymous users2024-02-04

    First, add :settimer(); Start the timer. Then you can pass the function.

    getlocaltime(&nowtime);Gets the system time and passes it to m nowtime

    m_"%d-%d-%d::%d:%d:%d"), you can get the current time.

    To stop the timer, all you need is killtimer(1).

  3. Anonymous users2024-02-03

    Function name: settime

    Function: Set the system time.

    Usage: void settime(struct time *timep);

    Example: include

    #include

    int main(void)

    struct time t;

    gettime(&t);

    printf("the current minute is: %d", ;

    printf("the current hour is: %d", ;

    printf("the current hundredth of a second is: %d", ;

    printf("the current second is: %d", ;

    add one to the minutes struct element and then call settime */

    settime(&t);

    return 0;

Related questions
5 answers2024-02-09

mark it...

Sun Xin's tutorial seems to have it above。。。 >>>More

11 answers2024-02-09

Drop out the following line and try it:

#include "res\" // non-microsoft visual c++ edited resources >>>More

8 answers2024-02-09

If you are sure that your hardware is okay with the system, it is estimated that you are infected with a virus, no matter how you reinstall the system, as long as you click on the programs in other disks, the virus will be activated and the computer will be reinfected. The first solution is to kill and kill, if this method is ineffective, the easiest and most thorough way to repartition, but your data will not be saved.

15 answers2024-02-09

When the hard disk is used for disk reading operation, it is normal for the head to produce some noise (such as click-click-click-click) when reading and writing homing.

6 answers2024-02-09

It will affect if it is not handled well, and it will have a big impact, and a program like yours has changed everything, and the IP has changed, which is equivalent to a big change. >>>More