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

C / C++ / MFC

 
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 
GeneralRe: Disabling dialog button from within the ON_BN_CLICKED handler Pin
Daniele Godi29-Mar-05 23:05
Daniele Godi29-Mar-05 23:05 
Dear all, I found the solution and I like to share it with you.

I took the idea from an article I have found on your site,
http://www.codeproject.com/cpp/cppforumfaq.asp#ui_workerthread

I implemented this code within the button handler and... wonder!, it works.


OnButtonClicked()
{
m_crtlButton->Enable(FALSE);

while (Do_A_Bit_Of_Work())
{
MSG msk;
while(PeekMessage(&msg, NULL, NULL, PM_NOREMOVE)
{
AfxGetApp()->PumpMessage();
}
}

m_crtlButton->Enable(TRUE);

return;
}

Ciao and thanks for your kind help.



Daniele
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 
GeneralRe: Export Member function / class Pin
Steve Messer24-Mar-05 19:11
Steve Messer24-Mar-05 19:11 

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.