|
Thanks for suggestion, I didn't know that unhandled exceptions are making this.
I'm not using exception handlig, it seems to be much more difficult to use than good old return value errors.
I'll try to make some TRY CATK on whole function
rrrado
|
|
|
|
|
if it was an exeption, you should have the error message like this : unhandled exception 0x...... at....
TOXCCT >>> GEII power
|
|
|
|
|
That's what you get under the debugger. In a release build running alone using VC7.1 you get a message box containing,
"Runtime error!
This program has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information"
Paul
|
|
|
|
|
no, the message i described was a Windows generated messageBox...
TOXCCT >>> GEII power
|
|
|
|
|
Yes but it only appears if visual studio is intalled on the computer (because it asks you if you want to debug the code).
|
|
|
|
|
hiiiiiii
can anybody telll me how can i pick the RGB value from an image on "onMouseOver event" and how can i show them in edit boxes.
|
|
|
|
|
Try to get your control's device context and use GetPixel()
rrrado
|
|
|
|
|
GetRValue, GetBValue and GetGValue are used to get the color from the return value of GetPixel()
Don't try it, just do it!
|
|
|
|
|
thanx Alexander
canu give me the code so that it will help me alot coz i m a bit new to VC++
its a bit urgent dear.
waiting for ur reply
thanx again
bye
regards
tahir
|
|
|
|
|
Hi,
I have a question regarding reading and writing to the same (text)file. I know it is not Visual C++ (just C++) but I still hope someone will respond.
I have a project which I run from the command promp. The same exe file is run twice, with different parameters sent to the main() function, so that I have two dos windows open at the same time.
Below P1 is the first program and P2 the second program.
P1 output file is P2 inputfile and vice versa.
P1 reads a line with cin and then output it to a file. P2 does the same.
Everything works fine so far but...
...the question is how I would code a loop so that P1 reads a line from P2 output file with i.e. getline() until the textfile is updated(changed) by P2 and ONLY then print it out on P1 screen and vice versa???
This might seem to be a stupid program but it is for studying purpose.
Thanks in advance for any hints or solutions
Regards
Lars
|
|
|
|
|
I've never tried it, but I'm sure that there's some function in windows API which will setup notifications for you when choosen file is changed.
(most of the editors use this to reload the file when it's modified outside the editor,
maybe you would find this in wordpad sample soure code)
rrrado
|
|
|
|
|
But I think better way to send data from one program to another is using the pipe (p1.exe | p2.exe - stdin of p2 is connected to stdout of p1), but I've tried this only in unix, I'm not sure how will this run in Win)
rrrado
|
|
|
|
|
rrrado wrote:
I'm not sure how will this run in Win
In much the same way. See these two MSDN articles for examples:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp
http://support.microsoft.com/default.aspx?scid=kb;en-us;190351
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thanks for the suggestions!
Lars
|
|
|
|
|
Hi, I have a peculiar problem ! I'm developing a specialised backup facility which uses formatted CD's (created by Adaptec DirectCD) as the backup medium. I am testing the program as the CD reaches it's limit space-wise. Naturally, I test the available space on the CD using GetDiskFreeSpace() and compare it against the file size using CFile::GetLength() before embarking upon the write (using CFile::Write()) for that particular file. However, BEFORE I hit failure on the size comparison,I get an exception (diskFull) during a write operation. i.e.
CFile exception: diskFull, File E:\C\Data\Clipart\Christmas\Candle and holly.bmp, OS error information = 112.
First-chance exception in MyBackup.exe (MFC40D.DLL): 0xE06D7363: Microsoft C++ Exception.
However, using Explorer AFTER the event, I find that the free space on the CD is VASTLY greater than the size of the file being written at the time of failure (eg 300Kb vers 32Kb). If I rerun the backup (which SHOULD occur in the same file order), I get the failure in a different file (VERY suspicious,don't you think ?) I'm stumped as to how to persue this problem - can anyone make any suggestions ?
Doug
|
|
|
|
|
You cannot write on CDs directly like this, i wish we could
Search for some CD writer API
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
why E: should be a "CD reader". i personnaly have 3 hard disks where two of them have two partitions...
C: , D: , E: , F: , and G: are HDD for me !
TOXCCT >>> GEII power
|
|
|
|
|
Because you didnt read his post, you just wanted to answer
He said
"Hi, I have a peculiar problem ! I'm developing a specialised backup facility which uses formatted CD's (created by Adaptec DirectCD) as the backup medium"
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
ok ok.
but if directCD is intalled, it permits to do so, no ?
TOXCCT >>> GEII power
|
|
|
|
|
Apparently no, unless it exports some API that he can use
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hey guys, Adaptec DirectCD allows you to read and write files to a formatted CD just like you would to any other disk - it DOES work !!! (DirectCD is used to format the CD - not the normalformat.com) Anyway, the REAL problem is the disk full situation, where it clearly isn't.
Doug
I still haven't had any suggestions about identifying the cause of this problem, so I have taken the defensive route !! I made the last 5Mb a "no-go" area when checking the CD free space. This seems to work O.K. (Being a curious sort of person, I'd STILL like to know the reason why I've hit this problem). Hope that this will be of some help to anybody who has this problem in the future !
|
|
|
|
|
I need help!
1)In visual C++, how do i input a string of characters and then print it back out once it reaches a certain character and replacing each double space by a single space.
2)write a program that prints its input (up until it reaches the EOF character) one word per line.
3)Write a function that times a with b, and b with a when the user enters the numbers.
4) using a function, a program to remove trailing blanks and tabs from each line of input (up until it reaches the # or EOF character), and to delete entirely blank lines
please email me: JonesAnd5@hotmail.com if you can help!
|
|
|
|
|
We do not do homework
|
|
|
|
|
|
toxcct wrote:
"We don't do homework" is quite a great answer ... too bad, it was posted as an anonymous...
What difference does it make how it was posted? It's factual regardless.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|