|
Check the encoding used in file.
|
|
|
|
|
As already suggested by Rejeesh.T.S if your text file contains wide characters and your application doesn't use the UNICODE charset then the output posted is the expected result.
Hence either make a UNICODE build or use MFC/ATL conversion macros in you project.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You're probably not using a UNICODE build.
You could either change Project -> Properties -> Configuration Properties -> General -> Character Set to Use Unicode Character Set or try using CStringW and MessageBoxW .
|
|
|
|
|
Is there any way to bold a part of string.
like , this is bold
|
|
|
|
|
To keep this info along with the text, better is to go for Rich Text Format (RTF).
|
|
|
|
|
please give any example to use with MFC
|
|
|
|
|
Open wordpad, type some thing as you shown, save it as .rtf, open it in notepad and see the format. Its an example for format of rich text. Rich edit control in windows uses the same format to set and retrieve rich text. see CRichEditCtrl::StreamOut, as an example, try it
|
|
|
|
|
That really depends on how you display your string. A string doesn't contain any visual information, it is just a sequence of characters. The way you draw this string determine how it will be displayed. If you don't provide any more information about how this string is displayed (is it drawn using CDC::DrawString, part of an edit control, ...) we won't be able to help you much.
|
|
|
|
|
Hi,
I have created a application with 3 views in a child view of mainframe.
Around the child view, a thick line has been drawn, how to remove it?
|
|
|
|
|
How did you create the child view and the 3 views inside it?
Please post some relevant code.
Is the line drawn around each of the 3 views or around the child view?
|
|
|
|
|
Hi all,
i m using MCIWndPlay to play sound file.
when i m execute the command MCIWndPlay,its increase the threads counter but in diffrent manner,some time its generate 1 thread or some time 10 or any other number.
is there any method to generate only one thread when i play any sound file.
please help me for this.
thanks in advance.
|
|
|
|
|
how to create save first frame of wmv file
|
|
|
|
|
Lots of tips here[^].
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
how to create thumbnail from wmv file using vc++
|
|
|
|
|
|
Hello guys.
I want to remove directory using RemoveDirectory("directory path"). I delete the directory using recursion.
The problem is, it's working fine in Win 7, but, in winXP it's not deleting the top-most directory:
In Win 7: RemoveDirectory("c:\MyFolder\Folder")--> it's deleting "Folder" including everything inside it.
In Win XP: RemoveDirectory("c:\MyFolder\Folder")--> "Folder" is not deleted, but all files and folders inside it are deleted.
The program is made in VS 2008 MFC, OS is Win 7.
Thanks!
|
|
|
|
|
Did you watch the return value of RemoveDirectory? Did you call GetLastError on zero? Might your top-level directory have a different protection?
|
|
|
|
|
Hi, I want to check that all fields of a dialog are completed correctly by the user and to flag any controls that need attention. The only way that I can see of doing this is to create a transparent read-only edit box next to the dialog control in error. Then if the control needs attention, I can write an asterisk character to the associated edit box. Although this works, it would be more noticeable if the asterisk had a foreground colour other than black (e.g. red). I can't see any way of doing this, or is there a better method of achieving a similar result ? Any suggestions/advice welcomed !
Doug
|
|
|
|
|
you could display anything you like, e.g. a little red icon, and give it a tooltip showing some explanation when hovered.
Have a look here[^] to see what the .NET Framework provides.
|
|
|
|
|
Hi Luc, I don't have any experience with .NET or C#. I am using MFC and am wondering if there is anything I can use without involving a steep learning curve. Thanks in advance for your advice.
Doug
|
|
|
|
|
I'm not saying you need .NET or C#, just suggesting you could show something on your form, like a small icon, and give it a tooltip-like behavior. I'm sure that can be done easily in MFC; I'm not sure I ever knew how though, as I don't use pre-.NET technologies.
|
|
|
|
|
No problem, Luc ! I really must devote some time in the future to looking at .NET - it clearly does offer a lot. But at the moment, I still haven't REALLY mastered the basics ! Thanks for your help, nevertheless.
Doug
|
|
|
|
|
There's an excellent control XBalloonMsg that can give you a balloon on the field in error. I use it all the time and it's easy to invoke.
Find the article here[^]
A simple one liner creates a balloon error message.
CXBalloonMsg::Show("Failed", "Create Failed, Web Site may be Offline, Try again Later", GetDlgItem(IDC_CreateNewBeta)->GetSafeHwnd(), GetSafeHwnd());
<pre>
|
|
|
|
|
Hi Chuck,
Fantastic ! I've just had a quick look, and I think that it is JUST what I'm looking for ! Thank you very much for your help !
Doug
|
|
|
|
|
Hi again Chuck,
I have downloaded the demo project and tried to compile it.
However, I am getting the following errors:-
Compiling...
XBalloonMsg.cpp
d:\programming projects\xballoonmsg\src\xballoonmsg.h(48) : error C2065: 'TTI_INFO' : undeclared identifier
d:\programming projects\xballoonmsg\src\xballoonmsg.cpp(433) : error C2065: 'TTS_CLOSE' : undeclared identifier
d:\programming projects\xballoonmsg\src\xballoonmsg.cpp(433) : error C2065: 'TTS_NOFADE' : undeclared identifier
d:\programming projects\xballoonmsg\src\xballoonmsg.cpp(433) : error C2065: 'TTS_NOANIMATE' : undeclared identifier
d:\programming projects\xballoonmsg\src\xballoonmsg.cpp(436) : error C2065: 'TTS_BALLOON' : undeclared identifier
d:\programming projects\xballoonmsg\src\xballoonmsg.cpp(480) : error C2065: 'TTM_SETTITLE' : undeclared identifier
d:\programming projects\xballoonmsg\src\xballoonmsg.cpp(508) : error C2664: 'SetTimer' : cannot convert parameter 4 from 'void (__stdcall *)(struct HWND__ *,unsigned int,unsigned long,unsigned long)' to 'void (__stdcall *)(struct HWND__ *,unsigned i
nt,unsigned int,unsigned long)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
d:\programming projects\xballoonmsg\src\xballoonmsg.cpp(524) : error C2065: 'WM_MENUCOMMAND' : undeclared identifier
d:\programming projects\xballoonmsg\src\xballoonmsg.cpp(524) : error C2051: case expression not constant
Error executing cl.exe.
A Goggle search points me to MSDN, and I find that defines such as TTS_CLOSE are (supposedly) contained within CommCtrl.h - #including this within the relevant .cpp doesn't resolve the errors. Having found CommCtrl.h there is no mention of TTS_anything.
What header file is required and where can I get it ?
Thanks for your help
Doug
|
|
|
|