用vc++6.0 程式设计画一个椭圆出来,求完整原始码以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
用vc++6.0 程式设计画一个椭圆出来,求完整原始码
#include #pragma ment(linker, "/subsystem:windows")int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmd, INT nShow){ HWND h = CreateWindowA("#32770", "椭圆", WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 300, 200, 0, 0, hInst, 0); HWND hs = CreateWindowA("Static", "", WS_CHILD | WS_VISIBLE | SS_BITMAP, 0, 0, 200, 100, h, 0, hInst, 0); HDC d = GetDC(hs); HBITMAP b = CreateCompatibleBitmap(d, 200, 100); HDC m = CreateCompatibleDC(d); SelectObject(m, b); BitBlt(m, 0, 0, 200, 100, d, 0, 0, WHITENESS); Ellipse(m, 0, 0, 200, 100); DeleteDC(m); ReleaseDC(hs, d); SendMessage(hs, STM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)b); MSG mg; while( GetMessageA(&mg, 0, 0, 0) > 0 ) { if (mg.message == WM_COMMAND && mg.wParam == (WPARAM)MAKEWORD(IDCANCEL, BN_CLICKED)) break; TranslateMessage(&mg); DispatchMessageA(&mg); } DeleteObject(b); DestroyWindow(h); return 0;}
用vc++6.0程式设计出一个圆形,求完整原始码
需要新增graphics.h给你个连结看看具体的过程吧,只要程式码是不靠谱的,还是要自己了解下哦!
:wenku.baidu./link?url=1n2BabjzdDApf9LmY7lNNwWl53WOCtJP3Eo5PuIrK68oCFxLsZkpq35xYyNIhvqLaUZ1dwfNiXPmwar_DKpMdyHv6JtHCWKm9sVUknc3Ze7
VC++6.0 C语言 画一个斜椭圆
#include #pragma ment(linker, "/subsystem:windows")int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmd, INT nShow){ HWND h = CreateWindowA("#32770", "椭圆", WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 300, 200, 0, 0, hInst, 0); HWND hs = CreateWindowA("Static", "", WS_CHILD | WS_VISIBLE | SS_BITMAP, 0, 0, 200, 100, h, 0, hInst, 0); HDC d = GetDC(hs); HBITMAP b = CreateCompatibleBitmap(d, 200, 100); HDC m = CreateCompatibleDC(d); SelectObject(m, b); BitBlt(m, 0, 0, 200, 100, d, 0, 0, WHITENESS); Ellipse(m, 0, 0, 200, 100); DeleteDC(m); ReleaseDC(hs, d); SendMessage(hs, STM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)b); MSG mg; while( GetMessageA(&mg, 0, 0, 0) > 0 ) { if (mg.message == WM_COMMAND && mg.wParam ==(WPARAM)MAKEWORD(IDCANCEL, BN_CLICKED)) break; TranslateMessage(&mg); DispatchMessageA(&mg); } DeleteObject(b); DestroyWindow(h); return 0;}
求完整C++原始码,使用VC++6.0呼叫DOS,执行计算机上的一个程式!
给你个简单点的,你看看~~~
#include
#include
void main()
{
system("notepad");这个是开启记事本程式,也可以加上.ext字尾,不过是一样的~
system("F:\\my.txt");这个是开启F盘的my.txt文件~~
}
求vc++6.0贪食蛇原始码
我有一个完整的工程,如何给你?
ps:你随便搜一搜,很多网站上都有这个。
急求 vc++6.0下的opengl 利用橡皮筋技术画圆和椭圆形的完整程式码 验证正确后采纳
/* 这是我自己编写的一个小程式,我也是刚学opengl,懂得不多,现学现卖,不做指出,望多见谅,在我的电脑上vc++6.0,是能够执行的,画出了一个红色的圆,白色的背景。希望能帮到你。*/
#include
#include
#define PI 3.141592f
void init(void)
{
glClearColor(1.0,1.0,1.0,0.0);视窗背景为白色
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0,200.0,0.0,150.0);投影范围
}
void lineSegment(void)
{
GLfloat x,y,z,angle;
z=0.0f;
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,0.0,0.0);
glBegin( GL_LINES);
for(angle=0.0f;angle<=PI;angle+=(PI/1000000.0f))
{
x=100+50.0f*sin(angle);
y=60+50.0f*cos(angle);
glVertex3f(x,y,z);
x=100+50.0f*sin(angle+PI);
y=60+50.0f*cos(angle+PI);
glVertex3f(x,y,z);
}
glEnd();
glFlush();
}
int main(int argc,char**argv)
{
glutInit(&argc,argv);
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE );
glutInitWindowPosition(0,0);设定显示视窗左上的座标值
glutInitWindowSize(1000,700);设定显示视窗的宽和高
glutCreateWindow("An example OpenGL Program");
init();
glutDisplayFunc(lineSegment);
glutMainLoop();
}
谁能给我个用VC++6.0程式设计实现汉字拼音的原始码?
QQ详谈。。。
VC环境下编写程式 要求画一个椭圆!
#include
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT ("LineDemo") ;
HWND hwnd ;
MSG msg ;
WNDCLASS wndclass ;
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClassName = szAppName ;
if (!RegisterClass (&wndclass))
{
MessageBox (NULL, TEXT ("Program requires Windows NT!"),
szAppName, MB_ICONERROR) ;
return 0 ;
}
hwnd = CreateWindow (szAppName, TEXT ("Line Demonstration"),
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
NULL, NULL, hInstance, NULL) ;
ShowWindow (hwnd, iCmdShow) ;
UpdateWindow (hwnd) ;
while (GetMessage (&msg, NULL, 0, 0))
{
TranslateMessage (&msg) ;
DispatchMessage (&msg) ;
}
return msg.wParam ;
}
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static int cxClient, cyClient ;
HDC hdc ;
PAINTSTRUCT ps ;
switch (message)
{
case WM_SIZE:
cxClient = LOWORD (lParam) ;
cyClient = HIWORD (lParam) ;
return 0 ;
case WM_PAINT:
hdc = BeginPaint (hwnd, &ps) ;
绘制椭圆,指定位置,宽高。
Ellipse (hdc, cxClient / 8, cyClient / 8,
7 * cxClient / 8, 7 * cyClient / 8) ;
EndPaint (hwnd, &ps) ;
return 0 ;
case WM_DESTROY:
PostQuitMessage (0) ;
return 0 ;
}
return DefWindowProc (hwnd, message, wParam, lParam) ;
}
用java求两个圆关系的程式码,求完整的,正确的原始码,谢谢!
public class Cycle {
private double x = 0;圆心横座标
private double y = 0;圆心纵座标
private double r = 0;圆心半径
public static void main(String[] args) {
String relation = "";
Cycle c = new Cycle(0,0,1);
相交 外切 内切 相离
Cycle c_xiangJiao = new Cycle(3,4,5);
Cycle c_waiQie = new Cycle(3,4,4);
Cycle c_neiQie = new Cycle(3,4,6);
Cycle c_xiangLi = new Cycle(3,4,2);
relation = c.relationWithOtherCycle(c_xiangJiao);
System.out.println("c && c_xiangJiao relationShip :"+relation);
relation = c.relationWithOtherCycle(c_xiangLi);
System.out.println("c && c_xiangLi relationShip :"+relation);
relation = c.relationWithOtherCycle(c_neiQie);
System.out.println("c && c_neiQie relationShip :"+relation);
relation = c.relationWithOtherCycle(c_waiQie);
System.out.println("c && c_waiQie relationShip :"+relation);
}
public Cycle(double x, double y, double r) {
this.r = r;
this.x = x;
this.y = y;
}
public Cycle() {
}
public String relationWithOtherCycle(Cycle c){
String relation = ""; 相交 外切 内切 相离
double length = 0; (x-x1)*(x-x1)+(y-y1)*(y-y1) 开平方
length = Math.sqrt((this.x-c.getX())*(this.x-c.getX())+(this.y-c.getY())*(this.y-c.getY()));
System.out.println("length : "+length);
if(length>(this.r+c.getR())){
relation = "相离";
}else if (length==(this.r+c.getR())){
relation = "外切";
}else if (length==Math.abs(this.r-c.getR())){
relation = "内切";
}else if (lengthMath.abs(this.r-c.getR())){
relation = "相交";
}
return relation;
}
public double getX() {
return x;
}
public void setX(double x) {
this.x = x;
}
public double getY() {
return y;
}
public void setY(double y) {
this.y = y;
}
public double getR() {
return r;
}
public void setR(double r) {
this.r = r;
}
}
把测试程式写在Cycle的main方法里了
求完整的购物类ASP原始码
去vinshop的官方网站,那里有asp的免费版8.0可以下载。需要地址我hi给你,贴在这里有广告嫌疑。
分页:
1
23