|
«_Superman_» wrote: str.Format(L"%c", 0x3A9);
Read this thread..Displaying Symbol issue[^]
I think toxcct is not around today
Regards,
Sandip.
|
|
|
|
|
SandipG wrote: I think toxcct is not around today
...thankfully...[^]
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]
|
|
|
|
|
thanksfully, I had already given a working piece of code, which would have worked no matter unicode is enabled or not, and the OP would not be annoyed with his main :p
|
|
|
|
|
Your code doesn't compile, as it stands: you should at least include a pair of header files
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]
|
|
|
|
|
obviously, but you're not trying to go on the road with me, so why should I argue on this anymore ?
|
|
|
|
|
Don't be upset. I was just kidding.
toxcct wrote: but you're not trying to go on the road with me
I miei amici ti hanno dato la mano,
li accompagno, il loro viaggio porta un po' più lontano
(F. De André )
(cheap translation: 'my friends said goodbye to you, I'm going to travel with them since their destination is further than yours')
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]
|
|
|
|
|
CPallini wrote: Don't be upset. I was just kidding
ok
CPallini wrote: 'my friends said goodbye to you, I'm going to travel with them since their destination is further than yours'
so why should I take this ?
OT:
Carlo, sincerely, I have to tell you that I don't like how things have gone between us. I'm really sorry if I was too harsh and if you felt attacked last time we argued of this topic.
The thing is, I really trust that we, MVP, are not only there to give the first answer, but the best. When someone is asking for help, I'm doing my best to understand beyond the question what the OP is trying to do. That's why I don't automatically give a solution that would work, but which I think is not optimal.
I think you can understand this.
Sorry again for everything.
|
|
|
|
|
toxcct wrote: OT:
Carlo, sincerely, I have to tell you that I don't like how things have gone between us. I'm really sorry if I was too harsh and if you felt attacked last time we argued of this topic.
The thing is, I really trust that we, MVP, are not only there to give the first answer, but the best. When someone is asking for help, I'm doing my best to understand beyond the question what the OP is trying to do. That's why I don't automatically give a solution that would work, but which I think is not optimal.
I think you can understand this.
Sorry again for everything.
Don't worry, pal. I think anyone helps as he can or wish (this is possibly the 'philosophical' distance between us). I'm sorry if my humour was silly (as it probably was, I just can't resist).
The OP question shows that indeed you were right 'the last time'.
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]
|
|
|
|
|
I am, but tired of repeating myself again and again...
he should use _tmain() , CStringW and MessageBoxW() and no matter about the compiler config, but I believe you don't think the same, right ?
modified on Friday, January 30, 2009 8:08 AM
|
|
|
|
|
«_Superman_» wrote: str.Format(L"%c", 0x3A9);
this code is not very well designed, because it would not compile without UNICODE defined.
|
|
|
|
|
You're right. It would not compile without UNICODE defined.
Now why would you ever not want UNICODE defined?
«_Superman_»
|
|
|
|
|
«_Superman_» wrote: Now why would you ever not want UNICODE defined?
well, why not ? lol
seriously, I can't think of a good reason right now, but if it were never useful, why would this compilation mode still exist ?!
anyway, you can never predict what the others will do, so writing a "compiling-at-anytime" code is still prefered...
|
|
|
|
|
Initially I only used ASCII character sets.
A little later I started using the macros (_T, _tcs etc.) with the realization that people could compile this with and without UNICODE defined.
That went on for some years. But I never heard of anyone not defining UNICODE.
So now I only use L"" and the _w versions for the functions.
So probably the terminator will not have the option to not define UNICODE
Just as it is in Windows CE.
«_Superman_»
|
|
|
|
|
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">
CStringW str = L<font color="gray">"\x03A9"</font>;
MessageBoxW(str);
}
Is that much clear for you now ?
|
|
|
|
|
using code
CStringW str=L"\x0349";
MessageBoxW(str);
complier Gives error that CStringW is undeclared identifier.
|
|
|
|
|
you have to include the correct headers (and make sure you're within a MFC Project)
|
|
|
|
|
Hi...
I am designing a Switch Board Panel using MFC ActiveX Control , in that I want
to add more number of Switch like Gif images .
I am able to add One Particular Gif image more number of times but I actually
want to add different Gif images to that ActiveX Controls......
So Please give me a solution.....
Regards,
Bala
|
|
|
|
|
I created one file suppose "abc.txt". I denied all access to all the users and groups for that file. (I did it by going to Security tab of property dialog of that file.). When I programmatically try to open this file by using API NtOpenFile() with access mask READ_CONTROL in user mode it succeeds. In this case I am opening the file in the user context who is creator owner of that file.
When I try to open the file in the context of other user who is not creator of that file NtOpenFile() fails with error "Access Denied". It may fails due to that user doesn’t have permissions.
Now when I try to open same file in native mode, NtOpenFile() fails with error "Access Denied". What will be the reason? How I can access the file having all permissions denied to all users in native mode?
Can anybody tell who is the user in native mode? Is it System?
|
|
|
|
|
I'm a little confused by the question - the user will be the same one as started the program running, whichever mode you're in.
If your native code is running under your used credentials, it will have your access rights. And as you've set it to "all permissions denied to all users", then not many people can look...
I may have misunderstood, because it looms like you already answered your own question.
Services run under a different user, and drivers run in a different security context again, but that's not what you describe (or what I read!)
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
|
D'oh - I knew that...
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi everyone,
I am trying to implement message Queue using ACE framework. Trying to learn that concept from "C++ Network Programming, Volume 2: Systematic Reuse with ACE and Frameworks" book. But not getting head and tail of it.
Could anyone Please give me the important functions/class that will be enough to implement msg queue.
Thank you in advance
I am a learner Always
|
|
|
|
|
|
Hi All,
I am using DeviceIoControl() with control code FSCTL_GET_VOLUME_BITMAP to get the Bitmap of file system.
But the funtion is returning FALSE and GetLastError() is 1 (Incorrect function).
What might be the problem?
code is here:
STARTING_LCN_INPUT_BUFFER StartingLCN;
VOLUME_BITMAP_BUFFER *Bitmap = NULL;
ULONGLONG BitmapSize;
DWORD BytesReturned;
BOOL Result;
StartingLCN.StartingLcn.QuadPart = 0;
BitmapSize = sizeof (VOLUME_BITMAP_BUFFER)*512;
Bitmap = (VOLUME_BITMAP_BUFFER *) malloc (BitmapSize);
Result = DeviceIoControl
(
hHandle,
FSCTL_GET_VOLUME_BITMAP,
&StartingLCN,
sizeof (StartingLCN),
Bitmap,
BitmapSize,
&BytesReturned,
NULL
);
int nError=GetLastError();
if (Result == FALSE && GetLastError () != ERROR_MORE_DATA)
{
free (Bitmap);
return FALSE;
}
|
|
|
|
|
Hai!
In my application there is a dialog containing various controls like 3 buttons, 2 Radio buttons etc.
How can i specify a Tab order for them i.e when i first press Tab on keyboard the 1st button in my dialog must be highlighted, when i again press "Tab" on keyboard 2nd button must be highlighted, How to implement this and how to specify the order?
Thanks!
|
|
|
|