Type: Posts; User: ovidiucucu
Search took 0.15 seconds.
March 27th, 2015, 02:32 PM
A: 99.999% yes, is a problem of improperly handling of CString
You can simply reproduce this behavior writing the following simple code:
CString* pString = new CString(_T("Geo luvs...
March 21st, 2015, 04:17 AM
A little bit aside: in which path runs your application?
March 20th, 2015, 12:16 PM
Just a hint:
The Japanese codepage 932, maps the same ASCII code (0x5C) to backslash and Yen Sign (¥).
See Code page 932and Windows Codepage: 932 (Japanese Shift-JIS) for more details.
March 20th, 2015, 10:30 AM
A programmer must never say "certainly" before testing.
AfxMessageBox(_T("There was an old man of Five Rocks"));
March 20th, 2015, 09:47 AM
Another reason why I said "I would like to use the first solution" is to avoid shuffling lambda calls in worker threads. I'm not sure if that matters but who knows... anytime a mighty architect may...
March 20th, 2015, 04:14 AM
Indeed, the solution from previous example is not thread safe.
So, to prevent calling CSomeApplication::PostLambda from a thread, other than main application's thread, we can simply use an ASSERT.
March 19th, 2015, 11:41 AM
To make possible multiple asynchronous lambda calls in the same message handler, one solution is to store them in a list.
These having been said, my example from post #14 can be improved a little...
March 19th, 2015, 08:47 AM
But if someone is a good developer and not only a good architect (:)), has no sweat to put an '=' sign in lambda capture list, instead of shooting a burst in the message queue, from a single...
March 19th, 2015, 08:06 AM
I would like to suggest the following: instead of try handling OnCLick event in a HTML element, which may be pretty complicated, handle BeforeNavigate2 event in Web control, which is easy. Especial...
March 19th, 2015, 05:29 AM
MFC does not use multiple inheritance and it's good to also use simple inheritance when write MFC applications.
It has no much sense to derive both from CWnd (which keeps a window) and and a class...
March 18th, 2015, 04:52 PM
Right, and I knew that. Although it's hard to believe that somebody can have the idea to write something like that (I discovered it just doing tests to find a solution), let's think like an "good...
March 18th, 2015, 04:33 PM
Beside what VictorN and GCDEF already answered.
Fortunately, the newer compilers give a good hint about the forgotten semicolons.
However, if it's still not clear at a first look, there's no...
March 18th, 2015, 03:44 PM
However, the actual parameters can only (sic :)) serve to make a class member function behave 'differently', as well.
March 18th, 2015, 03:10 PM
That's the reason why I made the capture by value. NO need to be a rocket scientist in order to know what happens with local variables when go out of scope. ;)
March 17th, 2015, 01:00 PM
Probably there are also other problems as long as we are trying to break the oldest but goodest "classic" way.
Still digging and having fun... :)
March 17th, 2015, 09:36 AM
// Usually a class containing many small methods is more reliable than one with fewer but big methods. :)
Well, let me try to improve a little bit my previous example.
As I said above, conversion...
March 16th, 2015, 07:48 AM
Have a look with a little bit more attention at _spawnl, _wspawnl documentation.
March 16th, 2015, 03:33 AM
In Visual Studio 2012 or newer, the stateless lambdas (with no lambda-capture) are convertible to function pointers.
See Lambdas section in the following article: Support For C++11 Features.
March 16th, 2015, 01:34 AM
Are you also looking for already made detailed implementation design, unit and functional tests?
Probably, all can be found for free... in a parallel world. :)
March 9th, 2015, 12:30 AM
Finally. someone discovered the cross-platform C/C++ InputBox, after about ten years of research. :)
Please let old threads rest in peace!
March 8th, 2015, 01:00 PM
That's normal, a button does not look in Windows 1.0 the same as in Windows 2000. :)
Moreover, in newer Windows versions may look different if a different theme is set.
However, if you want to...
March 7th, 2015, 02:15 AM
...and also it takes care of programmer. If the programmer tries to attach a handle while the CBitmap object already contains a valid one, it gives an ASSERT to avoid further resource leaks.
March 7th, 2015, 01:59 AM
That's one reason why MFC has been invented. :)
February 25th, 2015, 12:01 PM
Some functions may be deprecated in newer OS versions, some other ones may be not supported by older OS versions. And, some functions may have other behavior on different OS versions. And, your...
February 19th, 2015, 08:58 PM
One nice additional note:
Japanese code page 932 maps the same code (0x5C) for backslash and Yen sign.
That was a source of troubles in a legacy application, when dealing with file paths.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.