|
class __declspec(dllimport) CIO
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Usually how people solve this problem is by making a define that gets changed depending on how the DLL is used. Something like this:
<br />
#ifdef CIO_EXPORTS<br />
#define CIO_API __declspec(dllexport)<br />
#else<br />
#define CIO_API __declspec(dllimport)<br />
#endif<br />
So in your project where you compile your DLL, besure to define CIO_EXPORTS, and your class and static members will be exported. In all other cases (like the project where you want to import the DLL) the setting will be set to import those parameters.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
In my application when i right-click on the window i invoke a popup menu.when i click the popup menu, dialog box is displayed.I am not closing my dialog box and i switch to another application.When i click on my application name again in the taskbar, there is no reponse from my application. i have to minimize all my application to open my application again.How to correct this.
|
|
|
|
|
I think it is when you have an modal dialog box open (is it a modal dialog box?).
Then when you as you do to give it focus you can't give it focus because you have an modal dialog box open....
I only think it could be that... I'm not sure!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Yes iam using modal Dialog Box.How to create modeless dialog box.
|
|
|
|
|
Step 1 is to look in MSDN.
Step 2,3 and 4 are listed in MSDN.
Signature space for rent. Apply by email to....
|
|
|
|
|
Is the parent window of your popup dialog set?
Pavel
Sonork 100.15206
|
|
|
|
|
I correct that error.Thanks to all
|
|
|
|
|
the gdiplus draw a spline line through some pots,how can i do that fuction
like Graphic::DrawCurve(...)
thanks very much!
ZHANGYIFEI
|
|
|
|
|
Do you mean how you could use a similary function in C++ Win32 API??
Why not use the Graphics object and MC++?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
i mean how gdi+ do it,i mean gdi+ drawCurve's source!
|
|
|
|
|
hi,
Roles:
a DLL, a Callback function and an Exe.
Activity:
sending a CListCtrl's Handle through Callback Parameter list to DLL for displaying coming data from COM1.
Precodition:
the CListCtrl has three columns, no problem in Dialog
Subsequence:
can only insert data into Item, not SubItems, in the columns of CListCtrl in Callback function.
Question:
what's happening?
How to insert data into SubItems as well?
Addition:
Thanks in advance
Extreme programming. Do the No.1
|
|
|
|
|
That's the way to insert subitems:
LVITEM pItem;
pItem.iItem = iIndex;
pItem.mask = TVIF_TEXT;
pItem.iSubItem = iSubItem;
pItem.pszText = (LPTSTR)(LPCTSTR)"SubItem text";
m_ctlListCtrl.SetItem(&pItem);
regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How do you export functions in an exe? There is no def file to use. What I want to be able to do is use an exe the same way as I do an dll. I want to be able to do the same thing as the excel.exe file. Any ideas?
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
You just export all funktions the same way you do in a DLL!
That's what I've learned from CP!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
From what I know about dlls is: If my functions aren't in the def file, I cannot get a pointer to the functoins. Do you not need it in an exe? Also, will I need to export the entire class? If anyone has done this and would care to share please do.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
Darroll wrote:
From what I know about dlls is: If my functions aren't in the def file
You could be right!
I haven't tried exporting functions from an exe yet!
<Rickard is hiding him self />
Darroll wrote:
Also, will I need to export the entire class?
You can't export member functions of an class.
You'll need to make them static if so... I hope...
PS. This is my message number 700!!!!! Nish, I get closer to you!!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
try something like
class __declspec(dllexport) ABCD
{
public:
void junk(){}
}
and if you have a simple function:
int _declspec(dllexport) myfunction();
and variables:
int _declspec(dllexport) myvariable;
Joel Lucsy (jjlucsy@concentric.net)
|
|
|
|
|
¿De qué se ríe un tonto? De ver reír a otro tonto.
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
__Stephane Rodriguez__ wrote:
¿De qué se ríe un tonto? De ver reír a otro tonto.
Can someone translate this to English?
Did you just call me an idiot?
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
Ok, too bad you don't guess it. I am saying the discussion you and Rickard are having is making my day. Thanks a lot.
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Glad we could make you laugh.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
I would be glad if someone could try export a function and tell me if it worked for you!
Cheers!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
A .def file only eliminates the need to add __declspec(dllexport) attributes alongside with each function you export.
Exporting functions does not work for an exe : there is no __declspec(process) attribute. Attempting to export a .exe function using dllexport will just prompt the loading of the .dll file, which does not exist!
Export interfaces instead. That's what COM is about.
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Interesting! I used to export functions from my Delphi .exe files but had no idea that I couldn't do it in C++ - I would have had to discover that at somepoint and no doubt tear some hair out in the process. I'll have to go back to having a separate DLL to export the functions. Shame.
--
Simon Steele
Programmers Notepad - http://www.pnotepad.org/
|
|
|
|