02.10.2025, 02:23 AM
(This post was last modified: 02.10.2025, 02:25 AM by Stuart McLachlan.)
(02.10.2025, 12:54 AM)Robert Alvarez Wrote: CONTROL ADD BUTTON ,hDlg,1001, "&DON&E", 50,5,40,12, CALL TEXTT
Not quit sure what owner drawn means? Above expecting the D to be underline when press ALT and DON&E for text, but the E is underlined.
CONTROL ADD BUTTON ,hDlg,1001, "&DON&E", 50,5,40,12,%DT_NOPREFIX format, CALL TEXTT <--- error
OwnerDraw -
" Win32 owner-drawing refers to a mechanism in the Windows API that allows an application to take over the responsibility of drawing specific elements of standard controls or menu items. Instead of the system drawing these elements with its default appearance, the application's code is invoked to perform the drawing, enabling custom visual styles and functionalities."
Setting the %BS_OWNERDRAW style for a button means that you have to trap the %WM_DRAWITEM message for the control and paint it yourself.
Only one "&" works in a control. If there is more than one, Wndows drops the previous one and uses the last one.
ou have "&DON&E", so the &D is replaced by the &E
The word "format" shouldn't be in that line.
%DT_NOPREFIX is a flag used with the DRAWTEXT function - which is used when you use DRAWTEXT in the operations carried out in response to %WM_PAINT when the OWNERDRA flag is set. It is not recognised by the button as a flag.
--
New PowerBASIC User Community Forum:
https://pbusers.org/forum
New PowerBASIC User Community Forum:
https://pbusers.org/forum