user-0 提问: vc++6.0中如何加入tc的graphics库？求大神帮忙。

回复:
user: user-1
content: 楼上的用过习语言吗？ 哪个版本？  习语言绘图最方便了，顺序执行。 没听说过有效率问题。

user: user-2
content: 号称最短Windows绘图程序：#include <windows.h> LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {     PAINTSTRUCT ps;     HDC hdc;     HFONT hfont,ohfont;     RECT r;     COLORREF oc;      switch(message) {     case WM_CLOSE://按Alt+F4退出         PostQuitMessage(0);         break;     case WM_PAINT:         BeginPaint(hWnd, &ps);         hdc = ps.hdc; // the device context to draw in         GetClientRect(hWnd, &r); // Obtain the window's client rectangle         hfont = CreateFont(240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "华文楷体");         ohfont=SelectObject(hdc,hfont);         oc=SetTextColor(hdc,0x00C080FF);         SetBkMode(hdc, TRANSPARENT);         TextOut(hdc,r.left+r.right/2-720, r.top+r.bottom/2-120,"最短画图程序",12);         SelectObject(hdc,ohfont);         SetTextColor(hdc,oc);         DeleteObject(hfont);         EndPaint(hWnd, &ps);         break;     default:         return DefWindowProc(hWnd, message, wParam, lParam);     }     return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {     MSG msg             = {0};     WNDCLASS wc         = {0};     HBRUSH hbrh;     hbrh=CreateSolidBrush(0x00000000);     wc.lpfnWndProc      = WndProc;     wc.hInstance        = hInstance;     wc.hbrBackground    = hbrh;     wc.lpszClassName    = "minwindowsapp";     wc.hCursor          = LoadCursor(NULL,IDC_ARROW);     if( FAILED(RegisterClass(&wc)) ) return 1;      if(FAILED(CreateWindow(wc.lpszClassName,                         "Minimal Windows Application",                         WS_POPUP|WS_VISIBLE,                         0,                         0,                         GetSystemMetrics(SM_CXSCREEN),                         GetSystemMetrics(SM_CYSCREEN),                         0,                         0,                         hInstance,                         NULL)))         return 2;      while( GetMessage( &msg, NULL, 0, 0 ) > 0 ) {         DispatchMessage( &msg );     }     DeleteObject(hbrh);     return 0; }  Line and Curve Functions The following functions are used with lines and curves.        AngleArc   Arc   ArcTo   GetArcDirection   LineDDA   LineDDAProc   LineTo   MoveToEx   PolyBezier   PolyBezierTo   PolyDraw   Polyline   PolylineTo   PolyPolyline   SetArcDirection        Filled Shape Functions The following functions are used with filled shapes.        Chord   Ellipse   FillRect   FrameRect   InvertRect   Pie   Polygon   PolyPolygon   Rectangle   RoundRect

user: user-1
content: 赵老师的这个是控制台，看 习语言的真图形模式，2行 绘图程序：  #包含 “习语言系统.接口” 整数类型 主函数（）{ 图形开始(宽：480,高：320)； 图形画圆(水平中心点：200，垂直中心点：200，半径：50);  图形结束（‘等待’）； 返回 0;}      引用 7 楼 zhao4zhong1 的回复:那就来个更短的：#pragma comment(lib,"user32") #pragma comment(lib,"gdi32") #include <stdlib.h> #include <windows.h> extern "C" HWND WINAPI GetConsoleWindow(); int main() {     system("color F0&cls");     HWND hwnd=GetConsoleWindow();     HDC  hdc =GetDC(hwnd);     MoveToEx(hdc,0,0,NULL);     LineTo(hdc,300,300);     ReleaseDC(hwnd,hdc);     return 0; }

user: user-2
content: 那就来个更短的：#pragma comment(lib,"user32") #pragma comment(lib,"gdi32") #include <stdlib.h> #include <windows.h> extern "C" HWND WINAPI GetConsoleWindow(); int main() {     system("color F0&cls");     HWND hwnd=GetConsoleWindow();     HDC  hdc =GetDC(hwnd);     MoveToEx(hdc,0,0,NULL);     LineTo(hdc,300,300);     ReleaseDC(hwnd,hdc);     return 0; }

user: user-1
content: 习语言 绘图程序，最短 可以 只要2行。 赵老师 敢比试吗？ 引用 5 楼 zhao4zhong1 的回复:号称最短Windows绘图程序：#include <windows.h> LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {     PAINTSTRUCT ps;     HDC hdc;     HFONT hfont,ohfont;     RECT r;     COLORREF oc;      switch(message) {     case WM_CLOSE://按Alt+F4退出         PostQuitMessage(0);         break;     case WM_PAINT:         BeginPaint(hWnd, &ps);         hdc = ps.hdc; // the device context to draw in         GetClientRect(hWnd, &r); // Obtain the window's client rectangle         hfont = CreateFont(240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "华文楷体");         ohfont=SelectObject(hdc,hfont);         oc=SetTextColor(hdc,0x00C080FF);         SetBkMode(hdc, TRANSPARENT);         TextOut(hdc,r.left+r.right/2-720, r.top+r.bottom/2-120,"最短画图程序",12);         SelectObject(hdc,ohfont);         SetTextColor(hdc,oc);         DeleteObject(hfont);         EndPaint(hWnd, &ps);         break;     default:         return DefWindowProc(hWnd, message, wParam, lParam);     }     return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {     MSG msg             = {0};     WNDCLASS wc         = {0};     HBRUSH hbrh;     hbrh=CreateSolidBrush(0x00000000);     wc.lpfnWndProc      = WndProc;     wc.hInstance        = hInstance;     wc.hbrBackground    = hbrh;     wc.lpszClassName    = "minwindowsapp";     wc.hCursor          = LoadCursor(NULL,IDC_ARROW);     if( FAILED(RegisterClass(&wc)) ) return 1;      if(FAILED(CreateWindow(wc.lpszClassName,                         "Minimal Windows Application",                         WS_POPUP|WS_VISIBLE,                         0,                         0,                         GetSystemMetrics(SM_CXSCREEN),                         GetSystemMetrics(SM_CYSCREEN),                         0,                         0,                         hInstance,                         NULL)))         return 2;      while( GetMessage( &msg, NULL, 0, 0 ) > 0 ) {         DispatchMessage( &msg );     }     DeleteObject(hbrh);     return 0; }  Line and Curve Functions The following functions are used with lines and curves.        AngleArc   Arc   ArcTo   GetArcDirection   LineDDA   LineDDAProc   LineTo   MoveToEx   PolyBezier   PolyBezierTo   PolyDraw   Polyline   PolylineTo   PolyPolyline   SetArcDirection        Filled Shape Functions The following functions are used with filled shapes.        Chord   Ellipse   FillRect   FrameRect   InvertRect   Pie   Polygon   PolyPolygon   Rectangle   RoundRect

user: user-3
content: 引用 2 楼 xiyuyan 的回复:用习语言就好了，不用那么麻烦，直接绘图，而且还是中文的。 效率不行的！很多不行的地方！ 楼主看看文档吧，可以是调用的方法不对哦

user: user-1
content: 用习语言就好了，不用那么麻烦，直接绘图，而且还是中文的。

user: user-4
content: easyx自带一个帮助文档，里面的函数库很全了，可以参考里面有的。initgraph()函数用法不同，你应该看到了。