Click here to Skip to main content
15,922,533 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Killfocus not working on Button Control . Pin
Le@rner26-Jan-09 22:04
Le@rner26-Jan-09 22:04 
GeneralRe: Killfocus not working on Button Control . Pin
Nishad S26-Jan-09 22:06
Nishad S26-Jan-09 22:06 
AnswerRe: Killfocus not working on Button Control . Pin
aks.26-Jan-09 21:33
aks.26-Jan-09 21:33 
QuestionHow to remove the special character in CString? Pin
AnithaSubramani26-Jan-09 18:26
AnithaSubramani26-Jan-09 18:26 
AnswerRe: How to remove the special character in CString? Pin
Nishad S26-Jan-09 18:49
Nishad S26-Jan-09 18:49 
Questionlan cable Pin
pramod_r26-Jan-09 18:08
pramod_r26-Jan-09 18:08 
AnswerRe: lan cable Pin
Sarath C26-Jan-09 19:12
Sarath C26-Jan-09 19:12 
AnswerRe: lan cable Pin
aks.26-Jan-09 20:07
aks.26-Jan-09 20:07 
AnswerRe: lan cable Pin
Randor 26-Jan-09 20:54
professional Randor 26-Jan-09 20:54 
GeneralRe: lan cable Pin
Iain Clarke, Warrior Programmer27-Jan-09 4:02
Iain Clarke, Warrior Programmer27-Jan-09 4:02 
GeneralRe: lan cable Pin
Randor 27-Jan-09 7:50
professional Randor 27-Jan-09 7:50 
GeneralRe: lan cable Pin
Sarath C27-Jan-09 7:20
Sarath C27-Jan-09 7:20 
Questionhow to store Object using CArchive? Pin
mikert_200826-Jan-09 17:23
mikert_200826-Jan-09 17:23 
AnswerRe: how to store Object using CArchive? Pin
Randor 26-Jan-09 18:06
professional Randor 26-Jan-09 18:06 
Questionhow to get substring of a CString Pin
l_d26-Jan-09 16:33
l_d26-Jan-09 16:33 
AnswerRe: how to get substring of a CString Pin
Nishad S26-Jan-09 17:11
Nishad S26-Jan-09 17:11 
AnswerRe: how to get substring of a CString Pin
David Crow26-Jan-09 17:16
David Crow26-Jan-09 17:16 
AnswerRe: how to get substring of a CString Pin
vijith.squadz26-Jan-09 19:15
professionalvijith.squadz26-Jan-09 19:15 
QuestionButton Code "DEFPUSHBUTTON" code not receving control Pin
ForNow26-Jan-09 15:47
ForNow26-Jan-09 15:47 
QuestionRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
«_Superman_»26-Jan-09 17:36
professional«_Superman_»26-Jan-09 17:36 
AnswerRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
ForNow26-Jan-09 23:06
ForNow26-Jan-09 23:06 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
«_Superman_»26-Jan-09 23:10
professional«_Superman_»26-Jan-09 23:10 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
ForNow27-Jan-09 2:47
ForNow27-Jan-09 2:47 
This the entire Dialog Code right below WM_INITDIALOG is the IDCANCEL1 case

I think the problem is the the Cancel button appears to be disabled meaning as if it has aleady been depressed (perferation around the button) Which is why in the INITDIALOG I do a BM_SETSTATE meesage


thankx again

case WM_INITDIALOG:
{
RichWindow = GetDlgItem(hwndDlg,IDC_RICHEDIT21);
SetFocus(RichWindow);
SendDlgItemMessage(hwndDlg, IDCANCEL1, BM_SETSTATE,0,0);
strncpy(&stor_start[0],&command[2],8); // copy command buffer
stor_start[8] = 0x00; // null mark
start_stor = atoi((const char *) &stor_start[0]); // convert to decimal
strncpy(&stor_end[0],&command[11],8); // copy over buffer
stor_end[8] = 0x00; // mark ens
end_stor = atoi((const char *) &stor_end[0]);
SendDlgItemMessage(hwndDlg, IDC_RICHEDIT21, EM_SETWORDBREAKPROC, 0, (LPSTR) EditWordBreakProc);
strcpy(&stor_char[0],&stor_start); // start at the begining
strncpy(&stor_buffer[0],&stor_start[0],8);
for (stor_count = start_stor; stor_count < end_stor; stor_count +=16)
{

memset( &cf, 0, sizeof cf );
cf.cbSize = sizeof cf;
cf.dwMask = CFM_COLOR;
cf.crTextColor = RGB(255,0,0);
cr.cpMin = 1;
cr.cpMax = 7;
SendDlgItemMessage(hwndDlg, IDC_RICHEDIT21, EM_EXSETSEL,0,&cr); // Set the Seelction
SendDlgItemMessage( hwndDlg, IDC_RICHEDIT21, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
strncpy(&stor_buffer[10],&buffer[buff_count],4);
buff_count+=4;
strncpy(&stor_buffer[15],&buffer[buff_count],4);
buff_count+=4;
strncpy(&stor_buffer[21],&buffer[buff_count],4);
buff_count+=4;
strncpy(&stor_buffer[26],&buffer[buff_count],4);
buff_count+=4;
stor_buffer[32]= '/r';
SendDlgItemMessage(hwndDlg, IDC_RICHEDIT21, WM_SETTEXT,0, (LPARAM) &stor_buffer[0]);
mysettext.flags = ST_DEFAULT;
mysettext.codepage = CP_ACP;
SendMessage(Stor_edit,EM_SETTEXTEX,&mysettext,(LPSTR) &stor_buffer[0]);

}
return TRUE;
}

case WM_COMMAND:
switch (LOWORD(wParam))
{
switch (LOWORD (wParam))
{
case IDCANCEL1:
DestroyWindow(hwndDlg);
hwndDlg = NULL;
break;
}
}
default:
return FALSE;
}
}
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
JudyL_MD27-Jan-09 3:35
JudyL_MD27-Jan-09 3:35 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
ForNow27-Jan-09 6:04
ForNow27-Jan-09 6:04 

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.