|
Ok, but can you tell me again please what i should put in the variable my_control ? such as you know that the control is an webbrowser (activeX)?
|
|
|
|
|
So you mean, with the question "how to set the font of my control" you actually wanted to ask "how to use the ActiveX web browser control"? Actually i have no idea, did you place the ActivX thing on your GUI using VS's resource editor? If so, you probably can add a member for it with the same.
> 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 , i had assign an ID to this control and i understood how i put the name of my_control
but the problem exist when i do the line below :
CWindow wnd = GetDlgItem(IDC_EXPLORER);
wnd.GetFont()->GetLogFont(&logFont);
it say that there is a Error ---> 'GetLogFont' : is not a member of 'HFONT_'
so can you help me about this and should i make a casting and how?
Thank you
|
|
|
|
|
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
|
|
|
|
|