& Character problem
#12
(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
Reply


Messages In This Thread
& Character problem - by Robert Alvarez - 30.09.2025, 08:08 PM
RE: & Character problem - by Dale Yarker - 30.09.2025, 09:00 PM
RE: & Character problem - by Robert Alvarez - 01.10.2025, 12:38 AM
RE: & Character problem - by Stuart McLachlan - 01.10.2025, 03:36 AM
RE: & Character problem - by Dale Yarker - 01.10.2025, 02:55 AM
RE: & Character problem - by Borje Hagsten - 01.10.2025, 02:29 PM
RE: & Character problem - by Stuart McLachlan - 01.10.2025, 05:09 PM
RE: & Character problem - by Dale Yarker - 01.10.2025, 03:24 PM
RE: & Character problem - by Robert Alvarez - 01.10.2025, 06:07 PM
RE: & Character problem - by Borje Hagsten - 01.10.2025, 07:21 PM
RE: & Character problem - by Robert Alvarez - 02.10.2025, 12:54 AM
RE: & Character problem - by Stuart McLachlan - 02.10.2025, 02:23 AM
RE: & Character problem - by Borje Hagsten - 02.10.2025, 02:28 AM
RE: & Character problem - by Robert Alvarez - 02.10.2025, 04:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)