Prev: Finding Memory Leaks
Next: How to [transparently] render html over existing background using IWebBrowser2?
From: hellokareem on 28 Apr 2010 03:19 I am really sorry for this misunderstanding actually I need only selection, not open.. ( has to be shown where is the rendered out put is. so need to be opened that folder and select that file).
From: Tom Serface on 28 Apr 2010 07:28 Ah, that makes sense. Sorry for my misunderstanding. Yes, you are right, the CFileDialog would not be useful for that :o) Tom "hellokareem" <kareem.tk(a)gmail.com> wrote in message news:e2a9d3d1-28e3-4ddb-9346-80cbb2d6fd5a(a)u20g2000pru.googlegroups.com... > I am really sorry for this misunderstanding > actually I need only selection, not open.. > ( has to be shown where is the rendered out put is. so need to be > opened that folder and select that file).
From: Joseph M. Newcomer on 30 Apr 2010 13:24 As an example, the SAPI code is among the worst-written code Microsoft delivers; in Unicode, it completely fails to compile. THey call 8-bit string functions. If the strings implicitly became Unicode, this code would break. Wait. It's already broken. I think an option to make all string literals "compiled according to option" to be not unreasonable, as long as we have some styntax that can always override the default, e.g., A"abc" is always an ANSI (horrible name, that!) 8-bit string, and L"abc" is ALWAYS a Unicode string, and an undecorated string works as if it is _T(). Life WOULD be a lot simpler. joe On Mon, 26 Apr 2010 19:54:31 -0500, "Tom Serface" <tom(a)camaswood.com> wrote: >Yes. I brought that up a few times since C# "only" does Unicode except for >reading and writing files, but apparently it's too ingrained in legacy C++ >code. So I suggested a switch, like we have for so many other things. I'm >sure it would break a lot of MFC classes though, so I'm not holding out any >hope. > >Tom > >"Hector Santos" <sant9442(a)nospam.gmail.com> wrote in message >news:O404NKa5KHA.1424(a)TK2MSFTNGP04.phx.gbl... >> L"Here's a thought - Why need it at all? :)" >> >> Tom Serface wrote: >> >>> I use the L"" version all the time now since I never want to go back to >>> ANSI and it is much easier to type. I wish there was a compile switch >>> that just assumed all strings were Unicode unless specified to be ANSI. >>> I know... it would break someone's program :o) >> >> >>> >>> Tom >>> >>> "Giovanni Dicanio" <giovanniDOTdicanio(a)REMOVEMEgmail.com> wrote in >>> message news:OoWrdKV5KHA.1888(a)TK2MSFTNGP05.phx.gbl... >>>> "Mikel" <mikel.luri(a)gmail.com> wrote: >>>> >>>>>> CString file=L"/select,"; >>>>>> file= file + _mFilePath >>>>>> ShellExecute(NULL,L"open",L"explorer",file,NULL,SW_SHOWNORMAL); >>>> [...] >>>>> However, I would like to point out one thing about your code: if you >>>>> are using CString and ShellExecute, and not CStringW and >>>>> ShellExecuteW, you should type _T("open") and not L"open". Otherwise, >>>>> you are passing Unicode strings to generic-text functions, which is >>>>> working now because you have defined UNICODE and _UNICODE, but is not >>>>> right, and can lead to problems. >>>> >>>> I think in these days is just fine to use Unicode-only string literals >>>> (i.e. those with L"..." decoration) instead of generic text (i.e. >>>> _T("...")), without specifying the 'W' suffix. >>>> I mean, I think that: >>>> >>>> ShellExecute(..., L"open", L"explorer", ...) >>>> >>>> is just fine, and I don't like uglifying the code with ShellExecuteW... >>>> >>>> I agree with what you wrote only if you have to maintain *both* ANSI and >>>> Unicode builds. >>>> (Note also that modern Win32 APIs tend to be Unicode only.) >>>> >>>> My 2 cents, >>>> Giovanni >>>> >>>> >> >> >> >> -- >> HLS Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
First
|
Prev
|
Pages: 1 2 3 Prev: Finding Memory Leaks Next: How to [transparently] render html over existing background using IWebBrowser2? |