Click here to Skip to main content
15,898,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Please help me! Pin
Rahim Rattani23-Mar-05 23:24
Rahim Rattani23-Mar-05 23:24 
GeneralRe: Please help me! Pin
Cedric Moonen23-Mar-05 23:31
Cedric Moonen23-Mar-05 23:31 
GeneralRe: Please help me! Pin
toxcct24-Mar-05 1:01
toxcct24-Mar-05 1:01 
GeneralDisabling dialog button from within the ON_BN_CLICKED handler Pin
Daniele Godi23-Mar-05 21:44
Daniele Godi23-Mar-05 21:44 
GeneralRe: Disabling dialog button from within the ON_BN_CLICKED handler Pin
toxcct23-Mar-05 22:09
toxcct23-Mar-05 22:09 
GeneralRe: Disabling dialog button from within the ON_BN_CLICKED handler Pin
qrverona24-Mar-05 2:19
qrverona24-Mar-05 2:19 
GeneralRe: Disabling dialog button from within the ON_BN_CLICKED handler Pin
toxcct24-Mar-05 2:24
toxcct24-Mar-05 2:24 
GeneralRe: Disabling dialog button from within the ON_BN_CLICKED handler Pin
24-Mar-05 3:21
suss24-Mar-05 3:21 
The code is exactly the same I have provided on my first query. (Except for the workaround)

I work with MS Visual Studio .NET 2003
The application is MFC based.
The Dlg-box is modal

Build a empty application and add an handler to the OK button on the about box, then

1 - at the beginnig of the handling function disable the button that the user pressed using the wrapper class m_ctrlButtonOK.EnableWindow(FALSE) (same as GetDlgItem(ID)->EnableWindow(FALSE))

2 - perform a long work

::MessageBeep(MB_OK);
::Sleep(10000);

works fine...

3 - at the end of the function call m_ctrlButtonOK.EnableWindow(TRUE)

If you click on the OK button while it is disabled, you will see that after the work the handler function get called once again.

Thank you and ciao...

Daniele
GeneralRe: Disabling dialog button from within the ON_BN_CLICKED handler Pin
Daniele Godi29-Mar-05 23:05
Daniele Godi29-Mar-05 23:05 
GeneralRe: Disabling dialog button from within the ON_BN_CLICKED handler Pin
Member 52815523-Mar-05 22:22
Member 52815523-Mar-05 22:22 
GeneralRe: Disabling dialog button from within the ON_BN_CLICKED handler Pin
qrverona24-Mar-05 2:19
qrverona24-Mar-05 2:19 
Generaldll signature. Pin
oustar23-Mar-05 21:42
oustar23-Mar-05 21:42 
GeneralRe: dll signature. Pin
gP_t_gr823-Mar-05 22:16
gP_t_gr823-Mar-05 22:16 
QuestionHow to obtain the inserted row's ID (database) Pin
Abyss23-Mar-05 21:22
Abyss23-Mar-05 21:22 
GeneralExport Member function / class Pin
Steve Messer23-Mar-05 21:15
Steve Messer23-Mar-05 21:15 
GeneralRe: Export Member function / class Pin
David Crow24-Mar-05 5:43
David Crow24-Mar-05 5:43 
GeneralRe: Export Member function / class Pin
Steve Messer24-Mar-05 7:01
Steve Messer24-Mar-05 7:01 
GeneralRe: Export Member function / class Pin
cmk24-Mar-05 8:34
cmk24-Mar-05 8:34 
GeneralRe: Export Member function / class Pin
Steve Messer24-Mar-05 8:41
Steve Messer24-Mar-05 8:41 
GeneralRe: Export Member function / class Pin
cmk24-Mar-05 10:17
cmk24-Mar-05 10:17 
GeneralRe: Export Member function / class Pin
cmk24-Mar-05 10:24
cmk24-Mar-05 10:24 
GeneralRe: Export Member function / class Pin
Steve Messer24-Mar-05 13:21
Steve Messer24-Mar-05 13:21 
GeneralRe: Export Member function / class Pin
cmk24-Mar-05 20:49
cmk24-Mar-05 20:49 
GeneralRe: Export Member function / class Pin
Steve Messer25-Mar-05 5:25
Steve Messer25-Mar-05 5:25 
GeneralRe: Export Member function / class Pin
Steve Messer25-Mar-05 9:51
Steve Messer25-Mar-05 9:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.