|
mac_g wrote: what is the command...
There is no single command to do this. It will all depend on what type of variable you are reading the line of text into (e.g, CString , string , char ).
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I developed an MFC SDI application.I need to provide multimonitor support for my application.
Can any body help ...me on this issue..
Thanks in Advance,
Ashok.
|
|
|
|
|
ashokbngr wrote: I need to provide multimonitor support for my application.
Is this your requirement or your issue?
(just joking...)
- ns ami -
|
|
|
|
|
|
Thanks for the information..
If I move my application to another monitor..How to get and set the coordinates of the monitor( I mean at (0,0) location of the other monitor).
Thanks in advance,
Ashok.
|
|
|
|
|
|
Thanks Randor ..for the information.
I will try to fix..with the same..thanks a lot
|
|
|
|
|
|
Seems this is not a Windows Native API. Link with the particular lib file contains definition for the function. and also make sure that it has built using 64 bit compiler.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
modified on Monday, February 2, 2009 7:01 AM
|
|
|
|
|
Hi,
I want to append line to file i tried like this:
CString strNewWord (_T(" Test line to write"));
CStdioFile file;
file.Open(strSystemPath,CFile::modeWrite|CFile::modeNoTruncate,NULL);
file.SeekToEnd();
CString strWriteData("\\n ");
strWriteData+=strNewWord;
file.WriteString(strWriteData);
file.Close();
this code appends data but in single line (assume no compile time errors):
\n Test line to write\n Test line to write\n Test line to write
I want like this:
Test line to write
Test line to write
Test line to write
|
|
|
|
|
CString strNewWord (_T(" Test line to write"));
CStdioFile file;
file.Open(strSystemPath,CFile::modeWrite|CFile::modeNoTruncate,NULL);
file.SeekToEnd();
CString strWriteData("\n ");/*(Here you ve gone wrong no need to give "\\n" for a new line just "\n" is enough)*/
strWriteData+=strNewWord;
file.WriteString(strWriteData);
file.Close();
Use this code this will be working .
Thanks & Regards
VIJITH VIJAYAN
|
|
|
|
|
You were answered a few lines down.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
I am displaying an image in the internal web browser but as the image resolution is high, horizontal and vertical scroll bar are displaying. I want to display the image fit to the browser ie image resolution will be compressed according to browser size.How is it possible?
Note: I am using VC++6 and ActiveX control.
|
|
|
|
|
Are you using Internet Explorer as your browser component?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
I am using WebBrowser2. It is added by using Microsoft Internet Explorer added from ActiveX control.
|
|
|
|
|
Hello,
I want to link my application with a file extension.
I already make it works, but each double-click on a my file make a new instance of my program.
It is possible to make an unique session and get a windows message or else to open my file as i want to?
My project is a CDialog based.
Thanks.
|
|
|
|
|
There are many ways of doing it - searching for "single instance" on CodeProject will yield several articles - here's one[^] for example.
|
|
|
|
|
Member 4020995 wrote: It is possible to make an unique session...
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I've found everything i need, and it works just fine
Thanks to your both answers.
|
|
|
|
|
hi guys,
i am developing a simple worm scanner using VC++ 2008 pro. when the user click on scanning type ( Lets say Auto Scan ) from the main form, the program need to open the auto scan form. My question will be how can i close the main form and open the auto scan form.
i added the button to be click but i dont know the command to close current form and open the autoscan form. i try to use system::windowsform::autoscan; but its showing system is not declared and i added using namespace System to the .h file. yet its showing systme does not exist in namespace.
Kindly help me please.
|
|
|
|
|
Closing the main form ends the process.
So I would recommend hiding the main form and then showing the sub form.
After the sub form is closed you can either show the main form or close it.
«_Superman_»
|
|
|
|
|
but how to call the sub form.. i having problem with calling the sub form.
Thank you.
|
|
|
|
|
Have look at the following discussion from a few days ago:
http://www.codeproject.com/script/Forums/View.aspx?fid=1647&msg=2898321[^]
The actual question took a little decoding, but hopefully the answers will help you a bit!
They're based on MFC's CDialog, but hopefully the approach will help you.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
i am facing a new problem now...
void Spartamenu::OnBnClickedCancel()
{
// TODO: Add your control notification handler code here
//OnCancel();
}
even after i disable the onCancel and run it. when i click on the button its still closing the application.
________________________________________________________________________
void Spartamenu::OnBnClickedButton1()
{
// TODO: Add your control notification handler code here
CDialog::SetTimer(IDD_AUTO,1,NULL);
}
for open a subform i use this command but when i click on it nuthing happen...
i am so confused.. kidly help me plz ya..
|
|
|
|
|
OnCancel and OnOK are slightly special - other commands need to be in the message map, but not for IDOK / IDCANCEL.
If you look in the documentation for CDialog::OnCancel, you'll see that it is a virtual method.
So, override OnCancel, and make it do nothing.
ie:
void SpartaMenu::OnCancel ()
{
}
I do this for my modeless dialogs - in fact I have an overriden base class for them all (CModelessDialog ) that does this, so I don't have to remember each time.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|