|
Yes I know. But there is a security issue with functions like sprintf and so on... And here, for once, I agree with Microsoft that you should use a more secured version, even if it's not in the C++ standard.
|
|
|
|
|
Dear all,
I have a MFC project which initializes the webcam(if available) and capture video. But i need to use this with a website. So i need to convert this into the ocx application.
Could you anybody help me on how to do this? Plese show me some tutorials or guide me in step by step.
Thanks in advance
|
|
|
|
|
Member 3419253 wrote: or guide me in step by step
do you want guidance in creating an active x control in vc++6.0?
|
|
|
|
|
yes. i need guide lines.
I f you have any sample applications please provide me
|
|
|
|
|
Please help me to convert the Dialog based MFC application into the ocx application in order to provide that into the web site.
Thanks in advance.
|
|
|
|
|
i have 2 files.. want to merge this file...
say the format will be like this
file 1.
how are u
and file 2 contains
doing there?
so the result has to be
how are u doing there?
how can u do this?
|
|
|
|
|
You don't talk about what happens if the file contains multiple lines. How is the resultant file displayed then.
However, can you specify what is the real problem. Here is the algo:
1> read from 1st file
2> read from 2nd file
3> concatenate the data and write it in one go or write it one at a time as soon as you get it [for this use seek()]
4> Close files.
I hope I understood you correctly.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yes i have understood that..now what happens when u have multiple lines??
first file:
12.345 13.546 45.65 ...n
and the second file
34.56 75.35 78.35.... n
in this the its not text. its values. how can i merge it?? the same way u told me?
|
|
|
|
|
Chandrasekharanp wrote: in this the its not text. its values.
Actually it IS text. You can read the values, so it means that it is text.
Chandrasekharanp wrote: how can i merge it??
That really depends a lot on how you want to merge them. Do you need to sort the values while merging, or appending the second file to the first one is good enough ?
|
|
|
|
|
adding the second file to the first one is fine with me.. there is no need of sorting the values.
|
|
|
|
|
will this work for you?<br />
FILE *fp1,*fp2;<br />
fp1=fopen(mergedfile,"wb");<br />
fp2=fopen(file1,"rb");<br />
while(1)<br />
{<br />
fread(&data,1,1,fp2);<br />
if(feof(fp2))<br />
break;<br />
fwrite(&data,1,1,fp1);<br />
}<br />
fclose(fp2);<br />
fp2=fopen(file2,"rb");<br />
while(1)<br />
{<br />
fread(&data,1,1,fp2);<br />
if(feof(fp2))<br />
break;<br />
fwrite(&data,1,1,fp1);<br />
}<br />
fclose(fp2);<br />
fclose(fp1);
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
Hi Everyone,
i am creating tables in Microsoft Access database.i want to use this database into my program. So how shall i connect database into my program.
Please Help me out wt is the procedure.
Thanks in Advance,
savitri.
|
|
|
|
|
Use CDaoDatabase class of MFC.
|
|
|
|
|
|
|
See if this example helps.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
here is an example for open and read a database *.mdb. Hope is helpful...
CString File = "database.mdb";
COleVariant var;
CDaoDatabase *db = null;
CDaoTableDef *TabDef = null;
CDaoRecordset *rec = null;
try
{
db = new CDaoDatabase(NULL);
db->Open(File, FALSE, FALSE, _T(""));
TabDef = new CDaoTableDef(db);
TabDef->Open("TABELLA1");
rec = new CDaoRecordset(db);
rec->Open(TabDef, dbOpenTable, 0);
rec->MoveFirst();
while( !rec->IsEOF() )
{
rec->GetFieldValue("CAMPO1", var);
rec->MoveNext();
}
rec ->Close();
TabDef->Close();
db ->Close();
}
catch( CDaoException* e )
{
GestErroriDAO(e, db, TabDef, rec);
e->Delete();
}
delete rec;
delete TabDef;
delete db;
|
|
|
|
|
Did you search on the codeproject?
|
|
|
|
|
i created a modeless dialog box to my network application tool
when i right click on objects and opening the dialog box it is creating in a new seperate window plz help
i created like this
m_pEditPersonalityDlg->Create (IDD_PERSONALITY_DIALOG, AfxGetMainWnd());
|
|
|
|
|
Have a look at the dialog's styles in the resource editor. Have you told it to be a child window? And you may or may not want to change the border style as well.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
ya irain its a chaild window i checked in resource editor style is pop up and border is dialog frame
if i keep style as child its not working its creating differently
i.e back side of the main app
|
|
|
|
|
Hi,
Also try using AfxGetApp()->m_pMainWnd instead of AfxGetMainWnd().
thanks ,
Nitheesh
|
|
|
|
|
No Niteesh not working with that same result
its unsolved problem for me since long time
|
|
|
|
|
girishchi@gmail.com wrote: ...it is creating in a new seperate window...
Instead of what?
The owner of a window is not necessarily the same as its parent. See here for more.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ya i got it we have to add setparent function in OnInit function
|
|
|
|