ownderdraw
-
hi everybody, Can any one of u help me to brushing on a ownder draw button I have few owner draw buttons on a dialogbox which is created in an SDI application and now i want to change the color of the buttons can any one tell me what code do i need to write for that my code is as follow void MybutCls::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) { ::DrawFrameControl(lpDrawItemStruct->hDC, &lpDrawItemStruct->rcItem, DFC_BUTTON,DFCS_BUTTONPUSH|BS_DEFPUSHBUTTON); //what should i add here if(((0x8000 ==(0x8000 & GetKeyState(16))&& !caps)) || ((0x8000 ==(0x8000 & GetKeyState(16))&& caps))) { if(lpDrawItemStruct->CtlID==IDC_BUTTON49) ::DrawText(lpDrawItemStruct->hDC,"!",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON45) ::DrawText(lpDrawItemStruct->hDC,"_",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON39 ) ::DrawText(lpDrawItemStruct->hDC,"\"",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON44) ::DrawText(lpDrawItemStruct->hDC,"<",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON46) ::DrawText(lpDrawItemStruct->hDC,">",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON47) ::DrawText(lpDrawItemStruct->hDC,"?",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON48) ::DrawText(lpDrawItemStruct->hDC,")",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON50) ::DrawText(lpDrawItemStruct->hDC,"@",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON51) ::DrawText(lpDrawItemStruct->hDC,"#",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON52) ::DrawText(lpDrawItemStruct->hDC,"$",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON53) ::DrawText(lpDrawItemStruct->hDC,"%",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON54) ::DrawText(lpDrawItemStruct->hDC,"^",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER); if(lpDrawItemStruct->CtlID==IDC_BUTTON55) ::DrawText(lpDrawItemStruct->hDC,"&",1,&lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENT