Click here to Skip to main content
15,910,661 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to create a matrix with c++? Pin
Nishad S1-Jan-08 19:13
Nishad S1-Jan-08 19:13 
GeneralRe: how to create a matrix with c++? Pin
CPallini1-Jan-08 21:22
mveCPallini1-Jan-08 21:22 
GeneralRe: how to create a matrix with c++? Pin
Nishad S1-Jan-08 23:18
Nishad S1-Jan-08 23:18 
GeneralRe: how to create a matrix with c++? Pin
CPallini1-Jan-08 21:29
mveCPallini1-Jan-08 21:29 
GeneralRe: how to create a matrix with c++? Pin
Nishad S1-Jan-08 23:26
Nishad S1-Jan-08 23:26 
GeneralRe: how to create a matrix with c++? Pin
gentleguy2-Jan-08 20:41
gentleguy2-Jan-08 20:41 
GeneralDll import/export Pin
ForNow1-Jan-08 15:41
ForNow1-Jan-08 15:41 
GeneralCapture Left Mouse [modified] Pin
Oliver1231-Jan-08 13:01
Oliver1231-Jan-08 13:01 
1. Lets say I have a MFC SDI with a dialog containing 5 edit boxes.
2. I want to left click on any of the five edits and generate "Hello" in it.
3. I have reached the point where I can click anywhere on the dialog and generate "Hello" into one single edit box.
4. I haven't figured out how to determine if the click is in one of the edit boxes rather than anywhere in the dialog.
5. Then I need to know which edit box.

So, I need advice on #4 and #5. Here is what I have:

CTest.h
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);

CTest.cpp
BEGIN_MESSAGE_MAP(CTest, CDialog)<br />
	//{{AFX_MSG_MAP(CTest)<br />
  ON_WM_LBUTTONDOWN()<br />
	//}}AFX_MSG_MAP<br />
END_MESSAGE_MAP()<br />
...<br />
void CTest::OnLButtonDown(UINT nFlags, CPoint point) <br />
{	<br />
	CDialog::OnLButtonDown(nFlags, point);  //this is anywhere on the dialog<br />
	GetDlgItem(IDC_EDIT_C1L1)->SetWindowText("Hello");  //if I knew where it clicked, I could target correct editbox<br />
}


Thanks

modified on Tuesday, January 01, 2008 7:07:59 PM

GeneralRe: Capture Left Mouse Pin
Nishad S1-Jan-08 18:33
Nishad S1-Jan-08 18:33 
GeneralRe: Capture Left Mouse Pin
Mark Salsbery2-Jan-08 7:40
Mark Salsbery2-Jan-08 7:40 
Generalconvert integer number to string text Pin
KARFER1-Jan-08 8:12
KARFER1-Jan-08 8:12 
GeneralRe: convert integer number to string text Pin
CPallini1-Jan-08 8:25
mveCPallini1-Jan-08 8:25 
GeneralRe: convert integer number to string text Pin
KARFER3-Jan-08 1:24
KARFER3-Jan-08 1:24 
GeneralRe: convert integer number to string text Pin
Luc Pattyn1-Jan-08 8:46
sitebuilderLuc Pattyn1-Jan-08 8:46 
GeneralRe: convert integer number to string text Pin
Hamid_RT2-Jan-08 2:53
Hamid_RT2-Jan-08 2:53 
GeneralRe: convert integer number to string text Pin
Joan M2-Jan-08 9:47
professionalJoan M2-Jan-08 9:47 
GeneralRe: convert integer number to string text Pin
KARFER3-Jan-08 1:31
KARFER3-Jan-08 1:31 
GeneralManifest files and XP/Vista look Pin
Tankko1-Jan-08 7:23
Tankko1-Jan-08 7:23 
AnswerRe: Manifest files and XP/Vista look Pin
JudyL_MD1-Jan-08 9:07
JudyL_MD1-Jan-08 9:07 
GeneralMouse button state Pin
Abyss1-Jan-08 3:24
Abyss1-Jan-08 3:24 
QuestionRe: Mouse button state Pin
CPallini1-Jan-08 3:32
mveCPallini1-Jan-08 3:32 
GeneralRe: Mouse button state Pin
Abyss1-Jan-08 3:42
Abyss1-Jan-08 3:42 
QuestionRe: Mouse button state [modified] Pin
CPallini1-Jan-08 4:39
mveCPallini1-Jan-08 4:39 
GeneralRe: Mouse button state Pin
Abyss1-Jan-08 6:34
Abyss1-Jan-08 6:34 
GeneralRe: Mouse button state Pin
CPallini1-Jan-08 6:46
mveCPallini1-Jan-08 6:46 

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.