|
What about CDC::GetCurrentFont [^] and then CFont::GetLogFont [^]?
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]
|
|
|
|
|
thanks it worked for me actually i want to set this perticualr font that why i needed that..
thank uy
|
|
|
|
|
So, your question is kinda opposite to the one you asked!
Here you go:
CFont fMyFont (.....);
CFont *fOld = pDC->SelectObject (&fMyFont);
pDC->DrawTest (...);
pDC->SelectObject (&fOld);
"..."'s left as an exercise for the reader.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Iain Clarke wrote: So, your question is kinda opposite to the one you asked!
Do people really do that?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hallo,
I have heard that in vs 6 has a tool by which i can see the code of a .DLL. Is it correct? Is there any other procedure, by which i can see the code of a dll?
|
|
|
|
|
Yes, with CPDMMRU* superpowers (or possibly asking for the DLL 's source code to the author).
(*) C odeP roject D ll's M aker M ind R eader U nit.
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]
|
|
|
|
|
Shaheen.India wrote: which i can see the code of a .DLL
Do you want to find dependency??
Or you want IDL file ??
Regards,
Sandip.
|
|
|
|
|
SandipG wrote: Or you want IDL file ??
If there is one.
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: If there is one.
Yes.
Regards,
Sandip.
|
|
|
|
|
Shaheen.India wrote: I have heard that in vs 6 has a tool by which i can see the code of a .DLL. Is it correct?
Who told this? I would like to meet him/her. May be the tool is hidden and nobody has ever discovered it.
Shaheen.India wrote: Is it correct
No.
Shaheen.India wrote: Is there any other procedure, by which i can see the code of a dll?
Buy/Beg for the source code.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Is it possible to truncate a file from its beginning?
Thank you masters!
|
|
|
|
|
No API to do this.
You will have to create a temporary file, copy the required contents, delete the original file and rename the temporary file.
Truncation at the end can be done using SetEndOfFile .
«_Superman_»
|
|
|
|
|
What about opening it as "always create new"?
- ns ami -
|
|
|
|
|
To display Ω i Message Box i m using Following code
CString str(_T("\x0x3A9"));
MessageBox(str);
And For Unicode Enable i am following these steps
Step 1: To Unicode enable a project in VC++: in the VC++ IDE, navigate to Project->Settings->C++, in the Preprocessor definitions section, insert WIN32,_DEBUG,_WINDOWS,_AFXDLL,_UNICODE, as normal MFC uses WIN32,_DEBUG,_WINDOWS,_AFXDLL,_MBCS.
Step 2: Navigate to the Link tab and select Output in the drop down list in the Category section, and specify wWinMainCRTStartup as the entry point for the program, in the Entry-point symbol edit box.
But After performing 2nd Step when i run project it show following error
Linking...
msvcrtd.lib(wcrtexew.obj) : error LNK2001: unresolved external symbol _wWinMain@16
Debug/Unicode_Dialog.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Plz help if anyone have solution for this.
|
|
|
|
|
To make the project Unicode enabled, navigate to Project->Settings->General and make the Character Set value as Use Unicode Character Set .
And then change your code to -
CString str;
str.Format(L"%c", 0x3A9);
MessageBox(str);
«_Superman_»
modified on Friday, January 30, 2009 2:58 AM
|
|
|
|
|
«_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.
|
|
|
|