News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Masm Help

Started by Bobbolo, March 23, 2017, 07:22:28 AM

Previous topic - Next topic

Bobbolo

Good morning
I wrote a program, but after a short time does not work anymore.
Attached the programma.Mi you give where I made mistakes.
Sorry for my English, I'm Italian.
Thanks in advance

jj2007

Do some error checking, and control what's wrong with your resources - rc.exe has error messages.
invoke CreateDialogParam,hInstance,IDD_DIALOG,NULL,addr WndProc,NULL
test eax, eax
je @error

dedndave

the symptom you are describng often happens when an object is created repeatedly, but never deleted
this aplies to things like windows, controls, pens, brushes, bitmaps, and so on
quite often, it's a GDI object that is overlooked (pens, brushes, bitmaps, etc)

Bobbolo

Thanks for the information.
But I think I've deleted all objects,
At every turn I destroy all the objects.
Thank you for your quick answer,
have a nice day,
Roberto

sinsi

Quote from: Bobbolo on March 23, 2017, 10:52:39 AM
But I think I've deleted all objects,
You create hNullBrush but don't delete it.

jj2007

@sinsi: :t

Besides:
trasparentclock.rc(1) : fatal error RC1015: cannot open include file 'Res/TrasparentClockSetupDlg.rc'.

The setup of your resources is unnecessarily complicated, and you have not zipped all necessary files. It may assemble without resources, but it will not run: CreateDialogParam will fail, and since you don't check the return value, it will hang indefinitely, so that you can kill it only with task manager aka gestione attività 8)

Bobbolo

Many thanks to all guys
I solved the problem
Thanks again