Change the project font
-
Hi all, I am using VC6. Is there any easy way to make the font used in the dialog bold (MS Sans Serif)? Especially for all the CStatic's? I know I can simply use one of the CStatic-derived classes here, but that means I have to declare/initialize/set each member of the CStatic for all my dialogs! This means hundreds! Thanks for any input.
-
Hi all, I am using VC6. Is there any easy way to make the font used in the dialog bold (MS Sans Serif)? Especially for all the CStatic's? I know I can simply use one of the CStatic-derived classes here, but that means I have to declare/initialize/set each member of the CStatic for all my dialogs! This means hundreds! Thanks for any input.
-
Hi all, I am using VC6. Is there any easy way to make the font used in the dialog bold (MS Sans Serif)? Especially for all the CStatic's? I know I can simply use one of the CStatic-derived classes here, but that means I have to declare/initialize/set each member of the CStatic for all my dialogs! This means hundreds! Thanks for any input.
Joe Smith IX wrote:
I know I can simply use one of the CStatic-derived classes here, but that means I have to declare/initialize/set each member of the CStatic for all my dialogs! This means hundreds!
Just how hard is it to use the search/replace feature of the IDE?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
In the dialog properties you can set the font for the dialog. That font will then be used by all the controls on the dialog.
You may be right
I may be crazy
-- Billy Joel --Within you lies the power for good, use it!!!
But as I mentioned in my original post, you can't make it BOLD from the properties, can you?
-
Joe Smith IX wrote:
I know I can simply use one of the CStatic-derived classes here, but that means I have to declare/initialize/set each member of the CStatic for all my dialogs! This means hundreds!
Just how hard is it to use the search/replace feature of the IDE?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
It's not hard at all to use search/replace. The problem I was referring to was that I would have to declare EACH and EVERY 'Static Text' as object, then initialize and set the properties of each one of them! Am I correct, or there is a much simpler way?
-
But as I mentioned in my original post, you can't make it BOLD from the properties, can you?
You did not mention that you tried it from the properties:doh: In VC8 it is possible to it from the properties, but not in VC6. I even tried modifying the dialog resource directly in the rc file by changing the FONT property. I was able to toggle the italic property but not change the weight. Another easy option is to use EnumChildWindows to enumerate through all your controls and send a WM_SETFONT message to each one.
You may be right
I may be crazy
-- Billy Joel --Within you lies the power for good, use it!!!
-
You did not mention that you tried it from the properties:doh: In VC8 it is possible to it from the properties, but not in VC6. I even tried modifying the dialog resource directly in the rc file by changing the FONT property. I was able to toggle the italic property but not change the weight. Another easy option is to use EnumChildWindows to enumerate through all your controls and send a WM_SETFONT message to each one.
You may be right
I may be crazy
-- Billy Joel --Within you lies the power for good, use it!!!
thanks a lot. just what i was looking for.
-
It's not hard at all to use search/replace. The problem I was referring to was that I would have to declare EACH and EVERY 'Static Text' as object, then initialize and set the properties of each one of them! Am I correct, or there is a much simpler way?
Joe Smith IX wrote:
Am I correct...
No.
Joe Smith IX wrote:
...there is a much simpler way?
Yes. Once you have a class derived from
CStatic
, simply change your dialog's .h file by renaming all references toCStatic
to your derived class. In the derived class, see the Extras section of this article.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb