Click here to Skip to main content
15,895,370 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what happend if i give codes in between #if 0 and #endif Pin
CPallini7-Sep-09 21:14
mveCPallini7-Sep-09 21:14 
QuestionStrings in the code Pin
Nick_1117-Sep-09 19:03
Nick_1117-Sep-09 19:03 
AnswerRe: Strings in the code Pin
Naveen7-Sep-09 20:21
Naveen7-Sep-09 20:21 
AnswerRe: Strings in the code Pin
Iain Clarke, Warrior Programmer7-Sep-09 21:03
Iain Clarke, Warrior Programmer7-Sep-09 21:03 
GeneralRe: Strings in the code Pin
Michael Schubert7-Sep-09 22:30
Michael Schubert7-Sep-09 22:30 
AnswerRe: Strings in the code Pin
CPallini7-Sep-09 21:10
mveCPallini7-Sep-09 21:10 
AnswerRe: Strings in the code Pin
Michael Schubert7-Sep-09 22:34
Michael Schubert7-Sep-09 22:34 
QuestionClosing of dialog box crashes application Pin
Le@rner7-Sep-09 18:12
Le@rner7-Sep-09 18:12 
Hi all,

I am trying to handle keyboard strokes. For handling ctrl+c i have written this piece of code in my PreTranslateMsg function
BOOL CKeyboardStroke::PreTranslateMessage(MSG* pMsg) 
{
	 switch(pMsg->message) 
	 {   
	  case WM_KEYDOWN: 
		  {
			  if(GetKeyState(VK_CONTROL) && (pMsg->wParam == 0x43))
			  {
                                  CTest obj;
                                  obj.DoModal();
			  }
			  if(GetKeyState(VK_CONTROL) && (pMsg->wParam == 0x56))
			  {
				  AfxMessageBox(_T("ctrl V"));
			  }
		 }
	  }
	
	return CDialog::PreTranslateMessage(pMsg);
}


But my problem is when i press ctrl+c dialog box is opened and when i close it my application crashes.

Can anybody help me in this.

Thanks in advance

To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.

AnswerRe: Closing of dialog box crashes application Pin
theCPkid7-Sep-09 18:31
theCPkid7-Sep-09 18:31 
GeneralRe: Closing of dialog box crashes application Pin
Le@rner7-Sep-09 18:34
Le@rner7-Sep-09 18:34 
QuestionSet the text of spincontrol( Updown control) using sendmessage Pin
Bedke7-Sep-09 18:07
Bedke7-Sep-09 18:07 
AnswerRe: Set the text of spincontrol( Updown control) using sendmessage Pin
Selvam R8-Sep-09 0:20
professionalSelvam R8-Sep-09 0:20 
GeneralRe: Set the text of spincontrol( Updown control) using sendmessage Pin
Bedke8-Sep-09 0:25
Bedke8-Sep-09 0:25 
QuestionSetWindowPos API doubt Pin
theCPkid7-Sep-09 15:47
theCPkid7-Sep-09 15:47 
AnswerRe: SetWindowPos API doubt Pin
«_Superman_»7-Sep-09 16:01
professional«_Superman_»7-Sep-09 16:01 
QuestionOverloading cast & assignment not enough for ==? Pin
dplong7-Sep-09 11:22
dplong7-Sep-09 11:22 
QuestionRe: Overloading cast & assignment not enough for ==? Pin
CPallini7-Sep-09 11:54
mveCPallini7-Sep-09 11:54 
AnswerRe: Overloading cast & assignment not enough for ==? Pin
dplong7-Sep-09 12:30
dplong7-Sep-09 12:30 
AnswerRe: Overloading cast & assignment not enough for ==? Pin
Stuart Dootson7-Sep-09 14:41
professionalStuart Dootson7-Sep-09 14:41 
QuestionRe: Overloading cast & assignment not enough for ==? [modified] Pin
dplong7-Sep-09 18:39
dplong7-Sep-09 18:39 
QuestionWhy do functions in the C library have short names? Pin
0x3c07-Sep-09 10:58
0x3c07-Sep-09 10:58 
AnswerRe: Why do functions in the C library have short names? Pin
CPallini7-Sep-09 11:13
mveCPallini7-Sep-09 11:13 
AnswerRe: Why do functions in the C library have short names? Pin
dplong7-Sep-09 11:32
dplong7-Sep-09 11:32 
AnswerRe: Why do functions in the C library have short names? Pin
Richard MacCutchan7-Sep-09 11:33
mveRichard MacCutchan7-Sep-09 11:33 
AnswerRe: Why do functions in the C library have short names? Pin
Stuart Dootson7-Sep-09 14:45
professionalStuart Dootson7-Sep-09 14:45 

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.