Enter key does not trigger IDOK Default Push Button action

前端 未结 1 1214
南笙
南笙 2021-01-24 05:37

I have a CDialog derived class. Its interface definition has several picture boxes and some buttons after, defined in resource file as:

IDD_SELECT_ITEMS DIALOGEX         


        
相关标签:
1条回答
  • 2021-01-24 06:14

    The solution was right in front of my eyes in a comment, and I was completely blind, not seeing it!

    After seeing the end of the "The WM_INITDIALOG Message" section on Dialog Box Programming Considerations, I understood I had to return FALSE.

    I eliminated all the trashy lines I added, changed the return value to FALSE, and everything began to work fine as expected :)

    0 讨论(0)
提交回复
热议问题