|
This[^] and This[^] will help you to do what you want.
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
keerthikaaa wrote: have a problem.when ever i resize the dialog,i would like to have the controls to be resized in respect to the size of the dialog
Handle WM_SIZE message or OnSize(...) message in your Dialog Class
|
|
|
|
|
Hi keerthikaaa,
Do you want to keep previous size?
|
|
|
|
|
hai
when ever i resize the dialog,the controls which are placed on that are to be resized so that no change in the appearence of the dialog will be there.
otherwise the controls will be placed at one side of the dialog and the rest of the diaolgs space looks empty which doesnt give a nice look
|
|
|
|
|
keerthikaaa,
oh yes,
well (ThatsAlok wrote WM_SIZE) yes this is a way.
you can declare this event and then use variable of controls with movewinodw in function
|
|
|
|
|
WhiteSky wrote: with movewinodw in function
and SetwindowPos too
|
|
|
|
|
how can I get the full process name in kernel, then one returned by the GetModuleFileName ?
any ideas ?
The EPROCESS structure has a member called ImageFileName but it is just the base name
gabby
|
|
|
|
|
Hi,
I'm new to MFC, my question is how to get a pointer to CDocument in a non CView class?
For example in a docking window or a CDialog.
|
|
|
|
|
Jim Jim wrote: I'm new to MFC, my question is how to get a pointer to CDocument in a non CView class?
Simpler solution to declare the global Pointer to document class and access that in your Non View Class
|
|
|
|
|
The best approach is to use something like the following:
CMyFrameWnd *frame = (CMyFrameWnd *)AfxGetMainWnd();
CMyDocument *document = frame->GetActiveDocument();
Software Zen: delete this;
|
|
|
|
|
Hai to all,
I would like to know how an AfxBeginThread function works for staring a thread.i have gont through the msdn help.But being a starter i couldnt get that syntax properly.so help me to know about that function in a clear way about what it doing and what parameters are used in that function.
|
|
|
|
|
|
Hi,
I want to develop a Network Monitor and filter(for Windows Platform) as my final project in Visual C++
( either in MFC or Win32)
so does anyone know from where should i initiate??
That is what APIs need to learn ?
what SDKs i need to download ? e.t.c
so please help me bcause i am running out of time ,please kindly acknowledge my message...
Thank You
The Only Way To Get Smarter is By Playing Smarter Opponent
|
|
|
|
|
ntimesc wrote: what SDKs i need to download ? e.t.c so please help me bcause i am running out of time ,please kindly acknowledge my message...
try this libaray WinpCap[^], it provide ready made solution to your problem
|
|
|
|
|
thanks 4 replying me
but this project i also want to submit in Microsoft Acedmics Projects , so i aksed them for WinCAP but they said you can't use that (third party) library..... so do u have another solution
The Only Way To Get Smarter is By Playing Smarter Opponent
|
|
|
|
|
ntimesc wrote: but this project i also want to submit in Microsoft Acedmics Projects , so i aksed them for WinCAP but they said you can't use that (third party) library..... so do u have another solution
then try Iphelper apis provided by MS itself :-
IPHELPER[^]
or have a look at firewall example listed here
Firewalls[^]
|
|
|
|
|
Hi,
I am using a filter in GraphEdit. It's woring fine.
But I want to set it's properties through coding.
I have 3 file of that filter. So I used them, then it is giving error as follows,
--------------------Configuration: a - Win32 Debug--------------------
Compiling...
aDlg.cpp
Linking...
aDlg.obj : error LNK2001: unresolved external symbol _IID_IDtInputFlt
Debug/a.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...
a.exe - 2 error(s), 0 warning(s)
--------------------------------------------------------------------
So plz tell me how to set DirectShow Filter Properties through Code?
Thanks in Advance.
|
|
|
|
|
Hi guys,
I am trying to write into xls file. This part is ok.
problem occur while reading from xls file.
error shows as follows :
syntax error in query expression field_2 by demo
code I use for writing into xls file is as follows.
void CWrite_read_xlsDlg::OnButton1()
{
CDatabase database;
CString sDriver = "MICROSOFT EXCEL DRIVER (*.XLS)";
CString sExcelFile = "c:\\kdr.xls";
CString sSql;
TRY
{
sSql.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s",
sDriver, sExcelFile, sExcelFile);
// create database i.e excel sheet
if( database.OpenEx(sSql,CDatabase::noOdbcDialog) )
{
// create table structure
sSql = "CREATE TABLE demo (Name TEXT,Address TEXT)";
database.ExecuteSQL(sSql);
// insert data into table i.e excel sheet
sSql = "INSERT INTO demo (Name,Address) VALUES ('Nilesh','Pune')";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Address) VALUES ('akash','Mumbai')";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Address) VALUES ('ajit','thane')";
database.ExecuteSQL(sSql);
sSql = "INSERT INTO demo (Name,Address) VALUES ('aaniket','Nashik')";
database.ExecuteSQL(sSql);
}
// close database
database.Close();
}
CATCH_ALL(e)
{
TRACE1("Driver not installed: %s",sDriver);
}
END_CATCH_ALL;
}
code I use for reading data from xls file
void CWrite_read_xlsDlg::OnButton2()
{
CDatabase database;
CString sSql;
CString Name, Address;
CString sDriver;
CString sDsn; // register datasource in ODBC database manager
CString sExcelFile = "c:\\kdr.xls";
m_cList.ResetContent();
sDriver = GetExcelDriver();
if(sDriver.IsEmpty())
{
AfxMessageBox(" No Excel ODBC driver found ");
}
sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",sDriver,sExcelFile);
TRY
{
database.Open(NULL,false,false,sDsn);
//A CRecordset object represents a set of records selected from a data source.
//Known as recordsets
CRecordset recset(&database);
sSql = "SELECT field_1,field_2"
"FROM demo "
"ORDER BY field_1";
// sSql = "SELECT * FROM demo";
// sSql = "INSERT INTO demo (Name,Address) VALUES ('Nilesh','Pune')";
//"ORDER BY Name";
recset.Open(CRecordset::forwardOnly,sSql,CRecordset::readOnly);
while(!recset.IsEOF() )
{
recset.GetFieldValue("field_1",Name);
recset.GetFieldValue("field_2",Address);
m_cList.AddString(Name + " --> "+Address );
// m_cList.AddString(Name);
recset.MoveNext();
}
database.Close();
}
CATCH(CDBException, e)
{
AfxMessageBox(" Database error : "+e->m_strError);
}
END_CATCH;
}
call GetExcelDriver().implementation of GetExcelDriver()is written separately.
Read data and dispay is occur when I click on button.
kindly give me a reply where I am wrong.
Refards
kedar
Girish
Software Developer
|
|
|
|
|
hi all i need to set the icon and run application of my new file format like *.eee
i am using VC++. i need some registry add application and i also need the problem solution
thanks
regards
sasikumar
|
|
|
|
|
Hi sasikumarselvarajan ,
Do you want to create eee instead exe?
|
|
|
|
|
First you don't need an extra application to register a file type.
Second you have already replied to a topic where the answer was given right here[^].
Third do some research before asking for answers.
|
|
|
|
|
hello,
can anybody please tell me, how can I make a installer/ setup ( self installing cd) with the executable compiled in VC++ ?The operating system is WINDOWS-2000.
I want to make a package with the final executable.
Please reply
thanks
|
|
|
|
|
You can use a setup creating program. I use Inno Setup[^].
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
Inno Setup is great, and so easy to use, I would also recomend this
|
|
|
|
|
rajeevktripathi wrote: I want to make a package with the final executable.
yeap INNOSETUP is one finest free installer available in market if you are developing a simpler installer, otherwise you have to learn pascal type scripting to make complex installation program using same! just a warning
|
|
|
|