用VBScript进行Win32窗口编程

h=GetModuleHandle(0)

hIcon=LoadIcon(h,129)
hCursor=LoadCursor(0,35512)
c=PStr("MyClass")
pWndClass=StructPtr(48,11,GetWndProc,0,0,h,hIcon,hCursor,16,0,c,0)
R=RegisterClassEx(pWndClass)

a=CreateWindowEx(0,c,PStr("MyCaption"),13238336 or 65536,100,100,500,350,0,0,h,0)

if a > 0 then
  
  SetWndProc a,"wnd2"

  btn=CreateCtrl("BUTTON","kkdkkd",1342242816, 8, 5, 150, 28,a,10000,h)
  
  ShowWindow a,1
  UpdateWindow a

  DoMessageLoop a

else
  msgbox "Create Window Failed..."
  ExitApp
end if

function wnd2(hwnd,uMsg,wParam,lParam)

end function

ExitApp

编程技巧