Click here to Skip to main content
15,908,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I/O skipping the buffer??? Pin
Anonymous26-May-05 15:15
Anonymous26-May-05 15:15 
GeneralRe: I/O skipping the buffer??? Pin
Christian Graus26-May-05 15:23
protectorChristian Graus26-May-05 15:23 
GeneralToolBar question! Pin
goiania26-May-05 13:28
goiania26-May-05 13:28 
GeneralRe: ToolBar question! Pin
Shog926-May-05 13:43
sitebuilderShog926-May-05 13:43 
GeneralRe: ToolBar question! Pin
goiania26-May-05 14:00
goiania26-May-05 14:00 
Questioncontext menu on form without titlebar? Pin
FreewareFire26-May-05 12:02
FreewareFire26-May-05 12:02 
AnswerRe: context menu on form without titlebar? Pin
FreewareFire27-May-05 10:33
FreewareFire27-May-05 10:33 
Generalsetting different time zone Pin
pnpfriend26-May-05 11:26
pnpfriend26-May-05 11:26 
Hi all,
I'm trying to set the give time zone as my local time zone..
but the time that I suppose to get is totally wrong.
let say.. my local time is
currentLocalTime = 5:30 pm 05/26/2005
gmt = +5;
how can I set the local time to that gmt= +5 time zone and then reset it back to original time zone?


the following is my testing code.

<br />
SYSTEMTIME sysTime;<br />
	SYSTEMTIME sysTime1;<br />
	int gmt;<br />
<br />
	COleDateTime formatedDateTime;<br />
	COleDateTime currentDateTime;<br />
	::GetLocalTime(&sysTime); <br />
	currentDateTime.SetDateTime(sysTime.wYear,sysTime.wMonth,sysTime.wDay,sysTime.wHour,sysTime.wMinute,sysTime.wSecond);<br />
	CString temp = currentDateTime.Format("%m-%d-%Y %H:%M:%S %p");<br />
<br />
	gmt = atoi(selectedTimeZone);	<br />
	COleDateTimeSpan timeSpan(0,gmt,0,0);	<br />
	<br />
	formatedDateTime = currentDateTime - timeSpan;<br />
	sysTime1.wDay = formatedDateTime.GetDay();<br />
	sysTime1.wHour = formatedDateTime.GetHour();<br />
	sysTime1.wSecond = formatedDateTime.GetSecond();<br />
	sysTime1.wMinute = formatedDateTime.GetMinute();<br />
	sysTime1.wYear = formatedDateTime.GetYear();<br />
	sysTime1.wMonth = formatedDateTime.GetMonth();<br />
<br />
	::SetLocalTime(&sysTime1);	<br />
	::GetLocalTime(&sysTime1); <br />
	currentDateTime.SetDateTime(sysTime1.wYear,sysTime1.wMonth,sysTime1.wDay,sysTime1.wHour,sysTime1.wMinute,sysTime1.wSecond);	<br />
	CString temp1 = currentDateTime.Format("%m-%d-%Y %H:%M:%S %p");<br />
	<br />
	::GetLocalTime(&sysTime); <br />
	currentDateTime.SetDateTime(sysTime.wYear,sysTime.wMonth,sysTime.wDay,sysTime.wHour,sysTime.wMinute,sysTime.wSecond);<br />
	temp1 = currentDateTime.Format("%m-%d-%Y %H:%M:%S %p");<br />

GeneralRe: setting different time zone Pin
geo_m26-May-05 18:29
geo_m26-May-05 18:29 
GeneralRe: setting different time zone Pin
pnpfriend27-May-05 4:16
pnpfriend27-May-05 4:16 
GeneralRe: setting different time zone Pin
geo_m29-May-05 19:29
geo_m29-May-05 19:29 
GeneralUsing custom buttons in a CToolbar Pin
mckavity26-May-05 10:12
mckavity26-May-05 10:12 
GeneralRe: Using custom buttons in a CToolbar Pin
mckavity26-May-05 10:15
mckavity26-May-05 10:15 
GeneralRe: Using custom buttons in a CToolbar Pin
Shog926-May-05 12:16
sitebuilderShog926-May-05 12:16 
GeneralRe: Using custom buttons in a CToolbar Pin
mckavity27-May-05 3:35
mckavity27-May-05 3:35 
GeneralWM_SETTEXT Desperate Issue Pin
Axonn Echysttas26-May-05 9:50
Axonn Echysttas26-May-05 9:50 
GeneralRe: WM_SETTEXT Desperate Issue Pin
David Crow26-May-05 10:06
David Crow26-May-05 10:06 
GeneralRe: WM_SETTEXT Desperate Issue Pin
Axonn Echysttas26-May-05 10:50
Axonn Echysttas26-May-05 10:50 
GeneralRe: WM_SETTEXT Desperate Issue Pin
Ryan Binns26-May-05 18:41
Ryan Binns26-May-05 18:41 
GeneralRe: WM_SETTEXT Desperate Issue Pin
Axonn Echysttas26-May-05 21:40
Axonn Echysttas26-May-05 21:40 
Generalcreate a text wallpaper Pin
jet91526-May-05 9:37
jet91526-May-05 9:37 
GeneralRe: create a text wallpaper Pin
David Crow26-May-05 9:42
David Crow26-May-05 9:42 
GeneralRe: create a text wallpaper Pin
jet91526-May-05 10:34
jet91526-May-05 10:34 
GeneralRe: create a text wallpaper Pin
David Crow27-May-05 2:13
David Crow27-May-05 2:13 
GeneralTake de real part from a decimal number Pin
alvarillo26-May-05 9:20
alvarillo26-May-05 9:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.