我tbc新手,选择了工程和采矿,这两个是怎么练上去的?是不是像采矿一样到处挖矿?

手选

木木 木木
回答
  • 熙妍 熙妍

    图形界面接口因系统(windows/linux)而不一样。在windows下因为系统是用c开发的,标准api接口就是c接口,称好windows api
    这就是常说的api编程
    int winapi winmain(hinstance hinstance,
    hinstance hprevinstance,
    lpstr lpcmdline,
    int ncmdshow)
    {
    wndclassex wcex;wcex.cbsize=sizeof(wndclassex);wcex.style=cs_hredraw|cs_vredraw;wcex.lpfnwndproc=wndproc;wcex.cbclsextra=0;wcex.cbwndextra=0;wcex.hinstance=hinstance;wcex.hicon=loadicon(hinstance,makeintresource(idi_application));wcex.hcursor=loadcursor(**,idc_arrow);wcex.hbrbackground=(hbrush)(color_window+1);wcex.lpszmenuname=**;wcex.lpszclassname=szwindowclass;wcex.hiconsm=loadicon(wcex.hinstance,makeintresource(idi_application));if!reg**terclassex(&wcex))
    {
    **box(**,
    t("call to reg**terclassex failed!t("win32 guided tour"),
    **);return 1;}
    hinst=hinstance;store instance handle in our global variable
    the parameters to createwindow explained:
    szwindowclass:the name of the application
    sztitle:the text that appears in the title bar
    ws_overlappedwindow:the type of window to create
    cw_usedefault,cw_usedefault:initial position(x,y)
    500,100:initial size(width,length)
    **:the parent of th** window
    **:th** application dows not h**e a menu bar
    hinstance:the first parameter from winmain
    **:not used in th** application
    hwnd hwnd=createwindow
    szwindowclass,
    sztitle,
    ws_overlappedwindow,
    cw_usedefault,cw_usedefault,
    500,100,
    **,
    **,
    hinstance,
    **
    if!hwnd)
    {
    **box(**,
    t("call to createwindow failed!t("win32 guided tour"),
    **);return 1;}
    the parameters to showwindow explained:
    hwnd:the value returned from createwindow
    ncmdshow:the fourth parameter from winmain
    showwindow(hwnd,
    ncmdshow);updatewindow(hwnd);main ** loop:
    msg msg;while(get**(&msg,**,0,0))
    {
    translate**(&msg);d**patch**(&msg);}
    return(int)msg.wparam;}
    http://msdn.microsoft.com/en-us/library/bb384843.aspx
    不过你得知道怎么建工程,不然就得在命令行编译、链接

类似问答
精品推荐

友情链接

友链互换QQ:

谷财 备案编号:蜀ICP备11019336号-3商务合作:235-677-2621

Copyright 2009-2020 Chengdu Sanzilewan Technology Co.,Ltd all rights reserve

抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当 适度游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活