|
Laxman9 wrote: FAILURE is the first step towards SUCCESS
FAILURE is the last step towards the PINK SLIP
Jesus Loves <marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Defeat is temporary but surrender is permanent
--Jesus is Lord
|
|
|
|
|
here is the sample..code for DLL
//header file dllexportsclass.h//
#ifdef DLLEXPORTSCLASS_EXPORTS
#define DLLEXPORTSCLASS_API __declspec(dllexport)
#else
#define DLLEXPORTSCLASS_API __declspec(dllimport)
#endif
/ This class is exported from the DllExportsClass.dll
class DLLEXPORTSCLASS_API CDllExportsClass {
public:
void show();
CDllExportsClass(void);
// TODO: add your methods here.
};
extern DLLEXPORTSCLASS_API int nDllExportsClass;
DLLEXPORTSCLASS_API int fnDllExportsClass(void);
//c++ file//
include the above header file
/ This is an example of an exported variable
DLLEXPORTSCLASS_API int nDllExportsClass=0;
// This is an example of an exported function.
DLLEXPORTSCLASS_API int fnDllExportsClass(void)
{
::MessageBox(NULL,"function","",0);
return 42;
}
// This is the constructor of a class that has been exported.
CDllExportsClass::CDllExportsClass()
{
return;
}
void CDllExportsClass::show()
{
::MessageBox(NULL,"Hello Dll","CDllExportsClass",0);
}
and include the header file into the project where u want to use the DLL.
Thanks and Regards
Laxman
FAILURE is the first step towards SUCCESS
-- modified at 0:30 Monday 30th January, 2006
Thanks and Regards
Laxman
FAILURE is the first step towards SUCCESS
|
|
|
|
|
In versions of VC++ gone by, if you clicked on a Windows identifier, e.g. WM_PAINT, and pressed the F1 button then the relevant Windows API help would be displayed.
I'm now using Visual Studio .NET 7.1, and pressing F1 on any Windows identifier always displays help for MFC instead.
If I'm using MFC then that's fine, but most of the time I'm not, so it's rather annoying. Does anyone know how to get the old-style behaviour back?
Cheers
|
|
|
|
|
|
OK, I set the filter to no filter in the help index window and... it made absolutely no difference. Do I need to set the filter somewhere else?
|
|
|
|
|
|
> Can you be more specific about what's happening.
1. Open a .CPP file in Visual Studio .NET 2003.
2. Type WM_PAINT.
3. Click once on the word WM_PAINT.
4. Press the F1 button on your keyboard.
5. Observe as the help for CWnd::OnPaint is displayed. In previous versions of VC++ the help for the WM_PAINT message would appear, which is the behaviour that I want.
|
|
|
|
|
Uakari wrote: Observe as the help for CWnd::OnPaint is displayed. In previous versions of VC++ the help for the WM_PAINT message would appear, which is the behaviour that I want.
If you go scroll down you will have a link for WM_PAINT .
Or
You can set the filter to Platform SDK .
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Defeat is temporary but surrender is permanent
--Jesus is Lord
|
|
|
|
|
> If you go scroll down you will have a link for WM_PAINT
I'm aware of that. You can also select the various subjects that the word links to in the Dynamic Help window. But that's not as good as going straight to the help I want, which is what VC++ 6 did.
> You can set the filter to Platform SDK
The filters make absolutely no difference to the F1 help for me.
What version of Visual Studio are you using?
I've come across http://msdn2.microsoft.com/en-us/library/f88ctah3.aspx[^].
If there's a more direct route to filtering the F1 help then I'd like to know about it, otherwise I'll have a go at that later.
|
|
|
|
|
Uakari wrote: What version of Visual Studio are you using?
I am using VS2003
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Defeat is temporary but surrender is permanent
--Jesus is Lord
|
|
|
|
|
Hi,
I need to write an application that converts a Borland Interbase Database to an Access/SQL Server database.
My question is - after I have the source and destination database paths, what steps does my application have to take in order to actually convert the data?
I am using Visual C++ 2003.
|
|
|
|
|
open, read the source with source database syntax then open, write to the destination with its own format.
i guess you wanna copy from one to another right? where do you "convert" something here?
VuNic
|
|
|
|
|
By convert I meant that I have to take the data from the tables of the Interbase DB, and insert them into the correct fields and tables of the Access/SQL DB.
Yeah, I guess you could say that it's a copy and not a convert..
so like you said:
VuNic wrote: open, read the source with source database syntax then open, write to the destination with its own format.
but how I do all of this?
about connecting to the source db - I understand that I have to connect to the Interbase db through ODBC (after I have a driver for it), but how do I do this?
and what do I do after I have the connection? How do I transfer (copy) the data?
I'm really new to this subject, so all help would be appreciated...
Thanks
|
|
|
|
|
when you say , "select * from myTable" its gonna return all the recordsets in your table. so you have them in a recordset set object, i.e:
_recordset rec;
rec->GetRecordCount()
Now open the Target database....
In a loop, till the recordcount()is reached
{
1.read the record, (xyz database)
2.insert in the target table (acess)
3.MoveNext (xyzdataBase)
}
close(xyz)
close(access)
the data is moved
VuNic
|
|
|
|
|
I wrote the following code:
CDatabase srcDb;
if (srcDb.Open(NULL))
{
m_sDbName = srcDb.GetConnect(); //m_sDbName is a variable of type CString
UpdateData(FALSE);
}
CRecordset rs(&srcDb);
CString strSQL;
strSQL = "SELECT * FROM table1";
rs.Open(CRecordset::snapshot, strSQL, CRecordset::readOnly);
rs.Close();
Everything works OK, (the database is connected), but when it gets to the row:
rs.Open(CRecordset::snapshot, strSQL, CRecordset::readOnly);
the application crashes, and I don't understand why...
Is this the right syntax for connecting to a database and retrieving data from a table? Could you maybe attach some source code, so I could compare?
Another question - after the row: rs.Open(CRecordset::snapshot, strSQL, CRecordset::readOnly); executes I should have the data from the table in the recordset object, right?
|
|
|
|
|
How do I layout components , to add new GUI componets , delete , re-position dynamically at runtime in MFC
|
|
|
|
|
First you create GUI components (usually derived from CWnd class) such as CButton by calling their Create() method. Then you can change their position using the SetWindowPos() method.
|
|
|
|
|
Hi,
i searched for function to change a string is in lower case in to upper case.
thanking you
|
|
|
|
|
If you are using CString then use MakeUpper and if you are using char* string then use toupper function.
thanx
danishjibbran
|
|
|
|
|
sheshidar wrote: i searched for function to change a string is in lower case in to upper case.
what was the result?
VuNic
|
|
|
|
|
CString="tEst";
test.MakeUpper(); // now its TEST
test.MakeLower(); // now its test
cheers
zoz
|
|
|
|
|
Hi all
can any one tell me how to retreive the parent of a child in a TreeStructure which is derived from CTreeCtrl in MFC
|
|
|
|
|
Use GetParentItem. It takes HTREEITEM type variable as only argument whoes parent is to be retrieved and return the parent as HTREEITEM if parent exists otherwise returns NULL.
danishjibbran
|
|
|
|
|
Good evening,
I am building an application for distribution that will need to access information stored in tables (i.e. records, fields, etc...), and even perform calculations and table joins. All the data and functionality needs to be contained within the application since the application will be used by customers of my friends' businesses. In other words, any data managing and storing capability needs to be fully contained within the application.
My question is, what type of strategy should I use (ADO, DAO, ODBC, OLE DB, etc...)? Or do I have to implement a database type file system (i.e. using vectors, multimaps, deques, etc...) myself?
Thanks for your help.
|
|
|
|
|
BlitzPackage wrote: any data managing and storing capability needs to be fully contained within the application.
Have a look at http://www.sqlite.org[^] for a decent embedded DB. I have only used it for small data sets but it came highly recommended.
http://www.codeproject.com/info/search.asp?target=sqlite&st=kw&qm=all[^]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|