Hi All..

I am using MsFlexGrid in my program..
normally after I double click, enter value, KillFocus then press OK to close the dialog..

now I would like to add a message box once I enter value.
Then I found out that, after message box prompt out and I click OK on that message box, I can't close dialog by pressing OK button..

I need press twice then OK button will activate..
not only the OK button act like this, the others control button like..
radio button, check box button..etc..need press twice, then will activate them..

I tried use SetFocus() to activate OK button, but still finding the result is same..

can anyone help me on this..??

Thank you..

That sounds like something rather complicated. One thing I can say though is that if you are using WM_SETFOCUS/SetFocus() within that dialog box, then just don't. Those are not meant to be used with dialog boxes.
Rather use CDialog::GotoDlgCtrl() or WM_NEXTDLGCTL to set the focus.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.