NO

Author Topic: MessageBow never disappears  (Read 134 times)

Offline HellOfMice

  • Member
  • *
  • Posts: 105
  • Never be pleased, always improve
MessageBow never disappears
« on: November 14, 2024, 12:59:59 PM »
In case of errors my program displays a dialogbox (see image).
There is nothing special with that box but I can click on a button the box always stays.

Code: [Select]

int Error(HWND __hWnd,LPSTR __lpszMessage)
{
   MessageBox(__hWnd,__lpszMessage,"Error",MB_OK|MB_ICONERROR|MB_TOPMOST) ;

   return (0) ;
}

I don't understand.
But I can close my program!

I need your help please
Thank You

Philippe RIO
--------------------------------
Kenavo

Offline Marco

  • Member
  • *
  • Posts: 45
Re: MessageBow never disappears
« Reply #1 on: November 17, 2024, 09:32:52 AM »
Ciao Philippe,

Here is a possible cause of the problem

https://stackoverflow.com/questions/29359365/i-have-a-messagebox-in-my-visual-c-win32-that-cannot-be-closed-what-is-going

To make a long story short, a mix of window procedure and dialog procedure is preventing the window dialog box from closing. I don't know if this will work for you, but it was worth a try.

Marco

Offline HellOfMice

  • Member
  • *
  • Posts: 105
  • Never be pleased, always improve
Re: MessageBow never disappears
« Reply #2 on: November 17, 2024, 09:44:17 AM »
Thank you Marco,


My short story
-First, I created windows simulting modless dialogboxes, too long to create all the controls. So I stopped
-Second, I created a main window with modless dialogboxes. too many problems, I stopped too
-Third, I created a main dialog box with modless dialog boxes but I forgot to remove to DefWindowProc in the main dialogbox!
So I could not click on buttons or the window into where they were not disappear. Example an error box.
Now all that seems ok. Many bugs are to find again.
I am working on program speed. I treat 35 000 images images in 2 hours and 30 minutes.
I tested the program on 66 000 files and it works well too
I am searching the SSE...SSE4 to compute average, mean and stddev.
Even if i know the assembler I don't know these instructions.
I translate them but the result often is bad or often is fun but nothing to see with the instructions to translate!


I thank you for the interest you have for that post.


Philippe
--------------------------------
Kenavo