|
Naveen R wrote: removed the this pointer. Still the exception is ocurring( Actaully this code will work fine in simple mfc application. I have even tried this in an ocx )
I expected the above behaviour. I was curious about...
Naveen R wrote: I know the current code will not do sorting. Just for making the code shorter i have removed the comparision codes.
Maybe the bug it is in the not-posted code!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
no no
Even the code that I posted causes exception. Simply returning the 1 itself is causing the exception.
nave
|
|
|
|
|
IMHO this may happen 'cause you function isn't good for ordering.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I got the pblm solved. I missed the "CALLBACK" in the function declaration.
Thanks anyway
nave
|
|
|
|
|
Good Point!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Didn't get time to look into your code. Will do soon.
|
|
|
|
|
Hi Nibu,
pblm solved. The pblm was I didnt put the "CALLBACK" in the function declaration. Thats all.
Thanks anyway.
nave
|
|
|
|
|
Naveen R wrote: The pblm was I didnt put the "CALLBACK" in the function declaration.
Hmm Nice fix.
|
|
|
|
|
Hi,
plz help me...i want to make an application in which i want to Show Different desired row color in List Control using CListCtrl class member.but i'm unable to get the same result.plz help me on my application.
Thanks in advance
Pankaj Jain
|
|
|
|
|
I think you need to handle the custom draw( NM_CUSTOMDRAW) in list control.
nave
|
|
|
|
|
|
|
I need small suggession on designing my application.
I have a dialog. On clicking a button on dialog calls a thread which copies some files from one location to another specified location on the local system. Now i want to show the copying status of that files in another dialog like windows os shows while copying.
How to accomplish this.
Should I call another thread showing the dialog and details from the dialog.
What is the better process.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: Should I call another thread showing the dialog and details from the dialog.
Yes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Do you really have to spawn a new thread for this?
It depends on how you want your application to react, but you haven't said anything about that yet.
What I'm thinking about is this:
Your dialog box receives some user input that presumably is used for starting the copying process. When the user desires to start the copying process the dialog could probably be dismissed, or simply create another dialog on top of the first one to handle progress information about the copying process. Call ::CopyFileEx() and provide a function pointer to a callback that will be called for updating the progress of the copying process for each file. Inside this callback you can update a progress bar or whatever information you want to show the user.
When the last file has been copied you simply close the progress information dialog and revert to the old dialog, or whatever GUI is beneath it.
This will keep everything in one single thread, the files will be copied and the user notified about the progress.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I have created a class that encapsulates the open session, open request, send request, read response until buffers are empty and the closes the connections. When I create the first instance, everything work perfectly. I then destroy the object and create another object. This time everything seems to be working fine until the code hits the HttpSendRequest routine. At this point it hangs and never returns. All routines and parameters before the call were successful and had valid values. I have noticed a number of other posts related to this but not answers. Any ideas? pls help me
-- modified at 2:51 Friday 25th May, 2007
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
What are different form.h and form.hpp???
|
|
|
|
|
ashost07 wrote: What are different form.h and form.hpp???
here[^] are some answers.
|
|
|
|
|
How to rasie a exception that can only be caught by __try/__except, but cannot be caught by try/catch?
In a Windows application written by VC. What time to use structured exception instead of C++ exception?
|
|
|
|
|
In standard C++ try /catch can only catch C++ exceptions: that is only exceptions that are raised by the C++ throw statement. Unfortunately some version of Microsoft Visual C++ (6.0 and below) do not follow the standard in this regard. This was fixed in later versions but the old non-standard behaviour can be selected with the /EHa[^] switch (not a good idea in general).
__try /__except is a low level construct and can catch any exception. Note however that with __try /__except the destructors of objects on the stack as it is unwound are not called, so this construct doesn’t play nice with C++. It will break the RAII pattern for example.
To explicitly raise a C++ exception use the C++ throw keyword.
To explicitly raise an exception (not a C++ exception) you have two options:
1. Do something wrong! For example to raise a divide by zero exception try to divide by zero; to raise an access violation attempt to access an invalid memory location.
2. Use the Win32 RaiseException[^] function.
Steve
|
|
|
|
|
Stephen Hewitt wrote: so this construct doesn’t play nice with C++.
Excellent reply. Where were you when I learned that the hard way?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
But in my testing program, all kinds of exceptions including zero-dividing or NULL pointer can be caught by catch(...). Why? Does that mean we can always use C++ try/catch in C++ programs?
|
|
|
|
|
Lane Yu wrote: But in my testing program, all kinds of exceptions including zero-dividing or NULL pointer can be caught by catch(...). Why? Does that mean we can always use C++ try/catch in C++ programs?
As my previous post indicated, the fact that you can use try /catch to catch NULL pointer references and zero-dividing indicates that:
- You're using an old and non-standard compiler such as Microsoft Visual Studio 6.
- You're using a compiler with a non-standard extension with enables this non-standard behaviour; such as the later Microsoft compiler's /EHa switch.
In standard C++ try /catch can NOT catch these exceptions!
Steve
|
|
|
|
|
Thank you. I'm using VC6.
|
|
|
|
|
I have developped a software. Now I need to make a setup file. I have used "Visual Studio 2005" to created a setup file. But it needs to install "Framework 2.0" when the user install it, it is very inconvenient.
Does anybody know some other tools to make it?
Thanks a lot.
|
|
|
|