Click here to Skip to main content
15,923,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: NT I/O Port access !? Is it easy? Pin
Tim Smith10-Mar-03 6:40
Tim Smith10-Mar-03 6:40 
GeneralPassing Strings to and from VB via a dll Pin
dazinith10-Mar-03 6:18
dazinith10-Mar-03 6:18 
GeneralRe: Passing Strings to and from VB via a dll Pin
AlexO10-Mar-03 6:29
AlexO10-Mar-03 6:29 
GeneralRe: Passing Strings to and from VB via a dll Pin
dazinith10-Mar-03 7:27
dazinith10-Mar-03 7:27 
GeneralRe: Passing Strings to and from VB via a dll Pin
Brian Shifrin10-Mar-03 8:58
Brian Shifrin10-Mar-03 8:58 
GeneralRe: Passing Strings to and from VB via a dll Pin
dazinith10-Mar-03 7:51
dazinith10-Mar-03 7:51 
GeneralCDialog from a MFC dll... Pin
RobJones10-Mar-03 6:09
RobJones10-Mar-03 6:09 
GeneralRe: CDialog from a MFC dll... Pin
Bill Gates Antimatter Particle10-Mar-03 6:35
Bill Gates Antimatter Particle10-Mar-03 6:35 
You need to set the resource handle to the dll the switch it back again;
you should see a line of code like this somewhere in your dll, probably near DllMain function:

static AFX_EXTENSION_MODULE MyDLL = { NULL, NULL };

define a
HMODULE MyModuleHandle;
globally;

in DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
...
new CDynLinkLibrary(MyDLL);
//Add this line
MyModuleHandle = MyDLL.hModule;
}

then before you create your dialog, do something like this:




HINSTANCE pPreviousInstance = AfxGetResourceHandle();
AfxSetResourceHandle(MyModuleHandle);
m_pMyDialog = new CMyDialog();
...
AfxSetResourceHandle(pPreviousInstance);

this should solve that problem..
Big Grin | :-D

"Life begins at 140"
GeneralRe: CDialog from a MFC dll... Pin
Alvaro Mendez10-Mar-03 7:36
Alvaro Mendez10-Mar-03 7:36 
GeneralChange menu name on run-time Pin
whofmans10-Mar-03 5:55
whofmans10-Mar-03 5:55 
GeneralRe: Change menu name on run-time Pin
RobJones10-Mar-03 6:16
RobJones10-Mar-03 6:16 
GeneralThanks! I have used it for language translation Pin
whofmans10-Mar-03 23:47
whofmans10-Mar-03 23:47 
GeneralThanks! I have used it for language translation Pin
whofmans10-Mar-03 23:51
whofmans10-Mar-03 23:51 
GeneralThanks! I have used it for language translation Pin
whofmans10-Mar-03 23:56
whofmans10-Mar-03 23:56 
GeneralRe: Change menu name on run-time Pin
Renjith Ramachandran10-Mar-03 7:49
Renjith Ramachandran10-Mar-03 7:49 
Generalnew comer Pin
Mr. Andrea10-Mar-03 5:16
Mr. Andrea10-Mar-03 5:16 
GeneralRe: new comer Pin
Maximilien10-Mar-03 5:29
Maximilien10-Mar-03 5:29 
GeneralRe: new comer Pin
Alvaro Mendez10-Mar-03 7:37
Alvaro Mendez10-Mar-03 7:37 
Generalsave increment filenames... Pin
macmac3810-Mar-03 5:10
macmac3810-Mar-03 5:10 
GeneralRe: save increment filenames... Pin
Maximilien10-Mar-03 5:24
Maximilien10-Mar-03 5:24 
GeneralRe: save increment filenames... Pin
Renjith Ramachandran10-Mar-03 7:54
Renjith Ramachandran10-Mar-03 7:54 
GeneralAdding icons to an imagelist that is used in a listctrl Pin
Jochem10-Mar-03 5:01
Jochem10-Mar-03 5:01 
GeneralRe: Adding icons to an imagelist that is used in a listctrl Pin
RobJones10-Mar-03 6:27
RobJones10-Mar-03 6:27 
GeneralRe: Adding icons to an imagelist that is used in a listctrl Pin
Jochem11-Mar-03 1:15
Jochem11-Mar-03 1:15 
QuestionHow to store a set of data while each data has several kinds of type ? Pin
adapterJohn10-Mar-03 4:56
adapterJohn10-Mar-03 4:56 

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.