Hi,
I have a strange crash problem with my program..
when i compile and run it crash at start.. but if i run debug the program start and i dont seem to be able to make it crash.
i've commented my newly add code but didnt do anything.
Now i'm wondering if someone can help me find the problem ;)
The code is somekind big .. so if you got time please help me ;D
To compile you have to create a project and add all the .src file to that project and save the project
for your info this is a recipies program in french :)
you will also find my new update dialog class that im working on ..
Hi Krypt, not sure what the problem is but it appears to be connected with the :
//CrÃÆ'Ã,©ÃÆ'Ã,© la Window Principal du programme
Win.Create(0,0,800,600,AWS_CENTERED|AWS_VISIBLE|AWS_SYSMENU|AWS_SIZE|AWS_MINIMIZEBOX|AWS_MAXIMIZEBOX|AWS_AUTODRAW ,0,Titre,0);
Tried further tests, there appears to be a problem in the Popotte.CreateMenu() method, removing the call to this, the program still crashes, but the main window outline is displayed first. So the problems must lay in the creation of the window somewhere.
hope this helps
regards
John
I have found two bugs:
CImage returns pointer to IPicture (or something else) but not image handle.
Replace CImage with CIcon :Livredlg::Getlivres()
{
if count <> 0
{
CIcon img; // <- here
UNSIGNED INT hiItem[2];
img.LoadFromFile(getstartpath()+"Images\\Popotte.ico");
hiItem[0] = img.Detach();
img.LoadFromFile(getstartpath()+"Images\\Livre.ICO");
hiItem[1] = img.Detach();
bug 2: PopotteMain::InsertImage - AllocHeap(len(Path)*2 +1) // why not +2 ?
Feel free to remove this heap, and use s2w()
OleLoadPicturePath(s2w(Path), 0,
While loading the exe in visual studio and in olly debugger, all was clean, no exceptions!
thanx guys for helping ;D
ill take a look at what you've found!
finally found it..
an #autodefine "off" call in an external project source file ... in this case update.src can cause your program to crash ;)