|
I made a suggestion twice in my earlier posts.
Please look at that.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
thanks a lot, i have documentation of .dll, so i know the actual function name, is this right? sorry, i dun know more this point. now i used the code to test one function DataFormat() what i posted in previous reply. so the error occurred: file not found: icon.dll. so what is problem? and also i have several classes in one library, how i can call the functions properly?thanks.
rdgs
|
|
|
|
|
dear friend
i have downloaded the Dependency Viewer software and installed it, however i just could get the .dll in .exe file. so can't get export funcions. any problem? thanks a lot
|
|
|
|
|
Open the .DLL file in dependency viewer and look at the right hand side pane.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
however i couldn't open it. software just reminded me to choose type which will be open, after that, just showed me how many dll. i downloaded dependency viewer 1.0. what is problem i made. thanks.
|
|
|
|
|
zhiyuan16 wrote: so how to invoke the c++ member function in one .dll
I guess only c functions exported from the dll can be called from VB.
|
|
|
|
|
thanks for your reply. i knew i need to export the c++ dll function first, and then i can call it. but i don't know how to export step by step? i got the dll already. how to export? please help me. thanks a lot
rgds
|
|
|
|
|
You can call a c function exported in a c/c++ dll from a VB application. And to export a c function all you have to do is put the following keywords in front of the function to export as shown below
extern "C" __declspec( dllexport ) void AnotherCFunc();
extern "C" - is used to avoid the name mangling
|
|
|
|
|
thanks a lot for your help. my one .dll has several classes, so how i can use these funtion properly in vb. thanks a lot
|
|
|
|
|
As I said before you cannot call a c++ class's member function from a vb app.
|
|
|
|
|
thanks, how i can export the functions of dll step by step? thanks a lot
|
|
|
|
|
If you haven't DLL source code then you can't. However, you may develop (with C/C++ ) a new DLL that will act as wrapper of the original one (i.e. an adapter [^]). For details on building a VB6 callable DLL , see this great article series [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi ,
In my application I am using NOTIFYICONDATA structure to show tool tip. here the szTip can only contain 128 charecter. Is there any other way to use more charecters in tool tip?
Thanks in advance.
birajendu
CyberG India
Delhi
India
|
|
|
|
|
birajendu wrote: Is there any other way to use more charecters in tool tip?
Not using the standard shell32 tooltip. I'm afraid that you will have to use a custom tooltip if you require additional features. There are a few articles here on codeproject which could be used.
CPPToolTip v2.1[^]
Custom ToolTips for MFC Projects[^]
Best Wishes,
-David Delaune
|
|
|
|
|
This may help you
http://www.codeproject.com/KB/toolbars/tooltipsindialog.aspx
|
|
|
|
|
By the way szTip can only contain 64 characters and not 128.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I've got an MFC application writed in c++, it is a dialog-based project. I can't find anywere in the internet a solution for my problem. I've got a dialog window were i created a buttons. Also I've got two others dialog windows. I don't now how to make to open second dialog window when the button in window one will by clicked. I tried everything what i found in the internet and nothing ...
Please if any one can help me. I will be very thankfully if someone can send my or show how to do this.
HrDDD
|
|
|
|
|
in the handler of your button in dialog A (the first dialog), just create the second dialog.
for modal dialog:
void MyDialogA::OnButton()
{
MyDialogB dlg;
dlg.DoModal();
}
for modeless dialog:
class MyDialogA
{
MyDialogB* m_pDialogB;
}
void MyDialogA::OnButton()
{
if ( m_pDialogB)
delete m_pDialogB;
m_pDialogB = new MyDialogB;
m_pDialogB->Create(IDD_DIALOG_B);
m_pDialog->ShowWindow(SW_SHOW);
}
This signature was proudly tested on animals.
|
|
|
|
|
I can't find any function for calculate the time between LBUTTONDOWN and LBUTTONUP,help me ~
|
|
|
|
|
Here is a generic example on how to get elapsed time:
CTime startTime;
CTime endTime;
CTimeSpan elapsedTime;
On LBUTTONDOWN: startTime = CTime::GetCurrentTime();
On LBUTTONUP: endTime = CTime::GetCurrentTime();
elapsedTime = endTime - startTime;
int timeout = elapsedTime.GetSeconds();
|
|
|
|
|
wb_program wrote: I can't find any function for calculate the time between LBUTTONDOWN and LBUTTONUP,help me ~ Cool
Also probably you can use GetCurrentMessage which contains a DWORD value which gives the time the message was posted. Note that you should only call this from event handlers. So call this from mouse up and mouse down.
|
|
|
|
|
You can use 'GetDoubleClickTime' to retreive double click time for your mouse.
|
|
|
|
|
char *sConn="C:\\Documents and Settings\\Nimesh Gurung\\Desktop\\VPassignment\\Employee.mdb";
m_ptrConnection.CreateInstance(__uuidof(Connection));
m_ptrConnection->Provider = "Microsoft.Jet.OLEDB.4.0";
m_ptrConnection->Open(sConn,"Admin","",NULL);
//Create Ado recordset
m_pRS=NULL;
m_pRS.CreateInstance(__uuidof(Recordset));
m_pRS->CursorLocation=adUseClient;
char *table="SELECT * FROM EmployeeDetails";
m_pRS->Open(table,sConn,adOpenKeyset,adLockReadOnly , adCmdTable);
/
m_datagrid.putref_DataSource(NULL);
m_datagrid.putref_DataSource((LPUNKNOWN) m_pRS );
//m_datagrid.Refresh();
I am using Visual Studio 2008 and somehow can't make my code to open the recordset. Any help is much appreciated.
Many thanks in Advance
|
|
|
|
|
Given the complete and utter lack of error checking, the root cause could be any of the statements before the record set open call. Check the status values to see where the error actually occurs, and then ask your questions...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
my problem solved once I changed the char variable table to just EmployeeDetails but still want the ability to use select for more functionality.
Is it a little bit different in visual studio 2008.
|
|
|
|