Dear Fons, In implementation TestMsgBox::ProcessMessage, I did some correction as followed: ................ switch(GET_SUBMSG(msg)) { case kCM_BUTTON: switch(parm1) { case 1: SetWindowAttributes_t wattr; wattr.fMask = kWABackPixel; gClient->GetColorByName("blue",wattr.fBackgroundPixel); gGXW->ChangeWindowAttributes(fTestButton->GetId(),&wattr); break; case 2: SetWindowAttributes_t wattr; wattr.fMask = kWABackPixel; gClient->GetColorByName("red",wattr.fBackgroundPixel); gGXW->ChangeWindowAttributes(fTestButton->GetId(),&wattr); break; ........................ What I want is when clicking "close" button, the "test" can change to red, and when clicking "test" button, it will change to blue. But the result is : o After clicking "close" button, nothing happen. If continue to click "test" button, it will change to red. o If start from the beginning, after clicking "test" button, nothing happen, but if click it twice, it change to blue. Is there anything wrong with my operation ? Sincerely yours Xie
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:28 MET