|
|
|
MFC
|
|||
|---|---|---|---|
|
#18+
Помогите пожалуйста) Как сделать, чтобы при наведении мышью на кнопку закрытия приложения, она блокировалась? Зарание благодарна) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.05.2007, 19:05 |
|
||
|
MFC
|
|||
|---|---|---|---|
|
#18+
siberia пишет: > Как сделать, чтобы при наведении мышью на кнопку закрытия приложения, > она блокировалась? А смысл ? Alt-F4 никто не отменял. Надо WM_CLOSE ловить и запрещать. Posted via ActualForum NNTP Server 1.4 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.05.2007, 20:49 |
|
||
|
MFC
|
|||
|---|---|---|---|
|
#18+
взято с кодгуруIntroduction : There are occasions when we would like to disable the close button on a dialog or any other window. In this article I am going to show you a simple way to do that. Even though I am going to show you how to disable the close button for a dialog, this technique would work for other windows too and for other system menu commands also. Technique : We use GetSystemMenu function to get the handle to the Control menu. Then using that handle we either call ModifyMenu or EnableMenuItem to change the control menu. (1) Using ModifyMenu : Add the following code to the InitDialog handler of your class CMenu* mnu = this->GetSystemMenu(FALSE); mnu->ModifyMenu(SC_CLOSE,MF_BYCOMMAND | MF_GRAYED ); (2) Using EnableMenuItem : Add the following code to the InitDialog handler of your class CMenu* mnu = this->GetSystemMenu(FALSE); mnu->EnableMenuItem( SC_CLOSE, MF_BYCOMMAND|MF_GRAYED); Thus by adding a couple of lines we can disable the close button for a dialog or any other window. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.05.2007, 17:12 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=34507053&tid=2028921]: |
0ms |
get settings: |
5ms |
get forum list: |
9ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
18ms |
get topic data: |
7ms |
get forum data: |
2ms |
get page messages: |
27ms |
get tp. blocked users: |
1ms |
| others: | 211ms |
| total: | 284ms |

| 0 / 0 |
