Click here to Skip to main content
15,896,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CProgressCtrl- Marquee Mode Pin
Bram van Kampen12-Dec-11 14:43
Bram van Kampen12-Dec-11 14:43 
Questionc++ win32 , equivilent to DateTime.Now() in asp.net Pin
jkirkerx11-Dec-11 10:37
professionaljkirkerx11-Dec-11 10:37 
AnswerRe: c++ win32 , equivilent to DateTime.Now() in asp.net Pin
Chandrasekharan P11-Dec-11 20:53
Chandrasekharan P11-Dec-11 20:53 
GeneralRe: c++ win32 , equivilent to DateTime.Now() in asp.net Pin
jkirkerx12-Dec-11 4:24
professionaljkirkerx12-Dec-11 4:24 
AnswerRe: c++ win32 , equivilent to DateTime.Now() in asp.net Pin
Satheesh154612-Dec-11 1:11
Satheesh154612-Dec-11 1:11 
GeneralRe: c++ win32 , equivilent to DateTime.Now() in asp.net Pin
jkirkerx12-Dec-11 4:23
professionaljkirkerx12-Dec-11 4:23 
AnswerRe: c++ win32 , equivilent to DateTime.Now() in asp.net Pin
Richard MacCutchan12-Dec-11 4:59
mveRichard MacCutchan12-Dec-11 4:59 
GeneralThat's it, done with this one for now. Pin
jkirkerx12-Dec-11 16:20
professionaljkirkerx12-Dec-11 16:20 
Thanks for the help Richard.

I was trying to inject the results into a datetime column in SQL via ODBC, but between the 2, it was hard to nail down the error. I didn't know if it was the format of the data, or ODBC not wanting to accept the LPSYSTEMTIME structure, or the size/precision of the data, which for some reason is 23,3.

Ended up with this for now, it works, I can modify it later if I find something better.

SYSTEMTIME systemTime;			
GetSystemTime(&systemTime);
LPSYSTEMTIME lpSystemTime = &systemTime;
			
swprintf_s(szDateOpened,
	L"%d-%d-%d %d:%d:%d",
	systemTime.wMonth,
	systemTime.wDay,
	systemTime.wYear,

	systemTime.wHour,
	systemTime.wMinute,
	systemTime.wSecond
			);
szDateOpened[wcslen(szDateOpened)] = L'\0';

And then sent it to the ODBC Driver in another function. I just need to figure how how to create a MD5 Hash in UT8 for the Encoded Password, and then this part of the program is done.
L"INSERT INTO UserInfo(FirstName, LastName, UserName, PhraseHint, Phrase, PasswordClear, DateOpened, Email, FrontAdmin, SecurityLevel, Enabled, LastLogin) "
L"VALUES(?, ?, ?, ?, ?, ?, CAST(? as datetime), ?, ?, ?, ?, CAST(? AS datetime) )"

and parameterized the values, that one liner took all day long.
retcode = SQLBindParameter(hstmt, 12, SQL_PARAM_INPUT, SQL_C_WCHAR, SQL_VARCHAR, 23, 3, pzLastLogin, wcslen(pzLastLogin), NULL);

GeneralRe: That's it, done with this one for now. Pin
Richard MacCutchan12-Dec-11 22:49
mveRichard MacCutchan12-Dec-11 22:49 
GeneralRe: That's it, done with this one for now. Pin
jkirkerx15-Dec-11 19:21
professionaljkirkerx15-Dec-11 19:21 
AnswerRe: c++ win32 , equivilent to DateTime.Now() in asp.net Pin
Satheesh154613-Dec-11 17:30
Satheesh154613-Dec-11 17:30 
QuestionDock an CControlBar into CChidFrame ? Pin
_Flaviu10-Dec-11 9:01
_Flaviu10-Dec-11 9:01 
AnswerRe: Dock an CControlBar into CChidFrame ? Pin
Richard MacCutchan10-Dec-11 22:09
mveRichard MacCutchan10-Dec-11 22:09 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
_Flaviu11-Dec-11 6:03
_Flaviu11-Dec-11 6:03 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
Richard MacCutchan11-Dec-11 22:10
mveRichard MacCutchan11-Dec-11 22:10 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
_Flaviu11-Dec-11 22:38
_Flaviu11-Dec-11 22:38 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
Richard MacCutchan12-Dec-11 0:35
mveRichard MacCutchan12-Dec-11 0:35 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
_Flaviu12-Dec-11 19:25
_Flaviu12-Dec-11 19:25 
Questionhow to parse an algebric equation in c++? Pin
rahulvishwakarma9-Dec-11 19:46
rahulvishwakarma9-Dec-11 19:46 
AnswerRe: how to parse an algebric equation in c++? Pin
Richard MacCutchan9-Dec-11 21:22
mveRichard MacCutchan9-Dec-11 21:22 
AnswerRe: how to parse an algebric equation in c++? Pin
Iain Clarke, Warrior Programmer9-Dec-11 23:08
Iain Clarke, Warrior Programmer9-Dec-11 23:08 
AnswerRe: how to parse an algebric equation in c++? Pin
Alan Balkany12-Dec-11 5:46
Alan Balkany12-Dec-11 5:46 
AnswerRe: how to parse an algebric equation in c++? Pin
Bram van Kampen12-Dec-11 16:00
Bram van Kampen12-Dec-11 16:00 
QuestionHow do i get the screen coordinates of an IHTMLElement? Pin
kartikdasani8-Dec-11 22:25
kartikdasani8-Dec-11 22:25 
AnswerRe: How do i get the screen coordinates of an IHTMLElement? Pin
Code-o-mat9-Dec-11 3:02
Code-o-mat9-Dec-11 3:02 

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.