|
where do you want me to set brakepoints? i've set them for every line in my code but the application dies while browsing for the file (ie: CFileDialog::DoModal() never returns)
|
|
|
|
|
What does the call stack look like?
Is there any line that points to code for which you have source code?
I assume you have built your application for debug...
--
Rog
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
no...debug does not point to my code
|
|
|
|
|
When you come to Domodal set a breakpoint after it
|
|
|
|
|
...it dies during CFileDialog::DoModal() method (i mean, it dies while my dialog waits for CFileDialog::DoModal() to return)
7CA5159E call dword ptr [ecx+14h]
That's the disassembly code, but i don't know what to do with it, i don't think it helps
|
|
|
|
|
Did you try displaying a message box before and after your CFileDialog creation? What happens in that case?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
it dies only if there's verry little time between pressing the two buttons. If i put a message box anywhere...it will work
|
|
|
|
|
eusto wrote: If i press the frist one, select a file than press the seccond one, my application crashes...
What happens if you reverse this process?
Which of the four statements after DoModal() is crashing? Set a breakpoint to find out.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
None of the four statements after DoModal() is crashing!..none! DoModal() doesn't even return. Anyways, i've narrowed it down. It crashes when i move trough folders in the CFileDialog window. And it doesn't really matter wich of the two buttons i press first.
|
|
|
|
|
This is just a complete guess, but how about commenting out everything after the DoModal() call?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
this was my last resort too but it still failed I'm putting this thing to rest and i'll get to it some other time... Maybe there's a problem with my computer( a virus or smth...don't know ). The problem is clearly in the CFileDialog class but i can't figure it out.
|
|
|
|
|
eusto wrote: The problem is clearly in the CFileDialog class...
To further verify that, use GetOpenFileName() instead.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I've used GetOpenFileName() and it behaves just the same
|
|
|
|
|
Nevermind, sorry for bugging you so much. I've recompiled the project on another machine and it works like a charm. I guess the problem is in my VStudio instalation or something...i don't know
|
|
|
|
|
Could somebody please advise me as to how to go about this problem.
I wish to compile a list of all the bookmarks stored on a given PC. The PC may have one or more browsers installed but the browser may or may not be installed in the standard "program files" folder. How is it possible to first determine if the browser is installed and then determine where it is installed?
The problem here is not reading the bookmarks, but rather finding them.
|
|
|
|
|
You can probably start by looking at the subkeys under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
|
|
|
|
|
To find the location of the default browser, use AssocQueryString() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
In my system some ports are blocked.How can i know which ports are blocked.Is there any solution to find the above problem.please kindly help me and Give me a solution.
#sanroop#
|
|
|
|
|
Sanroop wrote: In my system some ports are blocked
Blocked by who/what?
|
|
|
|
|
Blocked by Networkadministrator .That b;locked port required to find out programatically.
#sanroop#
|
|
|
|
|
The only way I know is using UPnP. The device blocking the ports needs to support UPnP and
UPnP needs to be enabled on the device. I don't know how many network admins allow this, since
allowing applications to open ports through firewalls and/or NAT devices negates the security.
This article may help:
Using UPnP for Programmatic Port Forwardings and NAT Traversal
[^]
|
|
|
|
|
what are the reserved resource IDs of MFC by frame work.
Warm Regards,
Mushq
|
|
|
|
|
What you want to achieve ?
Refer winuser.h for set of ids used by windows.
dialog command ids'
#define IDOK 1
#define IDCANCEL 2
#define IDABORT 3
#define IDRETRY 4
#define IDIGNORE 5
#define IDYES 6
#define IDNO 7
#if(WINVER >= 0x0400)
#define IDCLOSE 8
#define IDHELP 9
#endif /* WINVER >= 0x0400 */
Cursor Id's
#define IDC_ARROW MAKEINTRESOURCE(32512)
#define IDC_IBEAM MAKEINTRESOURCE(32513)
#define IDC_WAIT MAKEINTRESOURCE(32514)
#define IDC_CROSS MAKEINTRESOURCE(32515)
#define IDC_UPARROW MAKEINTRESOURCE(32516)
#define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */
#define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */
#define IDC_SIZENWSE MAKEINTRESOURCE(32642)
#define IDC_SIZENESW MAKEINTRESOURCE(32643)
#define IDC_SIZEWE MAKEINTRESOURCE(32644)
#define IDC_SIZENS MAKEINTRESOURCE(32645)
#define IDC_SIZEALL MAKEINTRESOURCE(32646)
#define IDC_NO MAKEINTRESOURCE(32648) /* not in win3.1 */
#if(WINVER >= 0x0500)
#define IDC_HAND MAKEINTRESOURCE(32649)
#endif /* WINVER >= 0x0500 */
#define IDC_APPSTARTING MAKEINTRESOURCE(32650) /* not in win3.1 */
#if(WINVER >= 0x0400)
#define IDC_HELP MAKEINTRESOURCE(32651)
#endif /* WINVER >= 0x0400 */
Icons id's
#define IDI_APPLICATION 32512
#define IDI_HAND 32513
#define IDI_QUESTION 32514
#define IDI_EXCLAMATION 32515
#define IDI_ASTERISK 32516
#if(WINVER >= 0x0400)
#define IDI_WINLOGO 32517
#endif /* WINVER >= 0x0400 */
#else
#define IDI_APPLICATION MAKEINTRESOURCE(32512)
#define IDI_HAND MAKEINTRESOURCE(32513)
#define IDI_QUESTION MAKEINTRESOURCE(32514)
#define IDI_EXCLAMATION MAKEINTRESOURCE(32515)
#define IDI_ASTERISK MAKEINTRESOURCE(32516)
#if(WINVER >= 0x0400)
#define IDI_WINLOGO MAKEINTRESOURCE(32517)
#endif /* WINVER >= 0x0400 */
#endif /* RC_INVOKED */
#if(WINVER >= 0x0400)
#define IDI_WARNING IDI_EXCLAMATION
#define IDI_ERROR IDI_HAND
#define IDI_INFORMATION IDI_ASTERISK
#endif /* WINVER >= 0x0400 */
|
|
|
|
|
These are WinUser resources. MFC resource IDs are located in afxres.h (which in turn includes also winres.h). You may want to check also the .rc files located in Platform SDK in ../mfc/src.
Nuclear launch detected
|
|
|
|
|