Click here to Skip to main content
16,005,138 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwhy doesn't the cursor piont to the excuted line in single step debug? Pin
liuyue28-Jan-07 23:15
liuyue28-Jan-07 23:15 
AnswerRe: why doesn't the cursor piont to the excuted line in single step debug? Pin
Waldermort28-Jan-07 23:25
Waldermort28-Jan-07 23:25 
AnswerRe: why doesn't the cursor piont to the excuted line in single step debug? Pin
jhwurmbach28-Jan-07 23:27
jhwurmbach28-Jan-07 23:27 
GeneralRe: why doesn't the cursor piont to the excuted line in single step debug? Pin
krmed29-Jan-07 0:35
krmed29-Jan-07 0:35 
QuestionTo click programmatically on a button Pin
mikobi28-Jan-07 22:31
mikobi28-Jan-07 22:31 
AnswerRe: To click programmatically on a button Pin
baerten28-Jan-07 22:34
baerten28-Jan-07 22:34 
GeneralRe: To click programmatically on a button Pin
mikobi29-Jan-07 4:09
mikobi29-Jan-07 4:09 
GeneralRe: To click programmatically on a button Pin
baerten29-Jan-07 5:13
baerten29-Jan-07 5:13 
totally without the ressource-manager

in the header of the view :

CButton MyButton
.
.
afx_msg void OnBnClickedButton();

in the .cpp File :

BEGIN_MESSAGE_MAP(MyView, CFormView)
.
.
ON_BN_CLICKED(777, OnBnClickedButton) --> it's better to replace 777 with a #define ID_MYBUTTON 777 in your header
.
.
END_MESSAGE_MAP()

.
.

int MyView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFormView::OnCreate(lpCreateStruct) == -1)
return -1;
// Creation of a dynamic button
MyButton.Create(_T("Click me"), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
CRect(10,100,100,130), GetParent(), 777);
}


void MyView::OnBnClickedSuche()
{
MessageBox("You clicked me");
}


If you click on the Button, the application knows that it's the control with ID 777, so it
looks into the MessageMap and sees that an OnClick on ID 777 must perform the function OnBnClickedSuche()

So he steps into it

If you like to launch this function yourself, you need simply to call
OnBnClickedSuche();
thats all

i hope that helps you


AnswerRe: To click programmatically on a button Pin
Waldermort28-Jan-07 23:06
Waldermort28-Jan-07 23:06 
GeneralRe: To click programmatically on a button Pin
Roger Stoltz29-Jan-07 0:44
Roger Stoltz29-Jan-07 0:44 
QuestionUpper Triangular Matrix Pin
73Zeppelin28-Jan-07 22:23
73Zeppelin28-Jan-07 22:23 
AnswerRe: Upper Triangular Matrix Pin
Waldermort28-Jan-07 23:12
Waldermort28-Jan-07 23:12 
QuestionA HyperLink Should OPen Other New Window Pin
Praveena.V28-Jan-07 21:55
Praveena.V28-Jan-07 21:55 
AnswerRe: A HyperLink Should OPen Other New Window Pin
Don Box28-Jan-07 22:12
Don Box28-Jan-07 22:12 
GeneralRe: A HyperLink Should OPen Other New Window Pin
Praveena.V28-Jan-07 22:19
Praveena.V28-Jan-07 22:19 
GeneralRe: A HyperLink Should OPen Other New Window Pin
prasad_som28-Jan-07 22:31
prasad_som28-Jan-07 22:31 
GeneralRe: A HyperLink Should OPen Other New Window Pin
Don Box28-Jan-07 22:32
Don Box28-Jan-07 22:32 
GeneralRe: A HyperLink Should OPen Other New Window Pin
Hamid_RT29-Jan-07 18:16
Hamid_RT29-Jan-07 18:16 
QuestionMFC or Windows Forms Application Pin
whatever@whatever.com28-Jan-07 21:52
whatever@whatever.com28-Jan-07 21:52 
AnswerRe: MFC or Windows Forms Application Pin
benjymous29-Jan-07 1:04
benjymous29-Jan-07 1:04 
QuestionMy process should not get killed through task manager Pin
dvsr28-Jan-07 21:50
dvsr28-Jan-07 21:50 
AnswerRe: My process should not get killed through task manager Pin
Waldermort28-Jan-07 23:17
Waldermort28-Jan-07 23:17 
AnswerRe: My process should not get killed through task manager Pin
Hamid_RT29-Jan-07 18:14
Hamid_RT29-Jan-07 18:14 
QuestionAbout Encryption/Decryption using CRijndael class. Pin
Vikram.....28-Jan-07 21:48
Vikram.....28-Jan-07 21:48 
AnswerRe: About Encryption/Decryption using CRijndael class. Pin
Waldermort28-Jan-07 23:21
Waldermort28-Jan-07 23:21 

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.