http://bugs.codeweavers.com/show_bug.cgi?id=574
*** shadow/574 Sat Apr 13 06:02:31 2002 --- shadow/574.tmp.10555 Sat Apr 13 06:02:31 2002 *************** *** 0 **** --- 1,57 ---- + +============================================================================+ + | Creative use of CreateDialog and DestroyWindow cause busy loop | + +----------------------------------------------------------------------------+ + | Bug #: 574 Product: Wine | + | Status: UNCONFIRMED Version: unspecified | + | Resolution: Platform: | + | Severity: normal OS/Version: All | + | Priority: P1 Component: wine-misc | + +----------------------------------------------------------------------------+ + | Assigned To: wine-bugs@winehq.com | + | Reported By: teemu@firsthop.com | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | Milestone: TargetMilestone: --- | + | URL: | + +============================================================================+ + | DESCRIPTION | + Following scenario seems to cause busy loop. + + WINE version is wine-20020405.tar and it's build in local machine. + + Description: + + We have a multithreaded program that is closing down, this code is required to + show the closing dialog while one thread does some background cleanup and + finally calls exit(). This code has been tested in W9X, NT, W2K, XP w/o + problems. + + Program is pure W32 application and doesn't therefore link to MFC or any other + extra DLL. + + Wine is started with 'wine program.exe'. Default Wine-configuration is used. + + Here is what triggers the problem: + + o Main program Dialog A receives IDCANCEL from system + + o Code that handles IDCANCEL in Dialog A creates Dialog with following + parameters + HWND clo = CreateDialog( g_hInst, + MAKEINTRESOURCE(IDD_CLOSING_DIALOG), 0, ClosingDlgProc); + + ClosindDlgProc is simple function with only WM_INITIDIALOG handler that + changes one static field to bold text format. + + o Dialog A then destroys itself with DestroyWindow-call and returns TRUE from + handler function. + + o Now the Newly created dialog B appears but it has only frames and title bar. + The client area of dialog is transparent and flickers wildly while wine is eating + CPU. + + o Just before the programs exits, the dialog B appears correctly for fraction of + second before closing. + + NOTE! There is nearly identical code at the start of program that works fine. Only + significant difference is that Dialog A is not destroyed on the handler. \ No newline at end of file