|
I was not here yesterday; but in general, you do not want to staticaly link to the MFC DLL (mass overhead). I have more than one class that overides the PreTranslateMessage function and none of them required that MFC be staticaly linked. For that matter PreTranslateMessage was disigned to be overriden, that is, it is a member of the CWnd class which is the base of all window based objects.
INTP
|
|
|
|
|
Linking the dll dinamicaly to MFC would not solve the problem.
(I checked out the microsoft sight about this. Look at the DLLScreenCap Sample at this URL :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample/html/vcsamDllScreenCapSample.asp
)
The problem with the PreTranslateMessage is, that it was not passed through to the dll automaticaly, but needs to be done manualy.
avivhal
|
|
|
|
|
If it does not work staticaly it will not work dinamicaly linked either.
All I know is that all the windows(/classes) derived from CWnd receive messages via PreTranslateMessage (this is a given).
I do not know about this manualy stuff, I've never had to do that for PreTranslateMessage. I go to the ClasssWizard and select PreTranslateMessage and it generates the code, that works.
INTP
|
|
|
|
|
CAn i send data to USB port as there is a way to COM Port
if yes then plz send me help or sample code
thanx
|
|
|
|
|
Yes!
Sorry no code!
From a programming aspect a USB port is the same as a serial port (aka. COM Port). If you are talking about drivers, then we are on a totaly different subject.
INTP
|
|
|
|
|
You write to a COM port as you do to a file. I expect that you do the same with USB ports.
NOTE: You will probably need appropriate USB drivers to do this.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
|
Ooops! I stand corrected. Perhaps I shouldn't have posted a presumption!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
Hi..All..
How are you?
Well,hope you are fine..
Today,I when I try to use 24-bit bitmap in toolbar(vc++6.0) then get shock that it is not supporting 24-bit image in toolbar. You are mastermind & I'm sure you must have any idea to place that bitmap on toolbar.
Please, Tell me, How can I do this.
I'm sure you will help me.
Thanks
OK! Good Bye..Have a Nice Life..Bye
---Sumit Kapoor---
|
|
|
|
|
I find you intertaining!
Take a look at some of the articles at codeproject, regarding toolbars.
Note: Do not use the bitmap editor included with VC++ 6.0 to modify bitmaps of more thatn 16 colors. If you open it with that editor it will convert it and make your life difficult.
INTP
|
|
|
|
|
hem, VC++, only 16 colors ?!
mine can edit 256 colors bitmaps without convert it back into 16 colors.
TOXCCT >>> GEII power
|
|
|
|
|
hi every body ,
can any body help me in solving the problem .
first i dont know vc++ perfectly
"how can i let the user to edit text in the flex grid control"
|
|
|
|
|
Use CEdit Control, Dynamically move CEdit control to the active grid cell, resize its dimension according to cell size, the parent of CEdit control should be Grid contol
|
|
|
|
|
|
hi
i guess this follows on from my earlier Question.
What mechanisms are there for detecting the insertion of an SD card into a PC or Laptop (not PPC)
The autoplay stuff seems to be ok but the problem is getting information as to where the card is (which drive etc) is a problem
Oh i guess i also need to fire up my application when the card is inserted, if the app is not already running
cheers and thanks
bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
The method to get the character in a mouse point from a total windows?
It asks with this if there is the relation data or similar source.
|
|
|
|
|
Check
WindowFromPoint
and GetWindowText
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
From what I read in these posts, I am beginning to think the next generation thinks that this is magic.
Of course there is a relationship between data and source. The problem is getting from point A to point B.
1) Who drew the character? (You? Then you know where it is at.)
2) Some one else? (Then you may have a problem!)
INTP
|
|
|
|
|
I want to open a new project (new name, directory ...) but want to use the dialogs (gui) of the last project. How can this be achieved ?
Copy / import which files ?
Any ideas ?
|
|
|
|
|
Copy the necessary C++ header and source files into your new workplace.
Then, insert your previous project into your new workspace.
You should be able to see the previous project dialog resource. Just go to menu select Edit - Copy or Ctrl + C the dialog you need.
Then, to paste to new project. Ctrl V to the new project dialog resource folder.
(This is my approach. Hope to see a better approach by the way)
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi
I just created a static library using VC++6, and I have successfully compiled the .lib file. But when I tried to use it in my app, I get the following errors:
Linking...
libcpd.lib(ios.obj) : error LNK2005: "public: void __thiscall std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QAEXH_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(ios.obj) : error LNK2005: "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(ios.obj) : error LNK2005: "protected: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(ios.obj) : error LNK2005: "protected: void __thiscall std::ios_base::_Init(void)" (?_Init@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(locale0.obj) : error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(locale0.obj) : error LNK2005: "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc@locale@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(locale.obj) : error LNK2005: "public: class std::locale & __thiscall std::locale::_Addfac(class std::locale::facet *,unsigned int,unsigned int)" (?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z) already defined in msvcprtd.lib(MSVCP60D.dll
)
libcpd.lib(locale.obj) : error LNK2005: "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QAE@PBD@Z) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(locale.obj) : error LNK2005: "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP60D.dll)
libcpd.lib(xwctomb.obj) : error LNK2005: __Getcvt already defined in msvcprtd.lib(MSVCP60D.dll)
LIBCD.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(crt0dat.obj) : error LNK2005: __exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(dbgheap.obj) : error LNK2005: _free already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrtd.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrtd.lib(cinitexe.obj)
LIBCD.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrtd.lib(cinitexe.obj)
LIBCD.lib(lconv.obj) : error LNK2005: _localeconv already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in msvcrtd.lib(MSVCRTD.dll)
LIBCD.lib(fflush.obj) : error LNK2005: _fflush already defined in msvcrtd.lib(MSVCRTD.dll)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __setmbcp already defined in LIBCD.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBCD" conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/NNTestLib.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
I have tried googline the net for answers, but I couldn't find any help on this. Could someone tell me what I did wrong, and how I can correct it?
Thanks!
|
|
|
|
|
You compiled the .lib and your project with different "Run Time Libraries" option.
Go to Project-Options, and under "C/C++" / "Code Generation" you'll find a combobox with options for which C run-time lib to use (Debug, Debug Multi-threaded, Debug DLL, Debug Multithreaded DLL, etc).
Make sure it's the same in your lib and in your project. (Basically: if you're writing MFC them Debug Multithreaded DLL for the debug build).
-- Nitzan
|
|
|
|
|
Hi
Thanks for the reply. I've tried changing the compilation option to Multithreaded DLL and it works! Thanks!
BTW, I saw that there are separate code generation options for debug and release version. Does this mean I have to provide two versions of my library (one for debug, one for release)? Or is there a configuration that allows me to have only one version of my library for both debug and release versions?
Thanks!
|
|
|
|
|
You're welcome. There are separate options for each "Configuration". You can add configurations (say you want "Debug", "Release" and "Debug with statically linked MFC"), and even delete configurations so you're left with only one.
You don't "have" to do anything. The only question is who is going to use your lib, and what their requirements will be. If it's only you, and you don't care, then provide only one (Release would probably be best, since Debug might need other debug DLLs if you've used them in your lib).
One more thing you should be aware of is that VC++ has a deficiency of some sort: if you use project dependencies (for multiple DSPs in one DSW), then if your "main" project is a "Debug" build VC will take the "Debug" build from all other projects. That means you need a "Debug" build in your lib if you use projcet dependencies.
BUT -- if you simply insert the name of your lib in "linker / input" then you're safe and there's no problem.
-- Nitzan
|
|
|
|
|
I wrote a soap server COM. now I want to get the client's IP address.
how can I do?
|
|
|
|