|
Hi,
i have a dialog box and a picture control on that dialog box in mfc. I want to create a button on the right of the screen (similar to "Feedback" button seen on various sites). I created a button and positioned it on the right of the screen, but when clicked on any other control of the dialog box, the button hides under the picture control canvas.
Anybody have any idea.?
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|
|
It sounds like the picture is being redrawn so it will obviously cover the button. Try positioning the button somewhere else.
|
|
|
|
|
Hi,
Thanx for the reply.
I have to show the buttons at the right of the screen. Similar to "Feedback" button we normally see on various sites.
I have one doubt, My computer screen size is larger compared to some others. So I want to ask should I use the GetWindowRect() OR GetClientRect() function to compute the size of the screen, because if I do it according to my screen size and position the buttons at the right of the screen, For a computer with smaller screen size, it will not be properly visible.
Regards,
Mbatra
|
|
|
|
|
mbatra31 wrote: For a computer with smaller screen size, it will not be properly visible. That's rather obvious. You should always check the Window, Client or Screen size depending on where you want your controls positioned.
|
|
|
|
|
Hi,
Its done..! Issue was with the positioning only.
Thanx for the help.
Regards,
Mbatra
|
|
|
|
|
From what Richard replied, and re-reading your message, I guess you have a button, and a picture control on your dialog, and they overlap.
What you need is a button which shows its own picture. You can attach an icon to the button from the resource editor, or you can use one of the many picture button controls available here:
http://www.codeproject.com/KB/buttons/[^]
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Hi Iain,
I have a button and a bitmap. I am using CSkinButton class to set normal & hover state bitmaps on the button. I want to position the button on the right of the screen (similar to "feedback" button we normally see on various websites.) Now my computer screen size is larger, So when I position the buttons on the right side according to my computer screen size, its ok , but if I use this exe on some other computer which has a smaller screen size, button are not visible properly.
I want to place the buttons in the middle-right of the screen.
Regards,
Mbatra
|
|
|
|
|
Just position it somewhere where the controls don't overlap. You can have overlapping controls but it's really not worth the hassle. By the way, you can always get the size and position of your other control and do some math to figure out the proper placement of the button under it (if you're creating the controls at run-time).
|
|
|
|