Closing apps in Win XP
Hi guys. I''ve got a problem I can''t figure out, hoping someone here knows the answer.
I recently upgraded my PC to Win XP (yeah yeah, I know. But I wanted to play Civ3 and it''s the only way I could with the display drivers I''ve got in Win 98 SE).
Anyways, I loaded up VC++, and the current project I''m working on last night, and now suddenly my program won''t exit correctly. In Win 98 SE I had no problems. Click on the exit button, and voila, it closed off. I use the standard PostQuitMessage(0); in my VK_CLOSE & VK_DESTROY. This is what happens under XP, no change to the code from Win 98:
- Click on my Exit button.
- Program switchs back to default display mode.
- Program looks like it closed.
- A second window is left open with exactly the same thing as when I quit.
- All windows messages are still performed normally in the program (eg. move mouse, scroll map).
- The process still exists in task manager.
- I have to KILL the process to quit the second window.
I have no idea what to do to get my program to close correctly. Anyone else noticed this? Any suggestions?
-----------------------------
Student - "How do I make my first game?"
Lecturer - "Based on your marks from your last assessment?"
-----------------------------Empires! Visit online at http://www.daleszone.comProgramming for a funner world.
I highly doubt that the problem is in your method of closing your program. It is much more likely to be in some type of unfreed data (that''s the only way I''ve ever triggered this type of event in Win2K).
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
I''m almost certain that it''s not a leak. I double-checked all objects last night and I NULL, release and delete every one of them. Any other ideas?
But I will check every object again tonight.
-----------------------------
Student - "How do I make my first game?"
Lecturer - "Based on your marks from your last assessment?"
But I will check every object again tonight.
-----------------------------
Student - "How do I make my first game?"
Lecturer - "Based on your marks from your last assessment?"
-----------------------------Empires! Visit online at http://www.daleszone.comProgramming for a funner world.
I haven''t had that happen any other way, but that doesn''t rule out that I could be wrong .
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
Two questions:
1) Did you UPGRADE to WinXP from 98, or do a clean install?
2) Did you convert the drive to NTSF or leave it at FAT?
My theory is it may have less to do with your code, and more related to either the OS or your drivers (though it doesn't look like a driver issue). A friend of mine simply bought the upgrade version of XP and he has had nothing but problems.
Best bet with my theory, is to find a friend with XP and test your program on their system to see if the problem re-creates itself when you exit. May help, may not.
Edited by - SirSmoke on December 5, 2001 5:50:11 AM
1) Did you UPGRADE to WinXP from 98, or do a clean install?
2) Did you convert the drive to NTSF or leave it at FAT?
My theory is it may have less to do with your code, and more related to either the OS or your drivers (though it doesn't look like a driver issue). A friend of mine simply bought the upgrade version of XP and he has had nothing but problems.
Best bet with my theory, is to find a friend with XP and test your program on their system to see if the problem re-creates itself when you exit. May help, may not.
Edited by - SirSmoke on December 5, 2001 5:50:11 AM
Fresh install of Win XP. So fresh that I had setup create the HDD partition and format NTFS.
My devices are all on-board Intel chipset, so I doubt it''s a driver problem.
-----------------------------
Student - "How do I make my first game?"
Lecturer - "Based on your marks from your last assessment?"
My devices are all on-board Intel chipset, so I doubt it''s a driver problem.
-----------------------------
Student - "How do I make my first game?"
Lecturer - "Based on your marks from your last assessment?"
-----------------------------Empires! Visit online at http://www.daleszone.comProgramming for a funner world.
Okay, here''s a little bit of info after doing some research into this problem:
- In WinXP, my APP closes perfectly when using IDM_EXIT from a menu WM_COMMAND message.
- My APP closes perfectly when using the message WM_CLOSE and WM_DESTROY.
- My APP doesn''t close at all (opening a second instance of itself instead) when (for example) I create a "Quit" button on a screen and use the "PostQuitMessage(0)" in a WM_LMBUTTONDOWN message.
- My APP causes memory exception errors when using "DestroyWindow(hwnd)". Well, not unusual there since it is a direct "DIE YOU MONGRAL, DIE!" statement.
So basically, the APP will only ever close correctly when using IDM_EXIT from a menu, or WM_CLOSE & WM_DESTROY.
I''m at a loss. So at this point, I''m going to use the IDM_EXIT message from a menu.
Any comments?
-----------------------------
Student - "How do I make my first game?"
Lecturer - "Based on your marks from your last assessment?"
- In WinXP, my APP closes perfectly when using IDM_EXIT from a menu WM_COMMAND message.
- My APP closes perfectly when using the message WM_CLOSE and WM_DESTROY.
- My APP doesn''t close at all (opening a second instance of itself instead) when (for example) I create a "Quit" button on a screen and use the "PostQuitMessage(0)" in a WM_LMBUTTONDOWN message.
- My APP causes memory exception errors when using "DestroyWindow(hwnd)". Well, not unusual there since it is a direct "DIE YOU MONGRAL, DIE!" statement.
So basically, the APP will only ever close correctly when using IDM_EXIT from a menu, or WM_CLOSE & WM_DESTROY.
I''m at a loss. So at this point, I''m going to use the IDM_EXIT message from a menu.
Any comments?
-----------------------------
Student - "How do I make my first game?"
Lecturer - "Based on your marks from your last assessment?"
-----------------------------Empires! Visit online at http://www.daleszone.comProgramming for a funner world.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement