I dont know why my test code works with GetLocalTime but doesnt with GetSystemTime;
i want the program to play sound if for instance, time is later than
19pm (simplified didnt bother with min&sec) it shows the correct hour and play the sound for GetLocalTime but if i replace it with GetSystemTime ,it will show 0 and wont play sound no matter what time it is; here is the code i hope i get lucky with this one compare to my other posts.
thx
Code:case 91: //GetLocalTime(&st); GetSystemTime(&st); if(st.wHour > 19 ){ hdc = GetDC(hwnd); TextOut(hdc, 10, 0,ptext, wsprintf(ptext, "%i", st.wHour)); ReleaseDC(hwnd, hdc); PlaySound (TEXT ("alarm.wav"), NULL, SND_FILENAME | SND_ASYNC); } return 0;