Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: display Ω sign problem.. Pin
toxcct30-Jan-09 2:43
toxcct30-Jan-09 2:43 
GeneralRe: display Ω sign problem.. Pin
CPallini30-Jan-09 3:05
mveCPallini30-Jan-09 3:05 
GeneralRe: display Ω sign problem.. Pin
toxcct30-Jan-09 1:51
toxcct30-Jan-09 1:51 
GeneralRe: display Ω sign problem.. Pin
toxcct30-Jan-09 2:07
toxcct30-Jan-09 2:07 
GeneralRe: display Ω sign problem.. Pin
«_Superman_»30-Jan-09 2:44
professional«_Superman_»30-Jan-09 2:44 
GeneralRe: display Ω sign problem.. Pin
toxcct30-Jan-09 2:48
toxcct30-Jan-09 2:48 
GeneralRe: display Ω sign problem.. Pin
«_Superman_»30-Jan-09 2:55
professional«_Superman_»30-Jan-09 2:55 
AnswerRe: display Ω sign problem.. Pin
toxcct30-Jan-09 2:04
toxcct30-Jan-09 2:04 
Let me try to make the things clear to you (obviously, it is not).

you want the character Omega( Ω ), which is a Unicode character. So if you want to store it in a string, you must allocate a Unicode String.
To do this, you are not obliged to have your whole project building in Unicode (with UNICODE and _UNICODE macros defined).

If you want to have a code that is dependant of the compilation mode (that mean, a code which you don't need to change anything to switch from Unicode to Ansi Build and vice versa), then you should use Generic Text Mappings (_T() macro, and such).
Using CString, _T() and MessageBox() is good most of the time, but here, this is not what you'd want exactly.

As you need a Unicode String, you have to use CStringW, and a literal string written with a prepended L (L"\x03A9").
And as MessageBox() gets a CString (and not a CStringW), you have to adapt the call by using MessageBoxW() instead.

<font color="blue">void</font> main(<font color="blue">void</font>) {    <font color="green">//or _tmain()</font>
    CStringW str = L<font color="gray">"\x03A9"</font>;
    MessageBoxW(str);
}



Is that much clear for you now ?


GeneralRe: display Ω sign problem.. Pin
shaina223130-Jan-09 16:44
shaina223130-Jan-09 16:44 
GeneralRe: display Ω sign problem.. Pin
toxcct31-Jan-09 0:55
toxcct31-Jan-09 0:55 
QuestionHow to add more than one Gif Images in MFC ActiveX Control? Pin
ursbala29-Jan-09 19:44
ursbala29-Jan-09 19:44 
QuestionProblem with NtopenFile Api in native application Pin
Member 342050929-Jan-09 19:32
Member 342050929-Jan-09 19:32 
AnswerRe: Problem with NtopenFile Api in native application Pin
Iain Clarke, Warrior Programmer30-Jan-09 0:13
Iain Clarke, Warrior Programmer30-Jan-09 0:13 
GeneralRe: Problem with NtopenFile Api in native application Pin
Stuart Dootson30-Jan-09 3:46
professionalStuart Dootson30-Jan-09 3:46 
GeneralRe: Problem with NtopenFile Api in native application Pin
Iain Clarke, Warrior Programmer30-Jan-09 8:54
Iain Clarke, Warrior Programmer30-Jan-09 8:54 
QuestionACE framework Pin
hrishiS29-Jan-09 19:28
hrishiS29-Jan-09 19:28 
AnswerRe: ACE framework Pin
Cosmic Egg30-Jan-09 10:01
Cosmic Egg30-Jan-09 10:01 
QuestionProblem with DeviceIoControl() Pin
john563229-Jan-09 19:13
john563229-Jan-09 19:13 
QuestionHow to implement Tab order to the controls in a MFC Dialog box Pin
kapardhi29-Jan-09 18:55
kapardhi29-Jan-09 18:55 
AnswerRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Naveen29-Jan-09 18:59
Naveen29-Jan-09 18:59 
GeneralRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nahida HK12-Jul-16 22:29
Nahida HK12-Jul-16 22:29 
AnswerRe: How to implement Tab order to the controls in a MFC Dialog box Pin
ATM@CodeProject29-Jan-09 19:01
ATM@CodeProject29-Jan-09 19:01 
AnswerRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nishad S29-Jan-09 19:05
Nishad S29-Jan-09 19:05 
QuestionRe: How to implement Tab order to the controls in a MFC Dialog box Pin
AJ8326-Apr-11 22:02
AJ8326-Apr-11 22:02 
AnswerRe: How to implement Tab order to the controls in a MFC Dialog box Pin
Nishad S26-Apr-11 22:24
Nishad S26-Apr-11 22:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.