1.定义一个结构变量:str_bitmap
Type Variable Name
long bmtype
long bmwidth
long bmheight
long bmwidthbytes
long bmplanes
long bmbitspixel
blob bmbits
2.定义用户对象:
Instance Variables:
//代码:
boolean ib_mdi = false
mdiclient i_mdi
window iw_window
string ls_bitmap
ulong iul_hbitmap
ulong iul_hmdi
ulong iul_dcmdi
ulong iul_hDCMem
s_bitmap istr_Bitmap
boolean ib_center = FALSE
boolean ib_resize = TRUE
integer ii_TitleBarHeight = 200
Local External Functions:
//代码:
FUNCTION int ReleaseDC(ulong handle, ulong hDC) LIBRARY "User32.dll"
FUNCTION ulong SelectObject(ulong hDC, ulong hGDIObj) LIBRARY "Gdi32.dll"
FUNCTION int BitBlt(ulong hDC, int num, int num, int num, int num, ulong hDC, int num, int num, ulong lParam) LIBRARY "Gdi32.dll"
FUNCTION ulong CreateCompatibleDC(ulong hDC) LIBRARY "Gdi32.dll"
FUNCTION ulong GetDC(ulong handle) LIBRARY "User32.dll"
FUNCTION ulong LoadImageA( ulong hints, ref string lpszName, UINT uType, int cxDesired,int cyDesired,UINT fuLoad ) library "user32.dll"
FUNCTION ulong GetObjectBitmap( ulong hgdiobj, int cbBuffer, ref s_bitmap bm ) library "gdi32.dll" alias for GetObjectA
FUNCTION boolean DeleteObject ( ulong hgdiobj ) library "gdi32.dll"
FUNCTION boolean StretchBlt(ulong hDCdest, int x1, int y1, int w1, int h1, ulong hDCsrc, int x2, int y2, int w2, int h2, ulong lParam) LIBRARY "Gdi32.dll"
创建一个存储过程,名为:spm1
CREATE PROCEDURE spm1
(dept varchar2, mgr_name OUT varchar2)
IS lutype varchar2(10);
BEGIN
SELECT manager INTO mgr_name FROM mgr_table
WHERE dept_name = dept;
END;
To declare that procedure for processing within PowerBuilder, you code:
//声明存储过程
DECLARE dept_proc PROCEDURE FOR spm1(:dept);
Note that this declaration is a non-executable statement, just like a cursor declaration. Where cursors have an OPEN statement, procedures have an EXECUTE statement.
When the EXECUTE statement executes, the procedure is invoked. The EXECUTE refers to the logical procedure name.
//执行存储过程
EXECUTE dept_proc;