|
This is typically caused by a previous error that went undetected. Possible errors are:
- deleting one memory location twice
- deleting an "invalid" pointer
- writing outside the boundaries of allocated memory
was the memory allocated with new[] or with new ?
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
This happens if you corrupt the heap, use the wrong pointer or delete the object more than once. I think if you write anything at ptr[-1] you will corrupt the lenght of the allocation and cause a crash...
John
|
|
|
|
|
Hi,
DOes anyone know how to capture the screen output, and write that to the disk (as AVI,or something else). I need to build an application wich records all the user interactions, it must also be hidden. It has to work like HyperCam (commercial program for this purpose).
It must work under win2000 (other systems are also OK).
Can anyone help me?
|
|
|
|
|
Hi,
Look at the
http://www.techsmith.com/download/devtoolsdefault.asp
Probably they will pay me for advertising LOL
Vitali
|
|
|
|
|
Hi,
Thanks Talik, for helping me.;)
But don't you know a version of this(or similar) software which is opensource?
|
|
|
|
|
is there a simple way to do this or am i gonna hafta write my own function?
|
|
|
|
|
Hi,
Try look at the MSDN "is, isw Routines"
This is very simle way.
Vitali
|
|
|
|
|
it would seem that those are for single characters im looking for something that tests an entire CString :P
|
|
|
|
|
also is there an easy way to convert a CString into an int?
|
|
|
|
|
CString str(5);
int n = _ttoi(str);
|
|
|
|
|
In this case read MSDN "Data Conversion Routines" such as atof, atoi, atol...
Vitali
|
|
|
|
|
Well, loop through for every character then. There's no single-function to do it
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Actually there is!
CString::FindOneOf("AllTheCharactersThatAreNotNumbers...");
It's not the best way to do it, but it is possible
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
|
I didn't even thought about UNICODE .
There are 2 proper ways you can solve this problem:
1) Write your own function
2) Just convert the string using atoi (or some other function) and check the return value
If time wouldn't be a problem I would write my own function...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hi,
I'm writing a tile-based arcade game for Win2000, no Directx, 24-bit screen depth and since I do some paralax scrolling requiring a lot of transparent blits, I have performance problems. As I think 256 colours would be enough for my application, I'd like to know if it is a good idea to create only 8-bit back buffer in memory and then blit it into 24-bit windows screen. Or, maybe have 24-bit back buffer and blit in 8-bit images. Would this speed-up my program?
Koxin
|
|
|
|
|
You may find this useful function in my CSkinProgress component at : http://www.codeproject.com/miscctrl/CSkinProgress.asp
Output bitmap : a bitmap created but NOT initalized
Input bitmap : your 8-bits bitmap
CDC : None to convert in the current DC, or a 24-bits compatible DC
The best is to include the CSkinProgress in your project (you might use it for various purposes ), then create a CSkinProgress object and use its CSkinProgress::ConvBitmap(...) function for your own purposes !
Kochise
In Cod we trust !
|
|
|
|
|
How do I convert a binary file to text file..?
Is there any API or any method by which I can achieve this...
Pratz
|
|
|
|
|
Hi,
some questions:
Is it realy a binary file? (you can't read anything if you view this file with e.g. Notepad). It is also possible, that you can read something with notepad, e.g. if you open a Worddocument as text file.
What type of binary file is it?
If it is realy a binary file, than you must know the coding rules (the same for decoding) for this type of file.
Regards
Frank
|
|
|
|
|
I'm not sure what you want to do, but anyway the difference between binary and text files is that text files are actually subgroup of binary files. That means that bytes (characters) in text files have only certain values specified in ASCII table (e.g. 'a' has a value of 97, 'b' 98, ...) while bytes in binary files can have any possible values (0-255).
Thus if you want to display a binary file in a text editor all you need to do is replace all non-ASCII characters with ASCII characters. Then the text editor will not find any character it can't deal with in the file and will consider it to be a text file.
Koxin
|
|
|
|
|
Sorry, it may be a old question, but i couldn't found it !
My mean is very simple, i want my program can hook Right click event and get the text under mouse pointer .
Any one can help me ?
|
|
|
|
|
Are you talking about a window in your own program, or any window of any program?
The second is almost impossible, because the user could be right clicking over anything, not just text, and even if he did, you would have no way of knowing it.
If you want to hook into system wide mouse events, I've heard of that being done, how you would find out what window owns that mouse event or has text, I'm not sure.
|
|
|
|
|
Sorry !
My mean is anywhere, any program ( IE, Office,....),
i've see some program can do that , ah , i'm a vietnamese, we have a good English- Vn e-dictionary is
" Just Click'n'See" that can get a English word from screen and display it's Vetnamese mean ! It's so cool !
So i'm want to know the beside tech of it !
|
|
|
|
|
Even though MartinOrtriz replied to your post, you can read the answer in the FAQ page here [^].
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
____________
4.14: How do I retrieve the text that the mouse cursor is pointing at? (top)
There is no built-in way to do this. Once the text is on the screen, it is no longer readable as a character string, only as a bitmap. You'll need OCR (optical character recognition) software to transform the bitmap back into a string of characters.
______________
Ofcource, there is no built-in way, but it's not a mission possible, try download this program and feel it
Just Click'n'See
thank !
|
|
|
|