Click here to Skip to main content
13,342,925 members (57,480 online)

C / C++ / MFC

 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 20:26
memberho_khalaf26-Nov-12 20:26 
QuestionWhat are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name? Pin
lucky_122122-Nov-12 1:41
memberlucky_122122-Nov-12 1:41 
AnswerRe: What are the steps required, i will connect to the SQL named instance server using the "CDatabase::OpenEx" by using the DNS Name? Pin
Richard MacCutchan22-Nov-12 4:38
mvpRichard MacCutchan22-Nov-12 4:38 
QuestionChanging Dialog Button Color at runTime Pin
yogeshs21-Nov-12 0:07
memberyogeshs21-Nov-12 0:07 
AnswerRe: Changing Dialog Button Color at runTime Pin
manoranjan21-Nov-12 1:05
membermanoranjan21-Nov-12 1:05 
GeneralRe: Changing Dialog Button Color at runTime Pin
yogeshs21-Nov-12 1:37
memberyogeshs21-Nov-12 1:37 
GeneralRe: Changing Dialog Button Color at runTime Pin
manoranjan21-Nov-12 2:12
membermanoranjan21-Nov-12 2:12 
GeneralRe: Changing Dialog Button Color at runTime Pin
yogeshs21-Nov-12 19:56
memberyogeshs21-Nov-12 19:56 
I took HBRUSH as Global variable and then how it will be responsible for drawing all buttons and with different color.

Here is WM_DRAWITEM:
case WM_DRAWITEM:
        {
           
			 LPDRAWITEMSTRUCT lpDrawItemStruct = (DRAWITEMSTRUCT*)lParam;
			 switch (lpDrawItemStruct->itemAction)
			{
               	case ODA_DRAWENTIRE:
				case ODA_SELECT:
				{
					
			        int ndxColor = 0 ;
					switch (lpDrawItemStruct->CtlID)
					{
					  case  IDC_btnPantone1 : ndxColor = 0 ; break ; 
					  case  IDC_btnPantone2 : ndxColor = 1 ; break ; 
					  case  IDC_btnPantone3 : ndxColor = 2 ; break ; 
					  case  IDC_btnPantone4 : ndxColor = 3 ; break ; 
					  case  IDC_btnPantone5 : ndxColor = 4 ; break ; 
					  case  IDC_btnPantone6 : ndxColor = 5 ; break ; 
					  case  IDC_btnPantone7 : ndxColor = 6 ; break ; 
					  default : break ;
					}
					switch (lpDrawItemStruct->CtlID)
					{
					  case  IDC_btnPantone1 :  
					  case  IDC_btnPantone2 : 
					  case  IDC_btnPantone3 : 
					  case  IDC_btnPantone4 : 
					  case  IDC_btnPantone5 : 
					  case  IDC_btnPantone6 : 
					  case  IDC_btnPantone7 : 
								DrawButtonColor (ndxColor, lpDrawItemStruct) ; 
								break ;
					  default : break ;
					}
					
				  }
				default:
					return DefWindowProc (hwndDlg, msg, wParam, lParam);
				  break;
                break;
			 } 
			 return TRUE;
        }

                       case WM_CTLCOLORBTN :
			{
			      SetBkColor((HDC)wParam, RGB(0,0,255));
					return (BOOL)g_hBrush;
				
			}

it is not changing .
Or m wrong somewhere ?

GeneralRe: Changing Dialog Button Color at runTime Pin
manoranjan21-Nov-12 20:40
membermanoranjan21-Nov-12 20:40 
QuestionMinimize CDialog Problem Pin
yu-jian20-Nov-12 7:22
groupyu-jian20-Nov-12 7:22 
AnswerRe: Minimize CDialog Problem Pin
jeron120-Nov-12 7:31
memberjeron120-Nov-12 7:31 
QuestionRe: Minimize CDialog Problem Pin
Maximilien20-Nov-12 9:26
memberMaximilien20-Nov-12 9:26 
QuestionCheck if a character is lowercase and change to uppercase. Pin
MitchG92_2420-Nov-12 1:49
memberMitchG92_2420-Nov-12 1:49 
AnswerRe: Check if a character is lowercase and change to uppercase. Pin
MitchG92_2420-Nov-12 1:56
memberMitchG92_2420-Nov-12 1:56 
AnswerRe: Check if a character is lowercase and change to uppercase. Pin
sajeesh.c20-Nov-12 18:34
membersajeesh.c20-Nov-12 18:34 
GeneralRe: Check if a character is lowercase and change to uppercase. Pin
Richard MacCutchan20-Nov-12 22:31
mvpRichard MacCutchan20-Nov-12 22:31 
QuestionIs it possible to capture an HD video/ to generate videos in HD in C++/VC++/MFC.? Pin
mbatra3119-Nov-12 23:15
membermbatra3119-Nov-12 23:15 
QuestionProblem with string conversion Pin
HungryCPPDev19-Nov-12 20:08
memberHungryCPPDev19-Nov-12 20:08 
AnswerRe: Problem with string conversion Pin
Jochen Arndt19-Nov-12 22:40
memberJochen Arndt19-Nov-12 22:40 
GeneralRe: Problem with string conversion Pin
HungryCPPDev20-Nov-12 19:05
memberHungryCPPDev20-Nov-12 19:05 
GeneralRe: Problem with string conversion Pin
Jochen Arndt22-Nov-12 3:52
memberJochen Arndt22-Nov-12 3:52 
QuestionHow to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha19-Nov-12 17:43
memberrahul.kulshreshtha19-Nov-12 17:43 
AnswerRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan19-Nov-12 23:50
mvpRichard MacCutchan19-Nov-12 23:50 
GeneralRe: How to set the alignment of items of CListCtrl Pin
rahul.kulshreshtha20-Nov-12 0:22
memberrahul.kulshreshtha20-Nov-12 0:22 
GeneralRe: How to set the alignment of items of CListCtrl Pin
Richard MacCutchan20-Nov-12 1:02
mvpRichard MacCutchan20-Nov-12 1:02 

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.


Advertise | Privacy |
Web04 | 2.8.180111.1 | Last Updated 15 Jan 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid