Yes! I've tried using it sometime back, but then lost interested after realising that it is not worth all the efforts. Not to mention how difficult it was while the function signatures had to be changed.
I have 2 dialog boxes. One for writing into a file and other for reading from the file. I am using 2 threads. One WriteThread and one ReadThread.
When i run the application , i am not able to access the 2 dialogs synchronously.When the second dialog is displayed, i am not able to access the first dialog. Means after displaying the second dialog, i have to close it to get the first dialog.
I think the problem may be in the design of your application. Dialogs should be used as short lived windows, to give information to the user, or to get parameters or other information from the user. If you need to have two dialogs active at the same time than you are really heading for trouble. I would take a look at your design and think through what you are trying to achieve.
I do a lot of cleanup of old code, and I can tell you that parentheses could have avoided some of the bugs I find. Even if not strictly required for correct grouping, using parentheses makes clear the coder's intent, and so eliminates potential misunderstandings by Those Who Come After.
this works for most cases, however I'm stuck when using stringstreams - I often manipulate strings with them and get the result using stringstream::str() - but of course that wont work if I'm using my tstrings because there's no appropriate conversion available. I guess my questions here are, A) is the above snippet the best way to do it, B) is there already a tstring defined somewhere that I may have missed, and C) how do I get stringstream::str() to return an encoding-independant string?
In addition to Cedric's answer - I'd be tempted to insert the typedef's into the std namespace, to make ADL (aka Koenig Lookup) work more smoothly. Oh - and you can use TCHAR to remove the conditional compilation:
thanks for the help guys. So basically I need to do that for std::string, std::ostream, std::istream, std::iostream, std::istringstream, std::ostringstream, std::stringstream, std::ifstream, std::ofstream, std::fstream, std::filebuf, std::ios, std::streambuf, std::streampos, and std::stringbuf?
That's seems like a bit of work, so I'm kinda surprised that a header such as tchar.h even exists without encoding-independent versions of the above
but when i use VariantChangeTypeit doesn't compile([BCC32 Error] test.cpp(7076): E2034 Impossible to convert 'const Variant *' to 'tagVARIANT *'
OnEvent(const Variant &toto)
//I want to put the contained of toto in my string titi
VariantChangeType(&toto, &toto, VARIANT_NOUSEROVERRIDE, VT_BSTR);
I came across an peculiar scenario and had to use TerminateThread inevitably (i hate TerminateThread and ExitThread). but when i call TerminateThread on my thread handle it returns error code 183 (ERROR_ALREADY_EXISTS) what is this means?
Last Visit: 31-Dec-99 18:00 Last Update: 27-Sep-23 14:43