2 quick questions...
-
Hello, I only have two quick questions to ask you and they are: - Can one implement DLLs in VC with MFC support? - How does one do about retrieving the taskbar window handle (
HWND
orCWnd
)? Thanks a lot, David -
Hello, I only have two quick questions to ask you and they are: - Can one implement DLLs in VC with MFC support? - How does one do about retrieving the taskbar window handle (
HWND
orCWnd
)? Thanks a lot, DavidHow does one do about retrieving the taskbar window handle (HWND or CWnd)?
HWND hTaskBar = FindWindow("Shell_TrayWnd", NULL);
I am not sure about first question, I think you can probably do it! ARSALAN MALIK
-
Hello, I only have two quick questions to ask you and they are: - Can one implement DLLs in VC with MFC support? - How does one do about retrieving the taskbar window handle (
HWND
orCWnd
)? Thanks a lot, DaviddNimrod#X wrote: Can one implement DLLs in VC with MFC support? Yes. Remember that DLLs existed long before MFC came about.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
dNimrod#X wrote: Can one implement DLLs in VC with MFC support? Yes. Remember that DLLs existed long before MFC came about.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
That's great! By the way, will I have to take special care about any particular issue(s) related to developing a DLL with MFC support? David
-
That's great! By the way, will I have to take special care about any particular issue(s) related to developing a DLL with MFC support? David
With AppWizard, you can create two types of DLL projects: MFC and Win32. With MFC, you can create a:* regular DLL with MFC statically linked
-
regular DLL with shared MFC DLL
-
MFC extension DLL. Search MSDN for examples of each.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
-
With AppWizard, you can create two types of DLL projects: MFC and Win32. With MFC, you can create a:* regular DLL with MFC statically linked
-
regular DLL with shared MFC DLL
-
MFC extension DLL. Search MSDN for examples of each.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
Yeah, I've done that so far. My question had to do more with issues such as: - function declaration; - does MFC act differently when running from a DLL? - will I have to use
CProcessLocal globalData
(i.e.) to handle dynamic data? And if so, how/when should I use it? I have done a couple of DLLs before, but none had MFC support, so I'm a bit lost out here. I really have no idea how MFC behaves when running from a DLL... Thanks for your patience though! : ) Dave Nimrod -
-
Yeah, I've done that so far. My question had to do more with issues such as: - function declaration; - does MFC act differently when running from a DLL? - will I have to use
CProcessLocal globalData
(i.e.) to handle dynamic data? And if so, how/when should I use it? I have done a couple of DLLs before, but none had MFC support, so I'm a bit lost out here. I really have no idea how MFC behaves when running from a DLL... Thanks for your patience though! : ) Dave NimroddNimrod#X wrote: function declaration; Functions are declared the same no matter where they reside. One difference is that exported functions must use
__declspec(dllexport)
if they are going to be used by other EXEs and DLLs. dNimrod#X wrote: does MFC act differently when running from a DLL? No, but there are precautions that must be taken. For instance, if a function within the DLL will be using a resource that is also contained within the DLL, a call toAFX_MANAGE_STATE()
will be required so that the DLL's resource table is looked at rather than the EXE's.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
dNimrod#X wrote: function declaration; Functions are declared the same no matter where they reside. One difference is that exported functions must use
__declspec(dllexport)
if they are going to be used by other EXEs and DLLs. dNimrod#X wrote: does MFC act differently when running from a DLL? No, but there are precautions that must be taken. For instance, if a function within the DLL will be using a resource that is also contained within the DLL, a call toAFX_MANAGE_STATE()
will be required so that the DLL's resource table is looked at rather than the EXE's.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
Thanks for the invaluable input! You have been really helpful. Dave