|
hi all, i am new to VC++. i want to write the out put of VC++ code in a notepad file, at a specific destination or alternative is that i want to write the output of a function in database.
kindly help me to achieve the task.
|
|
|
|
|
toufiq_raja wrote: hi all, i am new to VC++. i want to write the out put of VC++ code in a notepad file, at a specific destination
Your question is a little short on specifics, if you are using MFC then you can use the CFile class to write output to a text-file.
toufiq_raja wrote: alternative is that i want to write the output of a function in database.
What kind of database? SQL? Access? Oracle? MySql?
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
i am using the Oracle database. i need to write the out put in oracle database
|
|
|
|
|
that's very easy when you know how to use the standard library... (i consider you're using pure standard C++)
ofstream MyFile("C:\\myDir\\myFile.txt");
MyFile << "Hello world !!!";
MyFile.close();
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
sir i don't know the proper use of VC++.
i am a oracle developer. can u kindly send me an example of the code to write the out put in text file. what steps i have to follow.
which header files i need to include in the file.
regards
toufiq
|
|
|
|
|
ok, i already provided you a sample but if you don't know where to start, do this :
#include <iostream>
void main(void) {
std::ofstream MyFile("C:\\myDir\\myFile.txt");
MyFile << "Hello world !!!" << '\n';
int i = 5+4;
MyFile << "i = " << i << endl;
MyFile.close();
}
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 8:36 Thursday 17th November, 2005
|
|
|
|
|
i have run this code in VC++, but its not working
it contains errors
|
|
|
|
|
Hi to All
I am using PostgreSQL as my database. I am having one table called citizenphoto which contains cno and citizen photo as its fields. i have to insert images of citizens into that table through vc++.
For this i have derived that table to CRecordset object. and it is giving datatype for photo is CByteArray. when i am going to store image data of size more than 10K it is giving error as Data truncated. i have changed the size of that variable in DDX as 317000. But there is no use. Can anybody help me in this regard.
This will be so much helpful for me to go further.
Thanks in Advance.
|
|
|
|
|
I am working on a dialog based application where there are so many edit boxes.Now my requirement is that when the focus is in the first edit box & when i press the down arrow button,the focus(cursor) should shift to the next edit box(The tab order is already set in such a way that the focus goes to all the edit boxes one by one)..I had used the PreTranslateMessage() where i handled the VK_DOWN..Now here i have to write code for the shifting of cursor from one edit box to another edit box using SetWindowPos().I am not succeeded in completing this..So anyone plz help me!!
|
|
|
|
|
harish174 wrote: SetWindowPos().
Why SetWindowPos ? You do not want to move the edit box, only the focus, don'T you ?
harish174 wrote: should shift to the next edit box
Two possibilities here :
- the edit boxes are made at runtime, so you must have a pointer on them, so you may use:
pEditCtrl->SetFocus();
- the edit boxes all have ids.
GetDlgItem(IDC_NEXTEDITBOX)->SetFocus();
~RaGE();
|
|
|
|
|
You could also use GetNextDlgTabItem, this would mean that if you would change the tab order later using the resource editor, you wouldn't have to change the code as well.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
If you are working on a dialog box try using...
NextDlgCtrl()
This moves the focus easily to next item in the dialog box.
Owner Drawn
--Nothing special
|
|
|
|
|
Hi,
I am trying to extract data from word document to an edit box or notepad. I tried doing it usingIDispatch interfaces. i used other methods also. But the main problem is that i get certain meaningless characters in edit box after extraction.Perhaps this is due to the formatting characters in doc format. How can i get data from doc to notepad?
I am using VC++ 6.0.
Thanks in anticipation,
Ankush Mehta
Ankush Mehta
|
|
|
|
|
Ankush Mehta wrote: certain meaningless characters in edit box after extraction
If you are talking about small squares, maybe you should replace all "\n\r" by "\r\n" in the strings you are exporting.
~RaGE();
|
|
|
|
|
|
Please note that using any automation method will require Word installed on end-user PC. If this is not acceptable, I could suggest using some third party text extraction tools, such as wordcnv.com
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
hey..
I am having this warning
warning C4652: compiler option 'Generate Browser Info' inconsistent with precompiled header; current command-line option will override that defined in the precompiled header
kindly explain how to get rid of it
thanks
|
|
|
|
|
Try Rebuilding your application
|
|
|
|
|
If you would like to learn more about precompiled headers, check for
Mike's FAQ[^]
The browser info is a feature that allows you to jump to declaration and definitions of your variables/functions using the context menu in VC6.0++. It is created at compilation time, in Debug mode.
As for the warning, the other thread advice was the best : rebuild all. If this does not work, disable using pre-compiled headers. If this still does not work, disable the browse info generation in the compiler options.
~RaGE();
|
|
|
|
|
I have a domain (followings are not real info):
-------------------------------
domain name: mydomain.com
sub-domain name: www.mydomain.com
ip address: 111.222.333.444
server name: abc.myserver.net
-------------------------------
now I use CFtpConnection to read data from it:
I get exact the same contents with domain name, sub-domain name, ip address and server name.
========================================
Now I use
gethostbyaddr([param is ip addess]), or gethostbyname([param is server name: "abc.myserver.net"])
result: the host name is server name "abc.myserver.net" rather than my domain name.
(other 2 get my domain name).
Q:
is it possible to get my domain name by pass ip addess or server name as param to some function?
or: how to get domain name if only know server name or ip address and user info (name and pswd)?
I guess it is possible because I get the same contents of my domain. but how?
thx
includeh10
|
|
|
|
|
These API might help u
gethostbyaddr
gethostbyname
|
|
|
|
|
I've decided that the modular design of a DLL would be beneficial in a project I'm doing. I've read and followed the howto's and made the barebones DLL file and I've also read how to export data using __declspec (dllimport)/(dllexport). Like in the past, these howto's don't enhance my overall understanding, thus I am asking you, the reader. I've also read many different howto's to try and answer my own questions but each one seems to do things different from the rest so I don't have a clear picture of DLL's.
I'd like to create a DLL that takes in some parameters like a username or password and a couple other things, possibly download information from the internet, process the information, then be available for queries on that information once processed.
First, I don't see how I can "start the music" so to speak by initializing a class inside the DLL with data given to it.
Second, can I run the processing using a thread inside the DLL? The information to process takes 30 seconds on average and I don't want to hang the main app while it works.
If you can provide code examples even just as pseudocode, that would be much more informative than trying to explain it to me because I work best off of example.
|
|
|
|
|
Help me. I write a UDP/IP transfer file programe,but don't transfer,Who can help ? Please leave Email , i'll talk about with UDP/IP transfer file.
i use MFC c++
........
|
|
|
|
|
Post the part of the code where u r getting error
|
|
|
|
|