Click here to Skip to main content
15,911,360 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: STL valarray and slices Pin
Miszou29-Jan-04 10:16
Miszou29-Jan-04 10:16 
Question.OCX or .DLL ? Pin
Dracula500028-Jan-04 8:20
Dracula500028-Jan-04 8:20 
AnswerRe: .OCX or .DLL ? Pin
Michael Dunn28-Jan-04 16:22
sitebuilderMichael Dunn28-Jan-04 16:22 
GeneralRe: .OCX or .DLL ? Pin
Dracula500029-Jan-04 8:36
Dracula500029-Jan-04 8:36 
GeneralUsing WTL controls in an MFC app Pin
armentage28-Jan-04 7:44
armentage28-Jan-04 7:44 
GeneralRe: Using WTL controls in an MFC app Pin
armentage28-Jan-04 7:56
armentage28-Jan-04 7:56 
GeneralRe: Using WTL controls in an MFC app Pin
Jörgen Sigvardsson28-Jan-04 7:59
Jörgen Sigvardsson28-Jan-04 7:59 
GeneralRe: Using WTL controls in an MFC app Pin
Jörgen Sigvardsson28-Jan-04 7:56
Jörgen Sigvardsson28-Jan-04 7:56 
WTL7.1 in an ATL7 environment (VS.NET and later) will assume there is a global variable called _AtlBaseModule.

I can't remember all functions it must have, but you'll figure it out as you see the compilation errors. I know it needs a function called GetResourceHandle(). It should just return the HINSTANCE for your resources.

I would suggest that you do something like this in your stdafx.h:
#include "youratlbasemodule.h"
extern YourAtlBaseModuleEmulator _AtlBaseModule;
// WTL-includes
#include <atlapp.h>
#include <atlctrls.h>
...

And then in your youratlbasemodule.h:
class class YourAtlBaseModuleEmulator {
   HINSTANCE m_hInstance;
public:
   void SetResourceInstance(HINSTANCE hInstance) { m_hInstance = hInstance; }
   HINSTANCE GetResourceInstance() { return m_hInstance; }
};

And then in your "main" cpp file:
#include "youratlbasemodule.h"
...
YourAtlBaseModuleEmulator _AtlBaseModule;
...
    // somewhere in the code where you have access to the
    // resource instance (typically the HINSTANCE of your EXE)
    _AtlBaseModule.SetResourceInstance(hInstance);

I think something along those lines should work. I have never done it before. Smile | :)

--
He just smiled and gave me a vegemite sandwich.
GeneralRe: Using WTL controls in an MFC app Pin
armentage28-Jan-04 7:59
armentage28-Jan-04 7:59 
GeneralPlease help Pin
SiddharthAtw27-Jan-04 21:38
SiddharthAtw27-Jan-04 21:38 
QuestionHow to read file line by line? Pin
freehawk27-Jan-04 15:09
freehawk27-Jan-04 15:09 
AnswerRe: How to read file line by line? Pin
Christian Graus27-Jan-04 15:30
protectorChristian Graus27-Jan-04 15:30 
GeneralRe: How to read file line by line? Pin
freehawk27-Jan-04 23:40
freehawk27-Jan-04 23:40 
GeneralRe: How to read file line by line? Pin
Christian Graus28-Jan-04 9:00
protectorChristian Graus28-Jan-04 9:00 
AnswerRe: How to read file line by line? Pin
valikac28-Jan-04 8:01
valikac28-Jan-04 8:01 
GeneralRe: How to read file line by line? Pin
freehawk29-Jan-04 15:13
freehawk29-Jan-04 15:13 
QuestionHow to do like clicking the button of toolbar? Pin
freehawk27-Jan-04 15:08
freehawk27-Jan-04 15:08 
AnswerRe: How to do like clicking the button of toolbar? Pin
Michael Dunn28-Jan-04 16:25
sitebuilderMichael Dunn28-Jan-04 16:25 
GeneralRe: How to do like clicking the button of toolbar? Pin
freehawk28-Jan-04 17:32
freehawk28-Jan-04 17:32 
QuestionNeed to transfer a callback function pointer? Pin
freehawk26-Jan-04 13:40
freehawk26-Jan-04 13:40 
AnswerRe: Need to transfer a callback function pointer? Pin
Jörgen Sigvardsson27-Jan-04 8:51
Jörgen Sigvardsson27-Jan-04 8:51 
GeneralRe: Need to transfer a callback function pointer? Pin
freehawk27-Jan-04 15:05
freehawk27-Jan-04 15:05 
GeneralRe: Need to transfer a callback function pointer? Pin
Jörgen Sigvardsson27-Jan-04 21:05
Jörgen Sigvardsson27-Jan-04 21:05 
GeneralRe: Need to transfer a callback function pointer? Pin
freehawk27-Jan-04 23:40
freehawk27-Jan-04 23:40 
GeneralAllocate byte array in ATL server Pin
Chris Losinger26-Jan-04 11:40
professionalChris Losinger26-Jan-04 11:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.