美文网首页📙Go语言:进阶大全
Go语言:获取桌面任务栏高度

Go语言:获取桌面任务栏高度

作者: 白祤星 | 来源:发表于2019-09-27 20:47 被阅读0次

    代码实例:


    package main
    
    /*
    #include <windows.h>
    
    int taskbarHeight() {
        RECT rt;
        SystemParametersInfo(SPI_GETWORKAREA, 0, (PVOID)&rt, 0);
        return GetSystemMetrics(SM_CYSCREEN) - rt.bottom;
    }
    */
    
    import "C"
    
    func main() {
        theight := int(C.taskbarHeight())
        println(theight)
    }
    

    相关文章

      网友评论

        本文标题:Go语言:获取桌面任务栏高度

        本文链接:https://www.haomeiwen.com/subject/gtwauctx.html