Click here to Skip to main content
15,914,399 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPlz chck this code!! Pin
Member 18801462-May-05 0:30
Member 18801462-May-05 0:30 
GeneralRe: Plz chck this code!! Pin
Rahim Rattani2-May-05 1:39
Rahim Rattani2-May-05 1:39 
GeneralRe: Plz chck this code!! Pin
David Crow2-May-05 2:13
David Crow2-May-05 2:13 
GeneralRe: Plz chck this code!! Pin
Rahim Rattani2-May-05 2:27
Rahim Rattani2-May-05 2:27 
GeneralRe: Plz chck this code!! Pin
SuperTank2-May-05 5:27
SuperTank2-May-05 5:27 
GeneralConvert Words to Numbers Pin
Member 6339521-May-05 22:12
Member 6339521-May-05 22:12 
GeneralRe: Convert Words to Numbers Pin
Rahim Rattani2-May-05 1:19
Rahim Rattani2-May-05 1:19 
GeneralCDialog::EndDialog crashes application Pin
leatrop1-May-05 20:59
leatrop1-May-05 20:59 
I have pretty simple code

void ReadDeviceThread( void *lparam )
{
Sleep(2000);
((ProgressDialog *)lparam)->EndDialog(IDOK);
}

void CMainWindow::OnReadDevice()
{
static ProgressDialog pd;

_beginthread(ReadDeviceThread, 0, &pd);

pd.DoModal("Initialising read from device");
}

The app crashes at user32.dll (win XP, VC++ 6.0, SP6.0) after call of EndDialog. Specifically it crashes after calling ::EndDialog at the end of the EndDialog routine.

void CDialog::EndDialog(int nResult)
{
ASSERT(::IsWindow(m_hWnd));

if (m_nFlags & (WF_MODALLOOP|WF_CONTINUEMODAL))
EndModalLoop(nResult);

::EndDialog(m_hWnd, nResult); // after this line app crashes at USER32! 77d562cf()
}

Could anybody please help me with this problem. What's wrong with my code.

Thank you
GeneralRe: CDialog::EndDialog crashes application Pin
khan++2-May-05 0:37
khan++2-May-05 0:37 
GeneralRe: CDialog::EndDialog crashes application Pin
leatrop2-May-05 12:29
leatrop2-May-05 12:29 
GeneralRe: CDialog::EndDialog crashes application Pin
Rahim Rattani2-May-05 2:02
Rahim Rattani2-May-05 2:02 
GeneralRe: CDialog::EndDialog crashes application Pin
leatrop2-May-05 12:52
leatrop2-May-05 12:52 
GeneralMicrosoft word and MFC Pin
Aqueel1-May-05 20:13
Aqueel1-May-05 20:13 
Generalbuttons not seen on dialog box Pin
Anonymous1-May-05 19:47
Anonymous1-May-05 19:47 
GeneralRe: buttons not seen on dialog box Pin
namaskaaram1-May-05 20:07
namaskaaram1-May-05 20:07 
GeneralRe: buttons not seen on dialog box Pin
Anonymous1-May-05 20:14
Anonymous1-May-05 20:14 
GeneralRe: buttons not seen on dialog box Pin
khan++1-May-05 20:22
khan++1-May-05 20:22 
GeneralRe: buttons not seen on dialog box Pin
John R. Shaw2-May-05 7:24
John R. Shaw2-May-05 7:24 
GeneralRe: buttons not seen on dialog box Pin
Anonymous2-May-05 19:47
Anonymous2-May-05 19:47 
GeneralInterpret Javascript in VC++ Pin
Priyank Bolia1-May-05 19:18
Priyank Bolia1-May-05 19:18 
GeneralRe: Interpret Javascript in VC++ Pin
ThomasABBE2-May-05 12:20
ThomasABBE2-May-05 12:20 
GeneralRe: Interpret Javascript in VC++ Pin
Priyank Bolia2-May-05 19:05
Priyank Bolia2-May-05 19:05 
GeneralISAPI Filter access database Pin
leeherng821-May-05 17:46
leeherng821-May-05 17:46 
GeneralRe: ISAPI Filter access database Pin
Christian Graus1-May-05 17:51
protectorChristian Graus1-May-05 17:51 
GeneralHelp using openthread Pin
Anonymous1-May-05 17:35
Anonymous1-May-05 17:35 

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.