Click here to Skip to main content
15,891,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGame Engine Hooking Pin
Opwar6-May-04 5:19
Opwar6-May-04 5:19 
GeneralRe: Game Engine Hooking Pin
jmkhael6-May-04 6:53
jmkhael6-May-04 6:53 
GeneralRe: Game Engine Hooking Pin
Alexander M.,6-May-04 7:20
Alexander M.,6-May-04 7:20 
GeneralCopyFile error 67 Pin
Member 10128696-May-04 5:18
Member 10128696-May-04 5:18 
GeneralRe: CopyFile error 67 Pin
David Crow6-May-04 5:57
David Crow6-May-04 5:57 
GeneralInjecting a MFC Dll Pin
Layane6-May-04 4:53
Layane6-May-04 4:53 
GeneralRe: Injecting a MFC Dll Pin
jmkhael6-May-04 7:01
jmkhael6-May-04 7:01 
GeneralRe: Injecting a MFC Dll Pin
Layane6-May-04 7:42
Layane6-May-04 7:42 
Thks but i resolve the problem, its a bug of MFC, i resolve with this code (its a test code that i create it)

<br />
CMsnNvHookApp theApp; <br />
<br />
DWORD WINAPI ThreadStart (LPVOID dwThreadId) { <br />
   ::Sleep(300); <br />
<br />
   //Change the module state <br />
   AFX_MODULE_STATE *ModStat; <br />
<br />
   ModStat = AfxGetStaticModuleState(); <br />
   ModStat->m_pCurrentWinApp = &theApp; <br />
   ModStat->m_hCurrentInstanceHandle = ::GetModuleHandle(NULL); <br />
<br />
   AFX_MANAGE_STATE(ModStat); <br />
<br />
   //put the new params for us application <br />
   theApp.m_hThread = ::GetCurrentThread(); <br />
   theApp.m_nThreadID = m_nThreadID; <br />
   theApp.m_hInstance = ::GetModuleHandle(NULL); <br />
                <br />
   //We create the windows <br />
   CFrameWnd *MainWin = new CFrameWnd(); <br />
<br />
   MainWin->Create(NULL,"Prueba"); <br />
   MainWin->ShowWindow(SW_SHOW); <br />
<br />
   theApp.m_pMainWnd = MainWin; <br />
<br />
   //Run the message loop <br />
   theApp.Run();                <br />
<br />
   return TRUE; <br />
} <br />
<br />
BOOL CMyApplication::InitInstance() <br />
{ <br />
   DWORD dwThreadId; <br />
<br />
   ::CreateThread(NULL,0,ThreadStart,0,0,&dwThreadId); <br />
    <br />
   return CWinApp::InitInstance(); <br />
}<br />
<br />
And i use a inject library called madCHook.dll <a href="http://www.madshi.net/">http://www.madshi.net/</a><br />

QuestionHow to use the windows API? Pin
sinbaski6-May-04 4:46
sinbaski6-May-04 4:46 
AnswerRe: How to use the windows API? Pin
Michael P Butler6-May-04 4:59
Michael P Butler6-May-04 4:59 
GeneralRe: How to use the windows API? Pin
sinbaski6-May-04 7:48
sinbaski6-May-04 7:48 
GeneralRe: How to use the windows API? Pin
David Crow6-May-04 8:45
David Crow6-May-04 8:45 
GeneralRe: How to use the windows API? Pin
Mikey_E20-Jun-04 13:44
professionalMikey_E20-Jun-04 13:44 
GeneralCustomCtrl and ToolTip - Redraw Problem Pin
AnTri6-May-04 4:40
AnTri6-May-04 4:40 
Generalchild windows inside child frame ( MDI ) Pin
amit_k_gupta6-May-04 3:52
amit_k_gupta6-May-04 3:52 
GeneralRe: child windows inside child frame ( MDI ) Pin
Iain Clarke, Warrior Programmer6-May-04 5:41
Iain Clarke, Warrior Programmer6-May-04 5:41 
GeneralPrinting in XP Pin
olsilverfox5-May-04 14:48
olsilverfox5-May-04 14:48 
GeneralRe: Printing in XP Pin
Iain Clarke, Warrior Programmer6-May-04 5:46
Iain Clarke, Warrior Programmer6-May-04 5:46 
GeneralRe: Printing in XP Pin
Chris Meech6-May-04 6:41
Chris Meech6-May-04 6:41 
GeneralCompiling C++ in .NET 2003 Pin
PaleyX5-May-04 13:52
PaleyX5-May-04 13:52 
GeneralRe: Compiling C++ in .NET 2003 Pin
Antony M Kancidrowski6-May-04 4:55
Antony M Kancidrowski6-May-04 4:55 
GeneralRe: Compiling C++ in .NET 2003 Pin
PaleyX6-May-04 5:09
PaleyX6-May-04 5:09 
GeneralRe: Compiling C++ in .NET 2003 Pin
Navin6-May-04 6:19
Navin6-May-04 6:19 
GeneralRe: Compiling C++ in .NET 2003 Pin
PaleyX6-May-04 6:23
PaleyX6-May-04 6:23 
GeneralRe: Compiling C++ in .NET 2003 Pin
Phil J Pearson6-May-04 6:37
Phil J Pearson6-May-04 6:37 

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.