Y
yubaicai
Unregistered / Unconfirmed
GUEST, unregistred user!
大家谁能帮我把这个vc代码 转换成delphi
大家帮助下
#include "stdafx.h"
#include "stdlib.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
char bufferw[20];
HWND hwMy=FindWindow(NULL,"color.JPG - 画图"
HDC dc=GetWindowDC(hwMy);
RECT prect;
GetClientRect(hwMy,&prect);
int iWidth=prect.right;//获取窗口宽
int iHight=prect.bottom;//获取窗口高
int interval=iWidth/5;//获取5条线粗
COLORREF pix=GetPixel(dc,,1);
char* strPix=_itoa(pix,bufferw,10);
MessageBox(NULL,strPix,"ok",MB_OK);
}
大家帮助下
#include "stdafx.h"
#include "stdlib.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
char bufferw[20];
HWND hwMy=FindWindow(NULL,"color.JPG - 画图"
HDC dc=GetWindowDC(hwMy);
RECT prect;
GetClientRect(hwMy,&prect);
int iWidth=prect.right;//获取窗口宽
int iHight=prect.bottom;//获取窗口高
int interval=iWidth/5;//获取5条线粗
COLORREF pix=GetPixel(dc,,1);
char* strPix=_itoa(pix,bufferw,10);
MessageBox(NULL,strPix,"ok",MB_OK);
}