国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

在MapX中響應滾輪放大縮小地圖

2024-07-21 02:25:23
字體:
來源:轉載
供稿:網友

’模塊中

option explicit

public const gwl_wndproc = (-4)
public const wm_command = &h111
public const wm_mbuttondown = &h207
public const wm_mbuttonup = &h208
public const wm_mousewheel = &h20a

public oldwinproc   as long
public declare function setwindowlong lib "user32" alias "setwindowlonga" (byval hwnd as long, byval nindex as long, byval dwnewlong as long) as long
public declare function callwindowproc lib "user32" alias "callwindowproca" (byval lpprevwndfunc as long, byval hwnd as long, byval msg as long, byval wparam as long, byval lparam as long) as long
public declare function getwindowlong lib "user32" alias "getwindowlonga" (byval hwnd as long, byval nindex as long) as long

public function flexscroll(byval hwnd as long, byval wmsg as long, byval wparam as long, byval lparam as long) as long
    select case wmsg
        case wm_mousewheel
            select case wparam
                case -7864320     '向下滾
                    setcurrentscale "zoomout", 2
                case 7864320       '向上滾
                    setcurrentscale "zoomin", 2
          end select
    end select
   
    flexscroll = callwindowproc(oldwinproc, hwnd, wmsg, wparam, lparam)
end function



private sub setcurrentscale(strinorout as string, dscale as double)
    if frmmain.map1 is nothing then exit sub
   
    if strinorout = "zoomin" then
        frmmain.map1.zoom = (frmmain.map1.zoom) * dscale
        frmmain.map1.refresh
    elseif strinorout = "zoomout" then
        frmmain.map1.zoom = (frmmain.map1.zoom) / dscale
        frmmain.map1.refresh
    end if
end sub







private sub form_load()
        
    oldwinproc = getwindowlong(map1.hwnd, gwl_wndproc)
    setwindowlong map1.hwnd, gwl_wndproc, addressof flexscroll

end sub

private sub form_unload(cancel as integer)
    setwindowlong map1.hwnd, gwl_wndproc, oldwinproc
end sub


商業源碼熱門下載www.html.org.cn

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宁津县| 安庆市| 贞丰县| 天祝| 东莞市| 兴仁县| 达孜县| 从江县| 昌黎县| 宜宾市| 龙口市| 阳高县| 永城市| 东兰县| 肥西县| 镇坪县| 全南县| 上高县| 昌乐县| 武川县| 龙胜| 渝中区| 洛隆县| 漯河市| 石家庄市| 井研县| 北辰区| 临武县| 亚东县| 满城县| 壶关县| 汝州市| 姜堰市| 鲁山县| 齐齐哈尔市| 东港市| 阿拉善右旗| 冕宁县| 阿拉善盟| 互助| 嵩明县|