Click here to Skip to main content
15,899,024 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using namespace in VC6.0 ? Pin
Chris Losinger27-May-12 2:57
professionalChris Losinger27-May-12 2:57 
GeneralRe: Using namespace in VC6.0 ? Pin
Vaclav_27-May-12 4:53
Vaclav_27-May-12 4:53 
GeneralRe: Using namespace in VC6.0 ? Pin
Chris Losinger27-May-12 5:00
professionalChris Losinger27-May-12 5:00 
GeneralRe: Using namespace in VC6.0 ? Pin
Aescleal28-May-12 5:32
Aescleal28-May-12 5:32 
GeneralRe: Using namespace in VC6.0 ? Pin
Chris Losinger28-May-12 5:54
professionalChris Losinger28-May-12 5:54 
GeneralRe: Using namespace in VC6.0 ? Pin
Aescleal28-May-12 5:29
Aescleal28-May-12 5:29 
GeneralRe: Using namespace in VC6.0 ? Pin
Vaclav_28-May-12 7:22
Vaclav_28-May-12 7:22 
QuestionBest Approach to process KeyStrokes in Rich Edit Pin
ForNow25-May-12 10:47
ForNow25-May-12 10:47 
Hi,

I am looking for the best approach to process KeyStroked <ENTER> <F7> <F8>

My code is MFC using Message using message mapping macros

I have a number of questions

1) what would the message be for a Keystrokes

2) is the message directed to the Dialog Box that contains the rich edit or is better to have the rich edit process to message

3) if I wrap the CDialog with a CWinThread

I can use the ::Run command to process the key strokes

<pre lang='cpp'> int CWinthread::Run()
{ ASSERT_VALID(this);
MSG m_msgCur;
for tracking the idle time state
if (!flags.is_connected)
return TRUE;
BOOL bIdle = TRUE;
LONG lIdleCount = 0;
// acquire and dispatch messages until a WM_QUIT message is received.
for (;;)
{ phase1: // check to see if we can do idle work
while (bIdle && !::PeekMessage(&m_msgCur, NULL, NULL, NULL, PM_NOREMOVE))
{ // call OnIdle while in bIdle state
if (!OnIdle(lIdleCount++))
bIdle = FALSE; // assume "no idle" state
} // phase2: pump messages while available
do { // pump message, but quit on WM_QUIT
if (!PumpMessage())
return ExitInstance();
// reset "no idle" state after pumping "normal" message
if (IsIdleMessage(&m_msgCur)) {
bIdle = TRUE;
lIdleCount = 0;}
} while (::PeekMessage(&m_msgCur, NULL, NULL, NULL, PM_NOREMOVE));
}
ASSERT(FALSE); // not reachable
} </pre>

thanks for youe help
AnswerRe: Best Approach to process KeyStrokes in Rich Edit Pin
«_Superman_»26-May-12 17:35
professional«_Superman_»26-May-12 17:35 
GeneralRe: Best Approach to process KeyStrokes in Rich Edit Pin
JohnCz27-May-12 8:07
JohnCz27-May-12 8:07 
GeneralRe: Best Approach to process KeyStrokes in Rich Edit Pin
ForNow28-May-12 18:25
ForNow28-May-12 18:25 
Questionquality metrics for edge detection Pin
Mamatha Eswaraiah24-May-12 7:26
Mamatha Eswaraiah24-May-12 7:26 
QuestionIs SetCursorPos() Calling MouseMove ? Pin
002comp24-May-12 2:34
002comp24-May-12 2:34 
AnswerRe: Is SetCursorPos() Calling MouseMove ? Pin
TomasRiker224-May-12 10:53
TomasRiker224-May-12 10:53 
AnswerRe: Is SetCursorPos() Calling MouseMove ? Pin
«_Superman_»24-May-12 16:18
professional«_Superman_»24-May-12 16:18 
GeneralRe: Is SetCursorPos() Calling MouseMove ? Pin
002comp24-May-12 19:56
002comp24-May-12 19:56 
GeneralRe: Is SetCursorPos() Calling MouseMove ? Pin
«_Superman_»24-May-12 20:12
professional«_Superman_»24-May-12 20:12 
GeneralRe: Is SetCursorPos() Calling MouseMove ? Pin
002comp24-May-12 20:40
002comp24-May-12 20:40 
GeneralRe: Is SetCursorPos() Calling MouseMove ? Pin
002comp24-May-12 21:19
002comp24-May-12 21:19 
GeneralRe: Is SetCursorPos() Calling MouseMove ? Pin
«_Superman_»24-May-12 21:42
professional«_Superman_»24-May-12 21:42 
GeneralRe: Is SetCursorPos() Calling MouseMove ? Pin
002comp24-May-12 23:52
002comp24-May-12 23:52 
GeneralRe: Is SetCursorPos() Calling MouseMove ? Pin
«_Superman_»25-May-12 0:00
professional«_Superman_»25-May-12 0:00 
GeneralRe: Is SetCursorPos() Calling MouseMove ? [Working] Pin
002comp25-May-12 2:55
002comp25-May-12 2:55 
AnswerRe: Is SetCursorPos() Calling MouseMove ? Pin
Randor 25-May-12 1:25
professional Randor 25-May-12 1:25 
GeneralRe: Is SetCursorPos() Calling MouseMove ? Pin
JohnCz27-May-12 8:31
JohnCz27-May-12 8:31 

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.