|
Ah...CWindow...that calls for a change of plans...try this instead:
LOGFONT logFont;
GetObject(wnd.GetFont(), sizeof(LOGFONT), &logFont);
...change the logfont as needed...
HFONT NewFont = CreateFontIndirect(&logFont);
wnd.SetFont(NewFont, TRUE);
Don't forget to DeleteObject NewFont once you are not using it anymore. Does this work?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Sorry Code-o-mat but the problem exist always and that make me crazy
|
|
|
|
|
Ah, you allowed yourself to be fooled into thinking the question was about fonts when actually it was about working with a Web Browser control. Now what?
|
|
|
|
|
No, i had trying much time with this but the problem is still until this control is related to OS.So for that reason i would know how can i modify the font of system in my source code.
|
|
|
|
|
I let shame eat up my soul, get addicted to antidepressants and jump from the north bridge into the datastreams.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
So, there is no idea !!!!
thanks for all
|
|
|
|
|
So this[^] failed too?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
yes, it has always the font of system
|
|
|
|
|
I am trying to use a static library that, although it is meant to be for VC8 produces the following error when build the suppliers sample application:
Linking...<br />
fatal error C1900: Il mismatch between 'P1' version '20060201' and 'P2' version '20050411'<br />
LINK : fatal error LNK1257: code generation failed
I don't have the source for this library, any suggestions?
|
|
|
|
|
Looks like it can be related to Service Packs or even Visual Studio Installation problem that might require a re-installation.
see here[^]
|
|
|
|
|
The dates are one day apart and the package versions are the same, good idea though.
Thanks.
|
|
|
|
|
This[^] gives a possible cause, the static library is built with the /GL switch so no linking is done when the librry itself is built, only when the library is linked into the project.
All I have to do is get the library rebuilt without '/GL' and see if it works.
|
|
|
|
|
Ah, thanks for posting that. I had never run across this problem before.
|
|
|
|
|
I'm hoping I'm just being dumb, and someone will point out the command I've missed...
I'm trying to draw a shape onto a DC using GDI+. I can change alphablends, colours, line thicknesses, etc, (see my http://www.codeproject.com/KB/miscctrl/generic_picker.aspx[^] article for drawing examples).
But what I can't work out how to do is to make an "invert" brush / pen.
Ideally, I'd like to blend a colour with an inverse of the below colour, but just plain inverting the original colour is good enough for me.
Thanks,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Iain, is this[^] what you might be looking for?
|
|
|
|
|
It does enforce what I've learnt from further digging...
Basically, the ROP modes do not exist. There articles here on CP, but you have to get a fresh DC from the graphics object, and use classic GDI code on them...
Ah well, roll on Direct2d! (Not really, unless it can be run on XP, which the VAST majority of my customers have).
Thanks,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi to Everyone,
I want to write and read from a text file using MFC. (to keep the chat history in a client side for a chat application )..
Could you please let me know the syntax for the same.....
Also if there is any other way of keeping/storing the history, please do let me know
Thanks in advance
I am a beginner
|
|
|
|
|
I'm sure if you search this forum, you'll find plenty of examples for doing what you want.
|
|
|
|
|
|
MFC, STUDIO 2008
ADO;
How do to define the number chose row
into control CListCtrl?
Cstring m_s;
CListCtrl* m_pListCtrl_3;
m_pListCtrl_3 = (CListCtrl* ) GetDlgItem(IDC_LIST1);
int n = m_pListCtrl-> ?????????????????????????
m_s.Format(“n = %d\n”,n);
MessageBox(m_s);
|
|
|
|
|
POSITION P = m_pListCtrl_3->GetFirstSelectedItemPosition();
if (P == NULL) { }
else n = m_pListCtrl_3->GetNextSelectedItemPosition(P);
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
modified on Friday, March 13, 2009 10:07 AM
|
|
|
|
|
|
I don't understand anything from your question.
If you want to get the selected item, you can use CListCtrl::GetSelectionMark() .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
«_Superman_» wrote: If you want to get the selected item, you can use CListCtrl::GetSelectionMark().
Does that work on a single-select list control?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I bet on yes.
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]
|
|
|
|