|
The stack overflow message doesn't appear but the new date doesn't get set.
CB
|
|
|
|
|
After SetLocalTime() is called, how many times does OnBnClickedButtonSet() get called?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Only one time..The user inputs the day, month and year and/or time and then presses on Set button which calls SetLocalTime().
|
|
|
|
|
Yes,I know... I was thinking that maybe SetLocalTime() calles a hidden WM_something that gives the recursion issue? Do you know if this could be the case? I couldn't find anything by searching on google or reading the function description on microsoft help page...
|
|
|
|
|
corina.beer wrote: Do you know if this could be the case? Set a breakpoint and find out.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
The problem was calling a delete function on a timer in my base class... I have removed that function and Set button works all the time. If I put the function back on timer, the stack overflow message shows up again.
Thanks everyone for your suggestions.
CB
|
|
|
|
|
This just about points to passing bad data to SetLocalTime(), any way you can check it prior to sending it to SetLocalTime()?
Are you sure m_Time.GetTime(&new_time) is returning a valid time every time (keep in mind the debugger will initialize uninitialized data but this won't be the case in the release version)?
|
|
|
|
|
Thanks.
Stack overflow happens in release mode as well.
Yes, I was thinking of that too. I checked with a breakpoint and all the values for time were all right - no weird looking data...I will run in in Debug and put a TRACE with all the time values to make sure. Also maybe calling UpdateData before SetLocalTime might help? ...I will try that too.
|
|
|
|
|
corina.beer wrote: I checked with a breakpoint and all the values for time were all right - no weird looking data...I will run in in Debug and put a TRACE
You can't break and look at values on a release version (data will be bogus).
|
|
|
|
|
Albert Holguin wrote: You can't break and look at values on a release version Are you sure? I've debugged a release build before. All it needed was the PDB file.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Not completely sure... I know you can break, but the values it shows you won't always be accurate (at least that's what I've found). So I don't do it at all anymore... I only use breaks in debug builds.
|
|
|
|
|
There is OutputDebugString() function I can use to display the values in Release mode. I will try it...
|
|
|
|
|
Helloo..
Help me plz............
I have two different applications (SDI).
I want to call the second application from the button click of the first (without calling the EXE).
Let me know how I can call?????
|
|
|
|
|
sachanratnesh wrote: without calling the EXE Then you need to convert it to a DLL, or a COM server.
Veni, vidi, abiit domum
|
|
|
|
|
thanks for your reply..
if i dont want to use the DLL or COM as well as the EXE, is there is any other way to execute the application???
as we know that application will open by calling the "CreateWindow" and "ShowWindow" function.
can we call such function from another application??????????
|
|
|
|
|
sachanratnesh wrote: can we call such function from another application Short answer: No. Longer answer: You can use the CreateProcess [^] function, but that seems not to be what you want. Perhaps you could explain in better detail exactly what you are trying to do.
sachanratnesh wrote: ?????????? A single question mark is sufficient.
Veni, vidi, abiit domum
|
|
|
|
|
I am using VC++/C++ in my product, in which i want to add one functionality (Picture Viewer).
Which I got from NET, shown in the following link.
http://www.codeproject.com/Articles/5065/Thumbnails-viewer-and-image-processing-using-GDI-a
Now I want to add this functionality in my product (simply when user clicks the button).
|
|
|
|
|
Then you need to take the source code from the article and modify it to your needs.
Veni, vidi, abiit domum
|
|
|
|
|
I am with Richard - He forgot to mention that you could also make it a static library (*.lib).
In other news:
A Java backend, Windows Service or RESTful API would probably do the job, too - You get the idea.
|
|
|
|
|
thanks for your reply..
if i dont want to use the DLL or COM as well as the EXE, is there is any other way to execute the application???
as we know that application will open by calling the "CreateWindow" and "ShowWindow" function.
can we call such function from another application??????????
|
|
|
|
|
|
Marco Bertschi wrote: He forgot to mention that you could also make it a static library No, I deliberately did not mention it since very few people seem to understand that such a thing exists, even though in practically every case, it would be more efficient than a DLL.
Veni, vidi, abiit domum
|
|
|
|
|
Alright, I didn't want to accuse you of anything wrong - I think it is easier to use, and, in most cases it is faster.
|
|
|
|
|
Marco Bertschi wrote: I didn't want to accuse you of anything wrong You didn't; I was just explaining why I only suggested a DLL - but I may also suggest .LIB in future.
Veni, vidi, abiit domum
|
|
|
|
|
+1
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|