Click here to Skip to main content
16,007,277 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can't get .LIB file; just .DLL. Pin
Mark Salsbery7-May-08 8:27
Mark Salsbery7-May-08 8:27 
Questionhow to send message to a specific tab in IE7 aand IE 8 Pin
Shailendra Sason6-May-08 9:28
Shailendra Sason6-May-08 9:28 
AnswerRe: how to send message to a specific tab in IE7 aand IE 8 Pin
led mike6-May-08 11:44
led mike6-May-08 11:44 
Questionplz help ... , what is the best book for ... Pin
mostafa_h6-May-08 8:15
mostafa_h6-May-08 8:15 
AnswerRe: plz help ... , what is the best book for ... Pin
David Crow6-May-08 8:28
David Crow6-May-08 8:28 
AnswerRe: plz help ... , what is the best book for ... Pin
dehseth6-May-08 20:06
dehseth6-May-08 20:06 
GeneralRe: plz help ... , what is the best book for ... Pin
mostafa_h8-May-08 4:33
mostafa_h8-May-08 4:33 
QuestionCOleDateTime Nonsense... more bizarre than I've seen before anyway... Pin
jsightler6-May-08 6:19
jsightler6-May-08 6:19 
I ran into some problems with COleDateTime.ParseDateTime that I didn't understand, so I assumed that my app was misusing/abusing them. I tried instead to write a small cmd-line app with MFC support that would explain the problem... here is the src code:

<br />
#include "stdafx.h"<br />
#include "TestDateTime3.h"<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;<br />
#endif<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// The one and only application object<br />
<br />
CWinApp theApp;<br />
<br />
using namespace std;<br />
<br />
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])<br />
{<br />
	int nRetCode = 0;<br />
<br />
	// initialize MFC and print and error on failure<br />
	if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))<br />
	{<br />
		// TODO: change error code to suit your needs<br />
		cerr << _T("Fatal Error: MFC initialization failed") << endl;<br />
		nRetCode = 1;<br />
	}<br />
	else<br />
	{<br />
		COleDateTime *pTime = new COleDateTime();<br />
		pTime->ParseDateTime(_T("1/25/1996 8:30:00"));<br />
	}<br />
<br />
	return nRetCode;<br />
}<br />


The interesting part is:
<br />
COleDateTime *pTime = new COleDateTime();<br />
pTime->ParseDateTime(_T("1/25/1996 8:30:00"));<br />


This always returns failure and sets the status flag to invalid. I can also try formats such as "2001/01/01" or "1/1/2007" all to the same effect.

If I run it under the debugger, and try to step into ParseDateTime, it steps into COleCurrency::ParseCurrency instead of the intended method. I do not have any idea how or why that could possibly happen.

This is on a windows 2003 server machine. Are there any ideas out there?
AnswerRe: COleDateTime Nonsense... more bizarre than I've seen before anyway... Pin
jsightler6-May-08 6:25
jsightler6-May-08 6:25 
GeneralRe: COleDateTime Nonsense... more bizarre than I've seen before anyway... Pin
led mike6-May-08 6:33
led mike6-May-08 6:33 
AnswerRe: COleDateTime Nonsense... more bizarre than I've seen before anyway... Pin
Chris Meech6-May-08 7:14
Chris Meech6-May-08 7:14 
GeneralRe: COleDateTime Nonsense... more bizarre than I've seen before anyway... Pin
jsightler8-May-08 4:42
jsightler8-May-08 4:42 
QuestionAlternative for TIMERs in MFC?? Pin
Kiran Satish6-May-08 6:05
Kiran Satish6-May-08 6:05 
QuestionRe: Alternative for TIMERs in MFC?? Pin
CPallini6-May-08 6:18
mveCPallini6-May-08 6:18 
AnswerRe: Alternative for TIMERs in MFC?? Pin
Kiran Satish6-May-08 6:49
Kiran Satish6-May-08 6:49 
AnswerRe: Alternative for TIMERs in MFC?? Pin
toxcct6-May-08 6:25
toxcct6-May-08 6:25 
GeneralRe: Alternative for TIMERs in MFC?? Pin
Kiran Satish6-May-08 6:52
Kiran Satish6-May-08 6:52 
GeneralRe: Alternative for TIMERs in MFC?? Pin
toxcct6-May-08 6:54
toxcct6-May-08 6:54 
GeneralRe: Alternative for TIMERs in MFC?? Pin
Kiran Satish6-May-08 6:59
Kiran Satish6-May-08 6:59 
GeneralRe: Alternative for TIMERs in MFC?? Pin
JudyL_MD7-May-08 3:07
JudyL_MD7-May-08 3:07 
GeneralRe: Alternative for TIMERs in MFC?? Pin
Kiran Satish7-May-08 4:59
Kiran Satish7-May-08 4:59 
AnswerRe: Alternative for TIMERs in MFC?? Pin
Jeremy Thornton6-May-08 15:15
Jeremy Thornton6-May-08 15:15 
QuestionDetermining if an drang'n'drop event is active Pin
tibiz6-May-08 5:20
tibiz6-May-08 5:20 
QuestionCopy files with out using SHFileOperation Pin
itsh116-May-08 5:11
itsh116-May-08 5:11 
AnswerRe: Copy files with out using SHFileOperation Pin
Rajkumar R6-May-08 5:29
Rajkumar R6-May-08 5:29 

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.