|
I think you have to parse the command line passed to your application, it should (i think) have the full path to the file
HTH.
|
|
|
|
|
Yes, a reply to that article mentioned ParseCommandLine() which worked perfect.
Thanks.
|
|
|
|
|
Hi. I like the fact that doc/view does all the printing stuff for me, but it's the size of it on the printed page that's the problem. How do i make the data from my view bigger on the printed page? Right now it prints extremely small and it's unusable without a magnifying glass. This project i'm working on has a deadline so i need some help as soon as possible.
-- Steve
|
|
|
|
|
You can use different fonts, sizes etc. for printing to what is used for display. Just set the font into the CDC used for printing. Typically you would let the user choose the font they want to use. This is what I do in ED (see sig).
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
|
WM_CTLCOLOREDIT
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Are dump files the only way to debug what happened in release version crashes?
Man Learns from History that he never learns from History
|
|
|
|
|
Hello!
No. You can:
1) debug assembler code (hard thing)
2) use map files (rather easy thing - I have seen somewhere article on that here, on codetools)
3) use horror debugging - call messageboxes everywhere
4) use logging into file, or to some other process
5) turn off optimisation
|
|
|
|
|
If you don't mind releasing your app's symbols along with .exe, you can use PJN's excellent CExceptionLogger[^] class to generate a human readable log (customizable) that includes the source file and line number where the crash occured.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi Ravi,
Hadn't seen this code from PJN, thanks for pointing it out. He has contributed lots of nice and usefull code. As an aside you might be interested in my new app Surfulater (see sig). See the download page to get the beta.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
Surfulater looks very interesting, Neville! Good luck with it!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
would someone inform me of how to create a simple output box similar to that of VC++ 6.0 (where programs errors are detailed, etc). All I need it for, is just to inform the user that everything is OK otherwise detail the problem. I'm not writing a compiler, just trying to explain what I need.
Kind Regards
Caoimh
|
|
|
|
|
Hello!
As I understand, you want to create docked window in your own application?
You can look at:
http://www.codeproject.com/docking/prod_profuis.asp
http://www.codeproject.com/wtl/wtldockingwindows.asp
|
|
|
|
|
I need to attach a dialog to a single document application.
On the menu bar I want to go to view then 'Device Setup'. Once I click on the 'Device Setup' a Dialog should appear initialised with default values.
How would I do this. Suggestions are much appreciated
|
|
|
|
|
Hello!
Create new entry in resource editor in menu. By using class wizard create a method which will be called when menu item will be chosen. In this method instantiate dialog class instance, and call DoModal()
|
|
|
|
|
I am currently a student at uni and need to randomize where a set of nine graphics appear along a graphic. These have hotspots allocated to them, and are stored in a seperate file. Is it possible to use regions to offset the images, or am I bartking up the wrong tree?
I can offset the region to change where the hotspot is "located" but the original image needs to be offset aswell.
|
|
|
|
|
Hi, tried to search msdn and internet, but haven't found an article, how to display something (like how many unread mails user has) on the Welcome Screen of Windows XP. Thanks for any help ...
|
|
|
|
|
|
I have a class that represents a log file.
This class has two functions and a member variable
CFile m_file
First is StartLog conains code
m_file.Open(.....);
Second StopLog contanis code
m_file.Close();
And also there is a function AddEvent like this:
m_file.Write(.....);
m_file.Flush();
I call StartLog when my program starts, and StopLog when it exits. AddEvent is called several times while program runs;
It works fine mostly, but there is a problem:
File gets corrupted (it contains junk) when the program gets terminated incorrectly. For example when somebody has rebooted computer or terminates it via task manger. (Close() is not get called in this case)
Should I reopen and close file every time I need to write to it to ensure safety of the data???
|
|
|
|
|
Yes. Add code in the class destructor to close the file.
Kuphryn
|
|
|
|
|
I already did.
The problem Is that when the program is terminated incorrectly, the garbage appears inside a file sometimes....
You see, the Close() is not called in such a case
|
|
|
|
|
Yeah.
The only solution is to analyze the file as the program opens it. Do CRC check or simply calculate the bytes and remove all extra data.
Kuphryn
|
|
|
|
|
M A V wrote:
The problem Is that when the program is terminated incorrectly, the garbage appears inside a file sometimes....
If you manually open the file in append mode, write to the file, and then manually close it every time then you are unlikely to experience the corruption you are talking about.
The only way it could get corrupted is if the system were incorrectly shut down during the few milliseconds that the file were open.
|
|
|
|
|
Is there a way to get the position of the users mouse, and/or move the cursor to a selected part of the screen in MFC? Any help would be appreciated.
-Dev578
|
|
|
|
|
GetCursorPos, SetCursorPos
modified 12-Sep-18 21:01pm.
|
|
|
|