Buttons with rounded corners in dc_msgbox()

This forum is for eXpress++ general support.
Message
Author
skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Buttons with rounded corners in dc_msgbox()

#1 Post by skiman »

Hi,

I had a visual problem when using buttons with a radius. When a dc_messagebox was displayed, the corners were black.

I changed it in de _dcmsg.prg by changing the TYPE of the DCSTATIC.
@ nLine,0 DCSTATIC TYPE XBPSTATIC_TYPE_FGNDRECT instead of the XBPSTATIC_TYPE_TEXT

Also the icon in the dialog wasn't a perfect circle. I changed this the following way:
@ 10,10 DCSTATIC TYPE nIconType SIZE 40,40 CAPTION nIcon PIXEL

By using the PIXEL clause, the icon is now a perfect circle.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#2 Post by rdonnay »

I had not seen this problem of black around radiused corners in years.

A DCTOOLBAR is based on XbpStatic.

Can I assume that the buttons that you are putting on the DCSTATIC are DCPUSHBUTTONXP ?
The eXpress train is coming - and it has more cars.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#3 Post by skiman »

Hi Roger,

dc_messagebox is using pushbuttons in _dcmsg.prg.
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#4 Post by skiman »

Hi,

When I try the BUTPICKER sample, the same effect comes up. AFAIK this wasn't a problem in the past?
button.png
button.png (40.33 KiB) Viewed 2477 times
In the source I see @ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_TEXT which is the parent of the buttons.

I never had problems in the past with the use of XBPSTATIC_TYPE_TEXT.

After changing the TYPE of the DCSTATIC, the problem is solved.

I have this problem with 1.9sl1 and 2.0 and express build 268.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#5 Post by rdonnay »

Chris -

Thank you for that feedback.

I see the same problem in the sample program.
There has not been any code changes in many years, so possibly it may be something has changed in Windows 10 or Xbase++.

I'm going to test this on my old laptop with Windows 7 and an older version of Xbase++ and eXpress++.

Regardless, I so no reason why I can't change the sample program to fix it, per your suggestion.
I would also need to change DCTOOLBAR.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#6 Post by rdonnay »

When I run the BUTTONXP.EXE sample program all the rounded buttons look fine, because they are all on a DCTOOLBAR TYPE XBPSTATIC_TYPE_TEXT.

I think that there is nothing I should so with my eXpress++ code, but I will change the BUTTPICKER sample program per your suggestion.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#7 Post by skiman »

Hi Roger,

This is a screenshot of a dc_msgbox() as I get it.
msgbox.png
msgbox.png (11.88 KiB) Viewed 2460 times
- Icon isn't a circle.
- Corners wrong.

Is this working correctly on your system?
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#8 Post by rdonnay »

I am trying to figure out how you are getting radiused buttons in DCMSGBOX.

Can you send me a test program?
The eXpress train is coming - and it has more cars.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#9 Post by skiman »

Hi Roger,

I looked at the code of the pushbutton object and I noticed that there is no RADIUS property for it. :o

I have to check what is happening here. I come back to you later when I have found the cause.
Best regards,

Chris.
www.aboservice.be

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Buttons with rounded corners in dc_msgbox()

#10 Post by skiman »

Hi Roger,

It seems I have somewhere a system to make the look of the pushbutton the same as the pushbuttonXP. I can't find it, but this is the only explanation for the 'radiused' buttons when I use pushbutton.

I thought I had done this with an include file, but in that case the dclipx would not use it. I didn't change the _dcxbutt.prg the pushbutton class is as the original.

At the startup of my application I have this:
DC_PopupButtonStyle( oConfigLegacy )
DC_PushButtonStyle( oConfigLegacy )

All my buttons looks the same, same color, mouseover, radius, gradient, ... no matter if they are pushbuttons or pushbuttonxp.

I have to check this further. Anyway this will be the cause of my dc_msgbox() problem, since the radius is used there in my version. I changed it according to my needs (and I documented the change :-)).
Best regards,

Chris.
www.aboservice.be

Post Reply