仿照SDK编程写的窗口[1]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 jennyvenus 的 blog

option explicit

public declare function createwindowex lib "user32" alias "createwindowexa" (byval dwexstyle as long, byval lpclassname as string, byval lpwindowname as string, byval dwstyle as long, byval x as long, byval y as long, byval nwidth as long, byval nheight as long, byval hwndparent as long, byval hmenu as long, byval hinstance as long, lpparam as any) as long
public declare function loadicon lib "user32" alias "loadicona" (byval hinstance as long, byval lpiconname as string) as long
public declare function loadcursor lib "user32" alias "loadcursora" (byval hinstance as long, byval lpcursorname as string) as long
public declare function getstockobject lib "gdi32" (byval nindex as long) as long
public declare function registerclassex lib "user32" alias "registerclassexa" (pcwndclassex as wndclassex) as integer
public declare function showwindow lib "user32" (byval handle_of_window as long, byval ncmdshow as long) as long
public declare function updatewindow lib "user32" (byval handle_of_window as long) as long
public declare function setfocus lib "user32" (byval handle_of_window as long) as long
public declare function postmessage lib "user32" alias "postmessagea" (byval handle_of_window as long, byval wmsg as long, byval wparam as long, byval lparam as long) as long
public declare function defwindowproc lib "user32" alias "defwindowproca" (byval handle_of_window as long, byval wmsg as long, byval wparam as long, byval lparam as long) as long
public declare function getmessage lib "user32" alias "getmessagea" (lpmsg as msg, byval handle_of_window as long, byval wmsgfiltermin as long, byval wmsgfiltermax as long) as long
public declare function translatemessage lib "user32" (lpmsg as msg) as long
public declare function dispatchmessage lib "user32" alias "dispatchmessagea" (lpmsg as msg) as long
public declare sub postquitmessage lib "user32" (byval nexitcode as long)
public declare function beginpaint lib "user32" (byval handle_of_window as long, lppaint as paintstruct) as long
public declare function endpaint lib "user32" (byval handle_of_window as long, lppaint as paintstruct) as long
public declare function getclientrect lib "user32" (byval handle_of_window as long, lprect as rect) as long
public declare function drawtext lib "user32" alias "drawtexta" (byval hdc as long, byval lpstr as string, byval ncount as long, lprect as rect, byval wformat as long) as long
                                                   
                                                   
type wndclassex
    cbsize as long
    style as long
    lpfnwndproc as long
    cbclsextra as long
    cbwndextra as long
    hinstance as long
    hicon as long
    hcursor as long
    hbrbackground as long
    lpszmenuname as string
    lpszclassname as string
    hiconsm as long
end type


type pointapi
        x as long
        y as long
end type

type msg
    handle_of_window as long
    message as long
    wparam as long
    lparam as long
    time as long
    pt as pointapi
end type

type rect
        left as long
        top as long
        right as long
        bottom as long
end type

type paintstruct
        hdc as long
        ferase as long
        rcpaint as rect
        frestore as long
        fincupdate as long
        rgbreserved(32) as byte 'this was declared incorrectly in vb api viewer
end type

public const ws_visible as long = &h10000000
public const ws_vscroll as long = &h200000
public const ws_tabstop as long = &h10000
public const ws_thickframe as long = &h40000

本文关键:none
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top