문제

When I make a dialog using CDialog project of VC++, I can not defocus any field on this dialog(CDialog). What I want to do is how some field can be defocused when I clicked the outside of this field with mouse.

Thanks for any advice and comments.

도움이 되었습니까?

해결책

The only obvious question: WHY? Why do you want to de-focus from a control, and (possibly) not give focus to any control? Some control within the dialog should have a keyboard focus!

You can however, make a textbox, which would be outside the visible area of dialog, and SetFocus on that control, whenever you get WM_MOUSE* message(s) on the CDialog.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top