Click here to Skip to main content
15,913,282 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Challenging Visual Programing Code Required Pin
Moon009217-Dec-07 5:58
Moon009217-Dec-07 5:58 
QuestionWhy is it dumping so much afxtempl.h text in DEBUG BINARY (Problem Youtube Video)... Pin
sureshbskumar15-Dec-07 5:33
sureshbskumar15-Dec-07 5:33 
GeneralRe: Why is it dumping so much afxtempl.h text in DEBUG BINARY (Problem Youtube Video)... Pin
Mike Dimmick15-Dec-07 7:42
Mike Dimmick15-Dec-07 7:42 
GeneralRe: Why is it dumping so much afxtempl.h text in DEBUG BINARY (Problem Youtube Video)... Pin
sureshbskumar15-Dec-07 8:41
sureshbskumar15-Dec-07 8:41 
GeneralRe: Why is it dumping so much afxtempl.h text in DEBUG BINARY (Problem Youtube Video)... Pin
Mike Dimmick18-Dec-07 12:01
Mike Dimmick18-Dec-07 12:01 
QuestionHow to use classes? Pin
Anthony Appleyard15-Dec-07 2:59
Anthony Appleyard15-Dec-07 2:59 
AnswerRe: How to use classes? Pin
Hamid_RT15-Dec-07 3:16
Hamid_RT15-Dec-07 3:16 
AnswerRe: How to use classes? Pin
CPallini15-Dec-07 3:26
mveCPallini15-Dec-07 3:26 
GeneralRe: How to use classes? Pin
Anthony Appleyard15-Dec-07 11:00
Anthony Appleyard15-Dec-07 11:00 
GeneralRe: How to use classes? Pin
Mark Salsbery15-Dec-07 11:36
Mark Salsbery15-Dec-07 11:36 
AnswerRe: How to use classes? Pin
Mark Salsbery15-Dec-07 11:43
Mark Salsbery15-Dec-07 11:43 
GeneralNew program queries Pin
Anthony Appleyard15-Dec-07 2:54
Anthony Appleyard15-Dec-07 2:54 
GeneralRe: New program queries Pin
Hamid_RT15-Dec-07 3:17
Hamid_RT15-Dec-07 3:17 
GeneralRe: New program queries Pin
CPallini15-Dec-07 3:28
mveCPallini15-Dec-07 3:28 
GeneralProblem when using DllMain() function Pin
ashishbhatt15-Dec-07 2:06
ashishbhatt15-Dec-07 2:06 
GeneralRe: Problem when using DllMain() function Pin
Mike Dimmick15-Dec-07 7:53
Mike Dimmick15-Dec-07 7:53 
GeneralRe: Problem when using DllMain() function Pin
ashishbhatt15-Dec-07 17:27
ashishbhatt15-Dec-07 17:27 
Hi,,

Sorry for the very late reply.

Thank you very much for reply.I have read the article as you told and I have solved this problem but now I am facing new problem regarding this topic.

Now I am using below code for the my project purpose using Dllmain().Here I have created one DLL in that I am using this function.In this DLL what happens that this DLL checks for screen update and mouse update on the desktop and sends messsages to my MFC Activex Control (which is another project in the same Solution).

<br />
 // The DLL's main procedure<br />
BOOL WINAPI DllMain (HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)<br />
{<br />
   // Save the instance handle<br />
   hInstance = (HINSTANCE)hInst;<br />
<br />
   // Any code.......<br />
<br />
   return TRUE;<br />
}<br />

And now problem is when I run my Activex from Activex control test Container then whenever this test container is active on top of the desktop then messages(like Scrren update,,Mouse update)are peeked up by Activex control application but when any other window is active then these messages are not peeked by Activex.

Is the problem with this hInstance which get the instance of the window in which My Activex is running???

I ahve tested running my activex in explorer but the same problem exists.

I peeked up these messages from my Activex by below code....
<br />
   MSG msg;<br />
   while(1)<br />
   {<br />
      if(!PeekMessage(&msg,m_desktop->m_hwnd,NULL,NULL,PM_REMOVE))<br />
      {<br />
        if(!m_desktop->CheckUpdate())<br />
           break;<br />
        if (!WaitMessage())<br />
        {<br />
	  AfxMessageBox(CString("WaitMessage Failed"));<br />
	  break;<br />
        }<br />
      }<br />
      else if(msg.message ==  SCREEN_UPDATE)<br />
      {<br />
         // Any code......<br />
      }<br />
      else if(msg.message == MOUSE_UPDATE)<br />
      {<br />
        // Any code.......<br />
      }<br />
      <br />
   }<br />


Please give me any suggetion if you have any idea or ask me if you have any more quetions.

Thanks in Advance.

Ashish Bhatt
GeneralRe: Problem when using DllMain() function Pin
Mark Salsbery15-Dec-07 8:07
Mark Salsbery15-Dec-07 8:07 
GeneralGDI+ How to mask an image with a mask bitmap Pin
followait15-Dec-07 2:00
followait15-Dec-07 2:00 
GeneralRe: GDI+ How to mask an image with a mask bitmap Pin
Mark Salsbery15-Dec-07 8:11
Mark Salsbery15-Dec-07 8:11 
GeneralRe: GDI+ How to mask an image with a mask bitmap Pin
followait15-Dec-07 14:19
followait15-Dec-07 14:19 
GeneralCListCtrl in CDialogBar can't receive WM_CREATE Pin
followait15-Dec-07 1:29
followait15-Dec-07 1:29 
QuestionRe: CListCtrl in CDialogBar can't receive WM_CREATE Pin
CPallini15-Dec-07 1:49
mveCPallini15-Dec-07 1:49 
GeneralRe: CListCtrl in CDialogBar can't receive WM_CREATE Pin
followait15-Dec-07 2:06
followait15-Dec-07 2:06 
QuestionRe: CListCtrl in CDialogBar can't receive WM_CREATE Pin
CPallini15-Dec-07 2:44
mveCPallini15-Dec-07 2:44 

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.