#include "stdafx.h" #include <iostream> #include<windows.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { HBITMAP hbitmap; BITMAP bitmap; BITMAPINFO bmi; HDC hdcScreen = GetDC(NULL); HDC hdcMem = CreateCompatibleDC(hdcScreen); CURSORINFO cursorInfo = { 0 }; cursorInfo.cbSize = sizeof(cursorInfo); GetCursorInfo(&cursorInfo); ICONINFO ii = {0}; GetIconInfo(cursorInfo.hCursor, &ii); hbitmap = ii.hbmColor; SelectObject(hdcMem, hbitmap); GetObject(hbitmap, sizeof(BITMAP), &bitmap); GetDIBits(hdcMem, hbitmap, 0, 32, NULL, &bmi, DIB_RGB_COLORS); for(int i = 0;i<4096;i++){ cout<<bmi.bmiColors[i].rgbBlue; } std::getchar(); return 0; }</windows.h></iostream>
cout << hex << bmi.bmiColors[i].rgbBlue;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)