-
April 28th, 2017, 09:31 PM
#1
MFCButton control images and differing screen resolutions
Hey Gurus!
I have an application where I use CMFCButton controls. Using SetImage() I have put an icon to the left of the text in the button.
It looks great and works well.
Recently I installed my application onto a laptop with a different screen resolution, and consequently all the images next to the text in the buttons are now displayed smaller than I was expecting. I also have the same issue that uses an icon in a picture control.
It makes sense of course, differing screen resolutions with set width and height icons are not going to display the same on each screen.
Is there something in the API to allow for this type of issue, and if not, how do I go about doing it manually?
Thanks so much in advance.
Steve Q. :-)
-
April 29th, 2017, 02:48 AM
#2
Re: MFCButton control images and differing screen resolutions
Originally Posted by steveq
... how do I go about doing it manually?
You could try to override the CMFCButton::DrawItem method. Note, however, that the button has to have BS_OWNERDRAW style.
Last edited by VictorN; April 29th, 2017 at 03:19 AM.
Victor Nijegorodov
-
April 29th, 2017, 07:40 AM
#3
Re: MFCButton control images and differing screen resolutions
Thanks Victor,
I'll have a look and see if I can implement something myself.
Steve Q :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|