Click here to Skip to main content
15,906,094 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionExport string from Dll Pin
Max++3-Nov-07 21:02
Max++3-Nov-07 21:02 
QuestionTracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr3-Nov-07 15:39
Larry Mills Sr3-Nov-07 15:39 
AnswerRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Nelek4-Nov-07 21:41
protectorNelek4-Nov-07 21:41 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr5-Nov-07 5:57
Larry Mills Sr5-Nov-07 5:57 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls [modified] Pin
Nelek5-Nov-07 20:30
protectorNelek5-Nov-07 20:30 
AnswerRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery5-Nov-07 5:54
Mark Salsbery5-Nov-07 5:54 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr5-Nov-07 6:03
Larry Mills Sr5-Nov-07 6:03 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery5-Nov-07 6:34
Mark Salsbery5-Nov-07 6:34 
Larry Mills Sr wrote:
I'm sorry, but I simply don't know how to do what you said.


No need to apologize - that's why we're here Smile | :)

Most (if not all) controls send notification messages to their
parent window when certain events occur. 

For edit controls, there's two handy notifications that can help in your situation.
One is EN_CHANGE, which is sent to the control's parent whenever the user makes a
change in the edit box.  The other is EN_SETFOCUS, which is sent to the control's
parent whenever an edit control receives keyboard/input focus.

To catch these in MFC, you can do something like this:
// Add method declarations to dialog class
afx_msg void OnTiresEditChange();
afx_msg void OnTiresEditSetFocus();

...
// Add to dialog class' message map
ON_EN_CHANGE(IDC_TIRES, &CMyDialog::OnTiresEditChange)
ON_EN_SETFOCUS(IDC_TIRES, &CMyDialog::OnTiresEditSetFocus)

...
// Add implementation for the new methods

void CMyDialog::OnTiresEditChange()
{
   // do something when IDC_TIRES edit control text changes
}

void CMyDialog::OnTiresEditSetFocus()
{
   // do something when IDC_TIRES edit control gets focus
}
Operations with control notifications like this are pretty much essential
when doing UI coding, so I'd recommend practicing and familiarizing yourself with
them.

The Win32 Control Library[^] is one of the areas of the SDK I use most.  For each
common control, there's lists of messages for manipulating the controls and notification
messages sent by the controls.  Very handy for this stuff Smile | :)

Mark




Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Tracking a mouse movement inside a dialog without Tab controls [modified] Pin
Larry Mills Sr5-Nov-07 9:10
Larry Mills Sr5-Nov-07 9:10 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery5-Nov-07 10:48
Mark Salsbery5-Nov-07 10:48 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr5-Nov-07 11:25
Larry Mills Sr5-Nov-07 11:25 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery5-Nov-07 11:45
Mark Salsbery5-Nov-07 11:45 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr6-Nov-07 2:59
Larry Mills Sr6-Nov-07 2:59 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery6-Nov-07 4:43
Mark Salsbery6-Nov-07 4:43 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr6-Nov-07 5:45
Larry Mills Sr6-Nov-07 5:45 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery6-Nov-07 8:03
Mark Salsbery6-Nov-07 8:03 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr6-Nov-07 10:05
Larry Mills Sr6-Nov-07 10:05 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery6-Nov-07 10:15
Mark Salsbery6-Nov-07 10:15 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Nelek6-Nov-07 21:06
protectorNelek6-Nov-07 21:06 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls [modified] Pin
Larry Mills Sr7-Nov-07 4:00
Larry Mills Sr7-Nov-07 4:00 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Nelek14-Nov-07 3:35
protectorNelek14-Nov-07 3:35 
Questionfolder constants (for opening) Pin
shpid3r3-Nov-07 12:59
shpid3r3-Nov-07 12:59 
AnswerRe: folder constants (for opening) Pin
Peter Weyzen3-Nov-07 19:01
Peter Weyzen3-Nov-07 19:01 
QuestionGetOpenFileName hangs Pin
andrew_dk3-Nov-07 12:31
andrew_dk3-Nov-07 12:31 
AnswerRe: GetOpenFileName hangs [modified] Pin
Peter Weyzen3-Nov-07 18:44
Peter Weyzen3-Nov-07 18: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.