Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

%BS_OWNERDRAW and Enter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Semen Matusovski
    replied
    It seems to me I found a "normal", documented way (works at least, under Windows 2000)
    Code:
    Dialog Send CbHndl, %DM_SETDEFID, x, 0  (x = 115..117)
    (w/o Case %DM_GETDEFID ...)

    ------------------
    E-MAIL: [email protected]

    Leave a comment:


  • Borje Hagsten
    replied
    Sounds like the dialog relates to last control created for ownerdrawn
    style and first control created for standard style. Change order of
    creation when using ownerdrawn controls?


    ------------------

    Leave a comment:


  • Bern Ertl
    replied
    Sorry I can't be of more help. I'm still learning this stuff.

    Have you tried changing the ID of the 115 button to %IDOK, or
    is that not an option?



    ------------------
    Bernard Ertl

    Leave a comment:


  • Semen Matusovski
    replied
    Bern --
    Yes, 115 has focus (100% sure).
    I read about IsDialogMessage and added to DlgProc
    Code:
      Case %DM_GETDEFID ' = WM_USER
         Function = MakDwd(115, %DC_HASDEFID)
    All is nice, except - now I can't understand why changing to Function = MakDwd(116, %DC_HASDEFID) doesn't make 116 as default (remains 115).



    ------------------
    E-MAIL: [email protected]

    Leave a comment:


  • Bern Ertl
    replied
    Hi Semen, I'm just guessing, but have you tried setting the focus
    on the button (115?) that you want active with the enter key?

    Perhaps the owner draw is changing the focus?!?



    ------------------
    Bernard Ertl

    Leave a comment:


  • Semen Matusovski
    started a topic %BS_OWNERDRAW and Enter

    %BS_OWNERDRAW and Enter

    Guys --
    a form has three buttons with id 115-117. Control Add are located in the same order (115..117).
    Focus has id #115. If to use ordinary buttons, Enter generates WM_COMMAND with CbCtl = 115.
    But if to add %BS_OWNERDRAW style, CbCtl = 117.

    Something strange (I think in IsDialogMessage). How to bypass this behaviour by more or less "normal" way (w/o changes in message loop, subclassing ...) ?

    ------------------
    E-MAIL: [email protected]
Working...
X