Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
Mark Salsbery27-Jan-09 6:15
Mark Salsbery27-Jan-09 6:15 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
ForNow27-Jan-09 6:40
ForNow27-Jan-09 6:40 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
Mark Salsbery27-Jan-09 6:52
Mark Salsbery27-Jan-09 6:52 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
ForNow27-Jan-09 13:13
ForNow27-Jan-09 13:13 
Questionheap corruption after call to select() [modified] Pin
aliusam26-Jan-09 13:59
aliusam26-Jan-09 13:59 
AnswerRe: heap corruption after call to select() Pin
Cosmic Egg29-Jan-09 9:43
Cosmic Egg29-Jan-09 9:43 
QuestionHaving trouble with IOleCommandTarget interface Pin
Haim Nachum26-Jan-09 10:09
Haim Nachum26-Jan-09 10:09 
AnswerRe: Having trouble with IOleCommandTarget interface Pin
«_Superman_»26-Jan-09 17:32
professional«_Superman_»26-Jan-09 17:32 
GeneralRe: Having trouble with IOleCommandTarget interface Pin
Haim Nachum27-Jan-09 2:26
Haim Nachum27-Jan-09 2:26 
QuestionVC++ 2008 Application and MSI Package Pin
pratap198026-Jan-09 6:39
pratap198026-Jan-09 6:39 
AnswerRe: VC++ 2008 Application and MSI Package Pin
Stuart Dootson26-Jan-09 7:06
professionalStuart Dootson26-Jan-09 7:06 
GeneralRe: VC++ 2008 Application and MSI Package Pin
pratap198026-Jan-09 7:28
pratap198026-Jan-09 7:28 
AnswerRe: VC++ 2008 Application and MSI Package Pin
Randor 26-Jan-09 8:02
professional Randor 26-Jan-09 8:02 
GeneralRe: VC++ 2008 Application and MSI Package Pin
pratap198026-Jan-09 11:04
pratap198026-Jan-09 11:04 
QuestionHide some lines of RichEditCtrl Pin
SutterA25-Jan-09 22:17
SutterA25-Jan-09 22:17 

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.