Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: migrating from socket programming in C to C++ Pin
ADTC#14-May-08 16:38
ADTC#14-May-08 16:38 
GeneralRe: migrating from socket programming in C to C++ Pin
Naveen14-May-08 16:42
Naveen14-May-08 16:42 
QuestionRe: migrating from socket programming in C to C++ Pin
ADTC#14-May-08 15:14
ADTC#14-May-08 15:14 
QuestionResource view with converted project Pin
Vancouver14-May-08 12:13
Vancouver14-May-08 12:13 
QuestionRe: Resource view with converted project Pin
CPallini14-May-08 21:08
mveCPallini14-May-08 21:08 
AnswerRe: Resource view with converted project Pin
Hamid_RT15-May-08 0:13
Hamid_RT15-May-08 0:13 
AnswerAnswers to the above questions, addendum Pin
Vancouver15-May-08 5:54
Vancouver15-May-08 5:54 
QuestionQuestions about subclassing controls. Pin
jonsey2984714-May-08 9:31
jonsey2984714-May-08 9:31 
I am trying to subclass a CTEXT control in my dialog, I am using the following code.

LRESULT CALLBACK SetCommStat(HWND hItem, UINT message, WPARAM wParam, LPARAM lParam)
{
   PAINTSTRUCT lpPaintStruct;
   switch  (message)
      {
       case WM_PAINT:
          BeginPaint(hItem, &lpPaintStruct);
	  GetDC(hItem);
	  SetBkColor(hItem, crRED);
          EndPaint(hItem, &lpPaintStruct);
	  ReleaseDC(hwndDlg, hItem);
       return(0);
      }
   return(DefWindowProc(hItem, message, wParam, lParam));
}


I also have the following in the WM_INITDIALOG message handler.

hItemHandle = GetDlgItem(hwndDlg,IND_ONLINE);
int test = SetWindowLong(hItemHandle, GWL_WNDPROC, (LONG)SetCommStat);


1. Am I trapping the wrong message, if so what message should I trap?

2. Why has the call to SetWindowText stopped working?

Thanks for your help.
QuestionRe: Questions about subclassing controls. Pin
David Crow14-May-08 9:59
David Crow14-May-08 9:59 
AnswerRe: Questions about subclassing controls. Pin
jonsey2984714-May-08 23:12
jonsey2984714-May-08 23:12 
AnswerRe: Questions about subclassing controls. Pin
Paresh Chitte14-May-08 19:02
Paresh Chitte14-May-08 19:02 
GeneralRe: Questions about subclassing controls. Pin
jonsey2984714-May-08 23:17
jonsey2984714-May-08 23:17 
QuestionExcel problem Pin
Chandrasekharan P14-May-08 5:38
Chandrasekharan P14-May-08 5:38 
AnswerRe: Excel problem Pin
toxcct14-May-08 5:44
toxcct14-May-08 5:44 
GeneralRe: Excel problem Pin
Chandrasekharan P14-May-08 5:47
Chandrasekharan P14-May-08 5:47 
AnswerRe: Excel problem Pin
David Crow14-May-08 6:53
David Crow14-May-08 6:53 
GeneralRe: Excel problem Pin
Chandrasekharan P14-May-08 15:48
Chandrasekharan P14-May-08 15:48 
QuestionRe: Excel problem Pin
David Crow15-May-08 3:46
David Crow15-May-08 3:46 
GeneralRe: Excel problem Pin
Chandrasekharan P14-May-08 18:05
Chandrasekharan P14-May-08 18:05 
GeneralRe: Excel problem Pin
CPallini14-May-08 21:07
mveCPallini14-May-08 21:07 
GeneralRe: Excel problem Pin
Chandrasekharan P18-May-08 3:23
Chandrasekharan P18-May-08 3:23 
Questionwhy blank space in password edit control in VS2005? how to avaoid r any workarround? Pin
sarat14-May-08 5:28
sarat14-May-08 5:28 
AnswerRe: why blank space in password edit control in VS2005? how to avaoid r any workarround? Pin
toxcct14-May-08 5:34
toxcct14-May-08 5:34 
AnswerRe: why blank space in password edit control in VS2005? how to avaoid r any workarround? Pin
Mark Salsbery14-May-08 7:12
Mark Salsbery14-May-08 7:12 
AnswerRe: why blank space in password edit control in VS2005? how to avaoid r any workarround? Pin
Hamid_RT14-May-08 18:05
Hamid_RT14-May-08 18:05 

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.