|
I think in the 'old days' a ^Z character used to signify the end of text in a text file, even if the file size was larger than that. So, when you had opened your file in 'text' mode, it read until it reached a ^Z (26) character.
|
|
|
|
|
.....glad to be of help!well yes like mr blake has said the ascii value 26 standz for end of file for a text file.....
it is there in the documentation of fopen(hmm.....i dont remeber where exactly i read it,i guess i read that from the turbo c++ version 3....they mention that in the note....yez!in turbo c++ doucumantation)!
God Bless.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
hi,
can any body tell me how to write code for programmin a serial port to communicate at low baud rates as we all know that
MS WINDOWS has API supporting upto 110 bauds ... nad we cannot use regular API to get speeds below 110 baud...
wat is the soln ...???
a sample code would b very useful
tx..!!
attitude is everything ... !!
|
|
|
|
|
I am trying to save the status of my toolbars in
the OnDestroy() funtion and restore it later.
I used first the toolbar SaveBarState("MyToolBar") but it didnt work
the way I was explained to.
Now I am trying to use a CToolBarCtrl object.
I made this call which made my app crash on destroy:
m_wndColorBar.GetToolBarCtrl().SaveState(HKEY_CURRENT_USER, "CustomApp", "ToolBarPos");
how to do it?
Thanks,
Odie
|
|
|
|
|
|
Thank you.
But I got one more questions that I could not figure out yet:
Do I have to have a SaveBarState funcion for each menu?
the online help tells me:
"Name of a section in the initialization file or a key in the Windows registry where state information is stored."
which name do I use as the argument to link to the right toolbar?
|
|
|
|
|
I think I've seen a SDK function that does this : adding a file path to the Windows/Explorer recently opened documents list.
At the beginning I thought I would find the answer quickly - it was in the morning - please, can someone give me the name of that function ?
Thanks,
Yarp
http://www.senosoft.com/
|
|
|
|
|
Have a look at SHAddToRecentDocs[^]
Gary Kirkham
Forever Forgiven and Alive in the Spirit
He is no fool who gives what he cannot keep to gain what he cannot lose. - Jim Elliot
Me blog, You read
|
|
|
|
|
I'm a complete idiot. I scaned the internet, the Add*, Update* Set* SDK functions and forgot to check the SH* ones.
Thanks a lot for the info,
Yarp
http://www.senosoft.com/
|
|
|
|
|
Hello,
Take a look at this[^]. It works fine for me.
But note when you use the code in the article that you do not need to override the CWinApp::OpenDocumentFile() function. I didn't and it still works. In technical note 22[^] it is said that it's better to leave that function alone.
Hope that this is what you are looking for.
I also got the blogging virus..[^]
|
|
|
|
|
Hi Bob,
I was looking for how to add a file to the Windows MRU. This is done with the SHAddToRecentDocs function as Gary told me - I did it this morning in my app and it works fine.
In my software I handled the MRU manually, since I also wanted to use the list for other purpose.
Thanks anyway.
Yarp
http://www.senosoft.com/
|
|
|
|
|
hi
I'm a student I developed a simple directx plug-in using vc++ 6.
it works fine but when I build the setUp prog using installShield ( the version included with vc++ 6 ) no directx application can recognize my dllplug-in.
this can be done manually after the installation using this command line:
Start -> Run -> regsvr32 ‘my_plug-in path’
how can I include this in my setUp prog so end-user does not have to do this manually?
thanx
Dennis
|
|
|
|
|
Hi,
I'd like to know if anyboby have implemented a project in C++ with mapi to navigate a outlook pst file that contains local folder's email.
Best regards
Lisa
|
|
|
|
|
How can set the printer resolution in my VC++ program without getting user input?
I don't want to use the windows defined dialog that allows the user to pick the resolution. The printer needs to constantly be set to 300 X 300 dpi. This is required to print reports. However, my program prints detailed line graphs and I need to change the resolution to 600 X 600 dpi only when printing my data.
I use:
CPrintDialog dlg(FALSE);
DEVMODE *settings;
//Get Printer diagnostics
if(!dlg.GetDefaults())
{
AfxMessageBox("dlg.GetDefaults() has failed");
}
//Sets printer resolution to 600 DPI
settings = dlg.GetDevMode();
settings->dmPrintQuality = 600;
But this has no affect. Am I missing something, or doing this completly wrong?
Thanks in advance
|
|
|
|
|
bk5151 wrote:
//Sets printer resolution to 600 DPI
settings = dlg.GetDevMode();
settings->dmPrintQuality = 600;
You need to call
ResetDC(PrinterDC,settings);//afterwards
where PrinterDC is printer device context obtained by call to dlg.GetPrinterDC() .
|
|
|
|
|
Thank you, I will try this out.
|
|
|
|
|
I tried this and it did not work. Outside of the print resolution all of my other print features work. So, I don't think that I have it set up wrong. Thank you for your help liquid
|
|
|
|
|
I am writing one application using DirectX in MSVC Visual studio6.0 if i have build my application and Run it using F5 and CtrlF5 the behaviours are different.
When i run my appllication in CtrlF5 mode it crashes (Access Violation)but this problem does not come when i run the same application using F5.
Any help will be appreciated.
Anil Kumar
|
|
|
|
|
when running in Debug Mode ( F5 ), most pointers ( AFAIK ) will be automatically initialized to NULL ( zero); and I also think that normal variables will also be initialized to some default values ( mostly 0 ).
make sure that you initialize every variables to some good default values.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi MAximilien,
So you mean to say that if Application is run ising CtrlF5 then some variables does take garbage value and may be the possibility of the crash.
Anyway thanks for the reply i will verify in my code all the pointers and variables to initialize NULL and 0s.
thanks
Anil Kumar
|
|
|
|
|
Hi, all.
I have an MFC C++ application which spawns a thread.
At some point the thread performs an XSL transform, but the CreateInstance function for the result node object fails.
HRESULT hr = pXMLOut.CreateInstance(__uuidof(MSXML2::DOMDocument40));
if (hr != S_OK)
TRACE0("could not create xml node");
The same code succeeds if run in the main application thread, is there some restriction for this?
Can it be overcome?
Thanks
Oscar
|
|
|
|
|
|
Hello,
I'm using the CSystemTray (MFC version) class from Chris Maunder and I have a small problem with the little icon in the system tray. Everything works perfect: the messages are routed fine, my popup menu is ok, my app minimizes and maximizes, there is a little square reserved for my icon, but the little problem is that I don't see my icon!?!?!
The behaviour is like when you make your icon completely transparent. You only see a background. I use the standard application icon (IDR_MAINFRAME). It has both the 16 bit and 32 bit version filled with nice colors, but my icon doesn't seem to show itself.
I also tried other icons, but they don't seem to work.
Here is the code that shows and hides the icon:
<br />
m_TrayIcon.AddIcon();<br />
CSystemTray::MinimiseToTray(this);<br />
<br />
m_TrayIcon.RemoveIcon();<br />
CSystemTray::MaximiseFromTray(this);<br />
Did anybody experiance the same problem?
I also got the blogging virus..[^]
|
|
|
|
|
The only thing I can think of is to make sure you are passing a valid HICON to CSystemTray::Create(). I can repeat the behaviour you see by passing NULL as the HICON parameter.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Thanks for your reply! The problem was that the call to ::LoadIcon() failed. I was passing an invalid HINSTANCE parameter. I now use the CWinApp::LoadIcon() which works fine.
I also got the blogging virus..[^]
|
|
|
|