当前位置:网站首页>Win32控件--------------------WM_DRAWITEM消息测试程序

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

2022-08-09 10:09:00 我有梦之翼

	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;
		 }
	}

原网站

版权声明
本文为[我有梦之翼]所创,转载请带上原文链接,感谢
https://blog.csdn.net/zzidea/article/details/45602241