|
I am creating a dll (non-MFC). I am getting linker errors from the .exe that is trying to link with it.
The linker is complaining about the static class variables, unresolved external symbol. How am I to "decorate" them? I've tried using __declspec(dllexport) but haven't had much luck.
Thanks
|
|
|
|
|
Well, I finally got it figured out, in case anybody is curious.
The compiler directive should be dllexport when compiling the dll, and dllimport when compiling the exe.
#ifdef _DLL_
#define DLL_GLOBAL __declspec(dllexport)
#else
#define DLL_GLOBAL __declspec(dllimport)
#endif
|
|
|
|
|
if i calloc() a buffer and write data into it and then later copy other data into it that is shorter than the original data (and zero terminated) will the entire original buffer be freed properly when i call free() on it?
"there is no spoon" biz stuff about me
|
|
|
|
|
|
|
That is my understanding. It is also my understanding that night will be followed by day in the coming hours. I could be mistaken about one or the other or both, but I'm fairly certain about both.
Matt
|
|
|
|
|
Edit: I'm not using MFC BTW
I made a blank DLL project, copied my resources over to the DLL compiled, everything is fine...
I then loaded my resource DLL inside my app...it's load fine...but nothing is showing...obviously my resources need special attention when stored in a DLL...
What steps do I have to take to make sure my Dialogs, Menus, etc...load...and are shown...?
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
|
|
Thats what the problem was...
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
I see this in a sample on CP for a CStatusbar derived class. But I cant figure out how to get the classwizard to add the afx_msg UINT OnNcHitTest(CPoint point) handler . This class CTextualStatusBar doesnt show up in the class wizard. SO I thought maybe if I right click in the left panel classview window on this class and get "Add windows message handler" I migtht be able to do it that way. But for this class, that menu item isnt in the context menu. Yet this handler is in the afx area and its grey which means the wizard generated it. AM I overlooking something obvious?
Thanks.
ns
class CTextualStatusBar : public CStatusBar
{
public:
CTextualStatusBar();
public:
virtual ~CTextualStatusBar();
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg UINT OnNcHitTest(CPoint point);
DECLARE_MESSAGE_MAP()
};
|
|
|
|
|
I would just add the handler manually.
ClassWizard can behave in a severely brain damaged manner, especially when the class files don't exist in the project's root folder.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
I need to pass Command line arguments to my MFC wizard created app and store the values in a local variable .
Where can i trap these values in code ?
I need something like
main(int argc ,char *argv[])
Please help
|
|
|
|
|
See CWinApp::m_lpCmdLine .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
CRT ?
Engineering is the effort !
|
|
|
|
|
|
see the following MFC stuff:
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
After the call to ParseCommandLine() everything will be placed in to cmdInfo.
So Hum
|
|
|
|
|
I want to create a console application (using Visual C++ 6.0) that can input and output Arabic characters. I tried the following code:
#define UNICODE
#include <tchar.h>
#include <iostream>
int main()
{
TCHAR in[10];
std::wcin >> in;
std::wcout << in;
}
When I run the program I try to type an Arabic word, but strange characters appear (those at the 2nd half of the ASCII table). The "cout" statement does absolutely nothing.
All help would be appreciated. Thank you in advance.
Hosam Aly Mahmoud
|
|
|
|
|
I've never run any arabic (or non western for that matter) OS before, so I can only speculate.
If you output only one arabic character, do you get two funny looking characters? If that's the case, it seems that the console is not UNICODE at all.
If there's a 1:1 ratio between arabic characters and funny looking characters, then I'd assume that the font used in the console does not have the arabic letters.
--
20 eyes in my head, they're all the same![^]
|
|
|
|
|
Hello All,
I want to use some of the methods and classes defined in a .mof file. The name of .mof file is Cimwin32.mof and it is available in win2K. Can anyone help me out how to use them in my own code.
Thanks in advance
|
|
|
|
|
I've not heard of a .MOF file. What is it?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Pls do any one know the code to change the background color of a console vc++ application.
thanx
smore
|
|
|
|
|