摘要: 三八、获取屏幕RGB值:OnTimer中添加
CPoint pos;
GetCursorPos(&pos);//获取鼠标坐标
HDC hDC = ::GetDC(NULL);
COLORREF clr = ::GetPixel(hDC, pos.x, pos.y);
CString ClrText;
ClrText.Format("R:%d G:%d B:%d",GetRvalue(clr),GetGvalue(clr),GetBvalue(clr));
三九、打开一个网址:
打开http://www.sina.com.cn这个站点如下:
ShellExecute(NULL, "open", "http://www.sina.com.cn",NULL, NULL, SW_MAXIMIZE );
此命令将以默认浏览器打开http://www.sina.com.cn,并将加开后的窗口最大化。
又例:
ShellExecute(NULL, "open", "IEXPLORE.exe ht
阅读全文