|
sir
i am using
while(fileObj.ReadString(strLine));
and i have already created file with fname .
problem is that writing data upon new file .
Regard's
Kaushik
|
|
|
|
|
On your code you open fileObj for write and also on the loop you want to read of it?
|
|
|
|
|
if we using below code
filewrite.Open(str,CFile::modeCreate | CFile::modeRead);
strLine.Empty();
while(filewrite.ReadString(strLine))
{
filewrite.WriteString(strLine);
fname += strLine + "\r\n";
}
filewrite.Close();
MessageBox(fname);
There is again same problem
Regard's
Kaushik
|
|
|
|
|
You read and write to same file instead you said I read of a file and write to other file did you check your code?
while(filewrite.ReadString(strLine))
filewrite.WriteString(strLine);
|
|
|
|
|
Y_Kaushik wrote: while(fileObj.WriteString("strLine,buffer"))
What is this line doing? WriteString doesn't return a value.
What exactly isn't working properly? What is the format of the data in your buffer?
Mark
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Hi all
i have developed an MFC application using VS 6.0
The problem is, the .exe is working fine on a system and its not stable on other system(its crashing).
On both of the system VS 6.0 is not installed. I copied the required MFC dlls manually to the WINNT/System32. There may be memory leaks in my application, but the systems are of same configuration ( 1 GB RAM, P4 3.2 GHZ CPU...), I should get the same results on both of the machines. Please suggest, where it might go wrong?
Thank you.
Ramana.
|
|
|
|
|
Did you get any errors? can you more explain about your program?
|
|
|
|
|
The application is a Client, When i perform any operation on Server, the changes should reflect at the Client. I used WinSock 2.2 version for implementation. The server is same, in both the cases. When i run the Server and Client on Machine1 everything is fine. But, when i run the Client Program Macihne2, Client program is crashing. A message is shown saying "The application requested the runtime to terminate".
|
|
|
|
|
does anyone know how to send email with attachment using c code?
|
|
|
|
|
|
Thank you verymuch. i need it for c programming not vc++.
|
|
|
|
|
As mail is system dependent, the chapters are perfectly useful. There may be a class or two in use, but you can just dig out the API calls used - and they are C.
You can even do COM from C if you're masochistic. Only a few months ago there was a a series of articles showing COM using C.
Iain.
|
|
|
|
|
hi all,
I have a window that is initially hidden. After some time i need to pop this window after i have completed downloading some contents. After the window is popped, if i click on any otehr window then this should loose its focus. How can this be achieved?
I tried using SetWindowPos(&wndTopMost,....). But this failed as the window is displayed always on top( the focus is never lost) which is not my requirement.
Also i tried SetForegroundWindow() function, but this also displays the window on top always.
SwitchToThisWindow() call is advisable as per MSDN forums.
How can this be overcome?
Sunil
|
|
|
|
|
|
Thanks. What you told is right. But the thing is loosing the focus is not enough, i sould also make the other window clicked by the user visible. Setting SetWindowPos with HWND_TOP doesn't help as the window is shown on the taskbar alone nad not displayed to the user.
Its something like a pop-up window that sould be displayed, when we browse any web.
Requirement is: Pop the main window after some content is downloaded. If the user clicks on any other window, the main app window should go to the background.
Sunil
|
|
|
|
|
sunilpv1982 wrote: Setting SetWindowPos with HWND_TOP doesn't help as the window is shown on the taskbar alone nad not displayed to the user.
Have you used the SWP_SHOWWINDOW flag with SetWindowPos ?
SetWindowPos(HWND_TOP, ......., SWP_SHOWWINDOW);
MSDN Docs on SetWindowPos[^]
If this doesn't work then try
ShowWindow(SW_SHOW);
MSDN Docs on ShowWindow[^]
Hope this helps
---
Hakuna-Matata
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
Yes that is also done. But again in vain....
Sunil
|
|
|
|
|
sunilpv1982 wrote: Yes that is also done. But again in vain....
Well now I am not really sure as to what the problem is. Are you positioning the window in the visible area of the screen? If possible, do post some code so that we can debug what the problem really is.
---
Hakuna-Matata
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
in vain how? What is/isn't happening?
HakunaMatada's example should work, although I would try with the SWP_NOMOVE and SWP_NOSIZE flags
to make sure you're not resizing and/or moving your window to an "invisible" size/location.
Something like this:
::SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
Mark
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Is the window a child window?
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
its a dialog based application.
Sunil
|
|
|
|
|
For my application I want to have a button inside a CEdit control. Since I am not a MFC expert can somebody tell me if and how this can be done?
Thanks!
|
|
|
|
|
|
|
Meindert2 wrote: For my application I want to have a button inside a CEdit control. Since I am not a MFC expert can somebody tell me if and how this can be done?
Learn[^] how to do this.
|
|
|
|