C ++的Win32如何创建"拨动"按钮

问题描述:

我本来以为这种做法是非常容易做到的。谷歌搜索返回的结果的一切,但是这一点。

I was originally thinking this would be extremely easy to do. Google searches returned results for everything but this.

我想有一个正常的按钮,我可以单击,它保持下来,再次点击,和它上升回来了。

I am trying to have a normal button that I can click, and it stays down, click again, and it rises back up.

我发现,做了什么,我想要一个功能,但只工作如果按钮保留焦点,点击其他地方,它重新升起。

I found one function that did what I wanted, but only worked if the button retained focus, click anywhere else and it rises again.

Button_SetState(函数GetDlgItem(HWND,IDC_BTN_SLEEPCLICK),TRUE);

有没有做到这一点任何真正的办法吗?还是我要去需要手工做这样的事情?

Is there any real way to do this? Or am I gonna need to do this kind of thing by hand?

感谢。

创建一个复选框,然后设置推喜欢属性的复选框为true。

Create a check box, then set the "push like" property for that check box to true.