Click here to Skip to main content
15,905,612 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: About preventing memory leaks Pin
David Crow26-Apr-13 9:00
David Crow26-Apr-13 9:00 
AnswerRe: About preventing memory leaks Pin
jschell26-Apr-13 9:33
jschell26-Apr-13 9:33 
QuestionRegarding storing structures in database Pin
Member 789460125-Apr-13 19:03
Member 789460125-Apr-13 19:03 
AnswerRe: Regarding storing structures in database Pin
Richard MacCutchan25-Apr-13 22:23
mveRichard MacCutchan25-Apr-13 22:23 
AnswerRe: Regarding storing structures in database Pin
Marco Bertschi25-Apr-13 22:36
protectorMarco Bertschi25-Apr-13 22:36 
GeneralRe: Regarding storing structures in database Pin
Member 789460125-Apr-13 22:56
Member 789460125-Apr-13 22:56 
GeneralRe: Regarding storing structures in database Pin
Marco Bertschi25-Apr-13 23:16
protectorMarco Bertschi25-Apr-13 23:16 
GeneralRe: Regarding storing structures in database Pin
Jochen Arndt25-Apr-13 23:34
professionalJochen Arndt25-Apr-13 23:34 
GeneralRe: Regarding storing structures in database Pin
Member 789460125-Apr-13 23:41
Member 789460125-Apr-13 23:41 
GeneralRe: Regarding storing structures in database Pin
Jochen Arndt25-Apr-13 23:57
professionalJochen Arndt25-Apr-13 23:57 
AnswerRe: Regarding storing structures in database Pin
jschell26-Apr-13 9:36
jschell26-Apr-13 9:36 
GeneralRe: Regarding storing structures in database Pin
Member 789460129-Apr-13 1:00
Member 789460129-Apr-13 1:00 
GeneralRe: Regarding storing structures in database Pin
Member 78946011-May-13 0:09
Member 78946011-May-13 0:09 
Questionstrcat_memcpy Pin
khushboo gupta25-Apr-13 18:37
khushboo gupta25-Apr-13 18:37 
AnswerRe: strcat_memcpy Pin
pasztorpisti25-Apr-13 21:07
pasztorpisti25-Apr-13 21:07 
GeneralRe: strcat_memcpy Pin
Freak3026-Apr-13 2:15
Freak3026-Apr-13 2:15 
GeneralRe: strcat_memcpy Pin
pasztorpisti26-Apr-13 2:20
pasztorpisti26-Apr-13 2:20 
AnswerRe: strcat_memcpy Pin
Richard MacCutchan25-Apr-13 22:17
mveRichard MacCutchan25-Apr-13 22:17 
QuestionDoModal in CWnd::PreTranslateMessage( MSG *pMsg ) Pin
Newbie0025-Apr-13 10:26
Newbie0025-Apr-13 10:26 
AnswerRe: DoModal in CWnd::PreTranslateMessage( MSG *pMsg ) Pin
jeron125-Apr-13 10:48
jeron125-Apr-13 10:48 
GeneralRe: DoModal in CWnd::PreTranslateMessage( MSG *pMsg ) Pin
Newbie0025-Apr-13 18:24
Newbie0025-Apr-13 18:24 
AnswerRe: DoModal in CWnd::PreTranslateMessage( MSG *pMsg ) Pin
Richard MacCutchan25-Apr-13 22:14
mveRichard MacCutchan25-Apr-13 22:14 
GeneralRe: DoModal in CWnd::PreTranslateMessage( MSG *pMsg ) Pin
Newbie0026-Apr-13 7:02
Newbie0026-Apr-13 7:02 
Unfortunately I cannot use OnChange. It is to early to disturb user. I have to wait untill user finishes typing. EN_CHANGE is sent after each pressed key and I cannot save data from control to internal buffer during typing. I want to do it, if user decides to leave edit control.

I have also investigated this MSG *pMsg deeper and it occured that: If I let pumping messages (f.e with modal messagebox), I always have to return TRUE in PreTranslateMessage. Saving first message and forwarding it at the end has no sence, because the whole messaging process is disturbed any way.

Here is example of situation, for which my solution with saving *pMSG won't help:

WM_LBUTTONDOWN -> WM_LBUTTONUP pair is very sensitive here.
If I put messagebox between WM_LBUTTONDOWN and WM_LBUTTONUP in PreTranslateMessage it causes WM_LBUTTONUP to run for mouse point from the [OK] button on the messagebox and not for the original coordinates. So code from CFirstClickedArea::OnLButtonUp() will not be run.

So I think, I have to return always TRUE and I have no choice, if I want to use PreTranslateMessage with DoModal.

modified 26-Apr-13 13:22pm.

GeneralRe: DoModal in CWnd::PreTranslateMessage( MSG *pMsg ) Pin
Richard MacCutchan26-Apr-13 7:23
mveRichard MacCutchan26-Apr-13 7:23 
GeneralRe: DoModal in CWnd::PreTranslateMessage( MSG *pMsg ) Pin
Newbie0026-Apr-13 8:01
Newbie0026-Apr-13 8:01 

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.