Click here to Skip to main content
15,907,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: create a new child frame Pin
vikas amin3-Oct-05 0:53
vikas amin3-Oct-05 0:53 
QuestionI was about to assume ... Pin
Anonymous2-Oct-05 23:15
Anonymous2-Oct-05 23:15 
AnswerRe: I was about to assume ... Pin
normanS3-Oct-05 5:18
normanS3-Oct-05 5:18 
QuestionConvolution Code required Pin
karen_yingying2-Oct-05 23:11
karen_yingying2-Oct-05 23:11 
AnswerRe: Convolution Code required Pin
Ghasrfakhri3-Oct-05 0:29
Ghasrfakhri3-Oct-05 0:29 
Questionhow to store BLOB images into Oracle Database using ADO Pin
snprani2-Oct-05 20:58
snprani2-Oct-05 20:58 
AnswerRe: how to store BLOB images into Oracle Database using ADO Pin
S Douglas3-Oct-05 0:27
professionalS Douglas3-Oct-05 0:27 
QuestionDoubt about which message handler to use Pin
Ravi Sankar S2-Oct-05 20:45
Ravi Sankar S2-Oct-05 20:45 
AnswerRe: Doubt about which message handler to use Pin
Lane Yu2-Oct-05 22:01
Lane Yu2-Oct-05 22:01 
AnswerRe: Doubt about which message handler to use Pin
Intertherain3-Oct-05 2:49
Intertherain3-Oct-05 2:49 
QuestionRe: Doubt about which message handler to use Pin
David Crow3-Oct-05 2:54
David Crow3-Oct-05 2:54 
AnswerRe: Doubt about which message handler to use Pin
Ravi Sankar S3-Oct-05 3:27
Ravi Sankar S3-Oct-05 3:27 
QuestionOwner draw ClistCtrl Pin
Jagadeesh VN2-Oct-05 20:30
Jagadeesh VN2-Oct-05 20:30 
QuestionPrinting a Captured Bitmap Pin
karnal2-Oct-05 20:27
karnal2-Oct-05 20:27 
QuestionJPG file Pin
aasstt2-Oct-05 20:05
aasstt2-Oct-05 20:05 
AnswerRe: JPG file Pin
Stlan2-Oct-05 23:47
Stlan2-Oct-05 23:47 
QuestionEnable/Disable pop-up Menu items Pin
lavate malllik2-Oct-05 20:00
lavate malllik2-Oct-05 20:00 
AnswerRe: Enable/Disable pop-up Menu items Pin
lavate malllik2-Oct-05 21:00
lavate malllik2-Oct-05 21:00 
AnswerRe: Enable/Disable pop-up Menu items Pin
Lane Yu2-Oct-05 21:11
Lane Yu2-Oct-05 21:11 
QuestionPreTranslateMessage Pin
Nishad S2-Oct-05 17:47
Nishad S2-Oct-05 17:47 
AnswerRe: PreTranslateMessage Pin
Mircea Puiu2-Oct-05 20:37
Mircea Puiu2-Oct-05 20:37 
GeneralRe: PreTranslateMessage Pin
Nishad S2-Oct-05 22:08
Nishad S2-Oct-05 22:08 
GeneralRe: PreTranslateMessage Pin
Mircea Puiu3-Oct-05 0:53
Mircea Puiu3-Oct-05 0:53 
You can write whatever dll you want Smile | :)

I would recommend you using the following:
<br />
Overwrite the PreTranslateMessage()for your window derived class (whatever that may be):<br />
BOOL CDllWnd::PreTranslateMessage(MSG* pMsg)<br />
{<br />
   if (IsDialogMessage(pMsg))<br />
      return TRUE;<br />
<br />
     return CWnd::PreTranslateMessage(pMsg);<br />
}<br />
-----------<br />
Export then a function<br />
extern "C" DllExport BOOL FAR PASCAL FilterDllMsg(LPMSG lpMsg)<br />
{<br />
   AFX_MANAGE_STATE(AfxGetStaticModuleState())<br />
   TRY<br />
   {<br />
      return AfxGetApp()->PreTranslateMessage(lpMsg);<br />
   }<br />
   END_TRY<br />
<br />
   return FALSE;<br />
}<br />
-----------<br />
In user application:				<br />
BOOL CYours::PreTranslateMessage(MSG* pMsg)<br />
{<br />
   if (CTheBaseClass::PreTranslateMessage(pMsg))<br />
      return TRUE;<br />
<br />
   return FilterDllMsg(pMsg);<br />
}<br />



SkyWalker

-- modified at 6:53 Monday 3rd October, 2005
GeneralRe: PreTranslateMessage Pin
Nishad S3-Oct-05 1:44
Nishad S3-Oct-05 1:44 
QuestionCmenu Pin
act_x2-Oct-05 15:58
act_x2-Oct-05 15:58 

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.