Re: SYSTEMTIME and Conversion

Tech-Archive recommends: Speed Up your PC by fixing your registry



"=?Utf-8?B?U2ltZXM=?=" <Simes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
news:037131C0-FFF0-4515-B84F-156F5E3A9183@xxxxxxxxxxxxx:

> I'm attempting to read the current time then convert it to be used in
> DrawText. Now, the Hour and Time are WORDS in the SYSTEMTIME structure
> and DrawText uses a TCHAR array. Coersing to TCHAR won't work as it's
> converting to an array type and char coersing won't work either as the
> hour and minutes can have 2 characters.
>
> Any ideas gratefully appreciated!
>
> TIA
>
> Si

Haven't all of us already had this problem?
I'm doing

GetDateFormat(NULL, NULL, p_stTime, (LPCTSTR) csDateformat, tcDatHelp,40);

with

SYSTEMTIME * p_stTime;
TCHAR * tcDatHelp = (TCHAR*)LocalAlloc(LPTR, 40);
CString csDateformat = _T("dd'.'MM'.'yyyy");

Kerstin

.



Relevant Pages

  • Re: SYSTEMTIME and Conversion
    ... > DrawText uses a TCHAR array. ... > to an array type and char coersing won't work either as the hour and ... GetDateFormat and GetTimeFormat (they both accept a pointer to a SYSTEMTIME) ...
    (microsoft.public.pocketpc.developer)
  • SYSTEMTIME and Conversion
    ... the Hour and Time are WORDS in the SYSTEMTIME structure and ... DrawText uses a TCHAR array. ... to an array type and char coersing won't work either as the hour and minutes ...
    (microsoft.public.pocketpc.developer)
  • Re: SYSTEMTIME and Conversion
    ... the Hour and Time are WORDS in the SYSTEMTIME structure and ... >DrawText uses a TCHAR array. ... >to an array type and char coersing won't work either as the hour and minutes ... SYSTEMTIME sTime; ...
    (microsoft.public.pocketpc.developer)