Win32控件--------------------WM_DRAWITEM消息测试程序

	case WM_DRAWITEM:
	{
		 HWND Tab=(HWND)wParam;
		 LPDRAWITEMSTRUCT pDrawItem = (LPDRAWITEMSTRUCT)lParam;
		 switch(pDrawItem->itemID)
		 {
		 case 0:
			 printf("\n Item 0");
			 break;
		 case 1:
			 printf("\n Item 1");
			 break;
		 case 2:
			 printf("\n Item 2");	 
		 break;
		 }
		 switch(pDrawItem->itemState)
		 {
			 case	ODS_CHECKED:
				 printf("\t ODS_CHECKED");
				 break;
			 case	ODS_COMBOBOXEDIT	:
				 printf("\t ODS_COMBOBOXEDIT");
				 break;
			 case	ODS_DEFAULT	:
				 printf("\t ODS_DEFAULT");
				 break;
			 case	ODS_DISABLED	:	
				 printf("\t ODS_CHECKED");
				 break;
			 case	ODS_FOCUS	:	
				 printf("\t ODS_DISABLED");
				 break;
			 case	ODS_GRAYED	:	
				 printf("\t ODS_GRAYED");
				 break;
			 case	ODS_HOTLIGHT	:	
				 printf("\t ODS_HOTLIGHT");
				 break;
			 case	ODS_INACTIVE	:	
				 printf("\t ODS_INACTIVE");
				 break;
			 case	ODS_NOACCEL	:	
				 printf("\t ODS_NOACCEL");
				 break;
			 case	ODS_NOFOCUSRECT	:	
				 printf("\t ODS_NOFOCUSRECT");
				 break;
			 case	ODS_SELECTED	:	
				 printf("\t ODS_SELECTED");
				break;
		 }
		 switch(pDrawItem->itemAction)
		 {
		 case ODA_DRAWENTIRE:
			 printf("\t ODA_DRAWENTIRE");
			 break;
		 case ODA_FOCUS:
			 printf("\t ODA_FOCUS");
			 break;
		 case ODA_SELECT:
			 printf("\t ODA_SELECT");
			 break;
		 }
	}

阅读更多
换一批

没有更多推荐了,返回首页