📄 wpa.hhf
字号:
( _hdcOut_, _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_ ); #keyword SelectObject( _hgdiobj_ ); w.SelectObject( _hdcOut_, _hgdiobj_ ); #keyword SelectClipRgn( _hrgn_ ); w.SelectClipRgn( _hdcOut_, _hrgn_ ); #keyword DPtoLP( _lpPoints_, _nCount_ ); w.DPtoLP( _hdcOut_, _lpPoints_, _nCount_ ); #keyword LPtoDP( _lpPoints_, _nCount_ ); w.LPtoDP( _hdcOut_, _lpPoints_, _nCount_ ); #keyword SetWindowExtEx( _xExtent_, _yExtent_, _lpSize_ ); w.SetWindowExtEx( _hdcOut_, _xExtent_, _yExtent_, _lpSize_ ); #keyword SetViewPortExtEx( _xExtent_, _yExtent_, _lpSize_ ); w.SetViewPortExtEx( _hdcOut_, _xExtent_, _yExtent_, _lpSize_ ); #keyword FillRect( _lprc_, _hbr_ ); w.FillRect( _hdcOut_, _lprc_, _hbr_ ); #keyword FrameRect( _lprc_, _hbr_ ); w.FrameRect( _hdcOut_, _lprc_, _hbr_ ); #keyword InvertRect( _lprc_ ); w.InvertRect( _hdcOut_, _lprc__ ); #keyword FillRgn( _hRgn_, _hbr_ ); w.FillRgn( _hdcOut_, _hRgn_, _hbr_ ); #keyword FrameRgn( _hRgn_, _hbr_, _xFrame_, _yFrame_ ); w.FrameRgn( _hdcOut_, _hRgn_, _hbr_, _xFrame_, _yFrame_ ); #keyword InvertRgn( _hRgn_ ); w.InvertRgn( _hdcOut_, _hRgn_ ); #keyword PaintRgn( _hRgn_ ); w.PaintRgn( _hdcOut_, _hRgn_ ); #keyword SetROP2( _drawMode_ ); w.SetROP2( _hdcOut_, _drawMode_ ); #keyword CreateDIBitmap ( _lpbmih_, _fdwInit_, _lpbInit_, _lpbmi_, _fuUsage ); w.CreateDIBitmap ( _hdcOut_, _lpbmih_, _fdwInit_, _lpbInit_, _lpbmi_, _fuUsage ); #keyword CreateDIBSection ( _pbmi_, _iUsage_, _ppvBits_, _hSection_, _dwOffset_ ); w.CreateDIBSection ( _hdcOut_, _pbmi_, _iUsage_, _ppvBits_, _hSection_, _dwOffset_ ); #terminator ReleaseDC; w.ReleaseDC( _hWnd_, _hdcOut_ ) #endmacro////////////////////////////////////////// #macro GetWindowDC( _hWnd_, _hdcOut_ ); w.GetWindowDC( _hWnd_ ); mov( eax, _hdcOut_ ); #keyword DrawText( _lpString_, _nCount_, _lpRect_, _uFormat_ ); w.DrawText( _hdcOut_, _lpString_, _nCount_, _lpRect_, _uFormat_ ) #keyword TextOut( _x_, _y_, _string_, _len_ ); w.TextOut( _hdcOut_, _x_, _y_, _string_, _len_ ); #keyword GetCurrentPositionEx( _cp_ ); w.GetCurrentPositionEx( _hdcOut_, _cp_ ); #keyword GetTextMetrics( _tm_ ); w.GetTextMetrics( _hdcOut_, _tm_ ); #keyword GetDeviceCaps( _capIndex_ ); w.GetDeviceCaps( _hdcOut_, _capIndex_ ); #keyword SetTextAlign( _alignment_ ); w.SetTextAlign( _hdcOut_, _alignment_ ); #keyword LineTo( _x_, _y_ ); w.LineTo( _hdcOut_, _x_, _y_ ); #keyword MoveTo( _x_, _y_ ); w.MoveToEx( _hdcOut_, _x_, _y_, NULL ); #keyword MoveToEx( _x_, _y_, _lpPoint_ ); w.MoveToEx( _hdcOut_, _x_, _y_, _lpPoint_ ); #keyword Polyline( _lppt_, _cPoints_ ); w.Polyline( _hdcOut_, _lppt_, _cPoints_ ); #keyword PolylineTo( _lppt_, _cPoints_ ); w.PolylineTo( _hdcOut_, _lppt_, _cPoints_ ); #keyword PolyPolyline( _lppt_, _lpdwPolyPoints_, _cCount_ ); w.PolyPolyline( _hdcOut_, _lppt_, _lpdwPolyPoints_, _cCount_ ); #keyword PolyBezier( _lppt_, _cPoints_ ); w.PolyBezier( _hdcOut_, _lppt_, _cPoints_ ); #keyword PolyBezierTo( _lppt_, _cPoints_ ); w.PolyBezierTo( _hdcOut_, _lppt_, _cPoints_ ); #keyword Polygon( _lppt_, _cPoints_ ); w.Polygon( _hdcOut_, _lppt_, _cPoints_ ); #keyword PolyPolygon( _lppt_, _cPolys_, _nCount_ ); w.PolyPolygon( _hdcOut_, _lppt_, _cPolys_, _nCount_ ); #keyword SetPolyFillMode( _iMode_ ); w.SetPolyFillMode( _hdcOut_, _iMode_ ); #keyword SetPixel( _x_, _y_, _color_ ); w.SetPixel( _hdcOut_, _x_, _y_, _color_ ); #keyword SetMapMode( _iMode_ ); w.SetMapMode( _hdcOut_, _iMode_ ); #keyword GetMapMode( _iMode_[] ); w.GetMapMode( _hdcOut_ ); #keyword Rectangle( _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_ ); w.Rectangle ( _hdcOut_, _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_ ); #keyword RoundRect ( _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _nWidth_, _nHeight_ ); w.RoundRect ( _hdcOut_, _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _nWidth_, _nHeight_ ); #keyword Arc ( _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _xStart_, _yStart_, _xEnd_, _yEnd_ ); w.Arc ( _hdcOut_, _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _xStart_, _yStart_, _xEnd_, _yEnd_ ); #keyword Chord ( _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _xStart_, _yStart_, _xEnd_, _yEnd_ ); w.Chord ( _hdcOut_, _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _xStart_, _yStart_, _xEnd_, _yEnd_ ); #keyword Pie ( _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _xStart_, _yStart_, _xEnd_, _yEnd_ ); w.Pie ( _hdcOut_, _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _xStart_, _yStart_, _xEnd_, _yEnd_ ); #keyword ArcTo ( _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _xStart_, _yStart_, _xEnd_, _yEnd_ ); w.ArcTo ( _hdcOut_, _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_, _xStart_, _yStart_, _xEnd_, _yEnd_ ); #keyword AngleArc ( _x_, _y_, _radius_, _nBottomRect_, _angleStart_, _angleSweep_ ); w.AngleArc ( _hdcOut_, _x_, _y_, _radius_, _nBottomRect_, _angleStart_, _angleSweep_ ); #keyword Ellipse( _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_ ); w.Ellipse ( _hdcOut_, _nLeftRect_, _nTopRect_, _nRightRect_, _nBottomRect_ ); #keyword SelectObject( _hgdiobj_ ); w.SelectObject( _hdcOut_, _hgdiobj_ ); #keyword SelectClipRgn( _hrgn_ ); w.SelectClipRgn( _hdcOut_, _hrgn_ ); #keyword DPtoLP( _lpPoints_, _nCount_ ); w.DPtoLP( _hdcOut_, _lpPoints_, _nCount_ ); #keyword LPtoDP( _lpPoints_, _nCount_ ); w.LPtoDP( _hdcOut_, _lpPoints_, _nCount_ ); #keyword SetWindowExtEx( _xExtent_, _yExtent_, _lpSize_ ); w.SetWindowExtEx( _hdcOut_, _xExtent_, _yExtent_, _lpSize_ ); #keyword SetViewPortExtEx( _xExtent_, _yExtent_, _lpSize_ ); w.SetViewPortExtEx( _hdcOut_, _xExtent_, _yExtent_, _lpSize_ ); #keyword FillRect( _lprc_, _hbr_ ); w.FillRect( _hdcOut_, _lprc_, _hbr_ ); #keyword FrameRect( _lprc_, _hbr_ ); w.FrameRect( _hdcOut_, _lprc_, _hbr_ ); #keyword InvertRect( _lprc_ ); w.InvertRect( _hdcOut_, _lprc__ ); #keyword FillRgn( _hRgn_, _hbr_ ); w.FillRgn( _hdcOut_, _hRgn_, _hbr_ ); #keyword FrameRgn( _hRgn_, _hbr_, _xFrame_, _yFrame_ ); w.FrameRgn( _hdcOut_, _hRgn_, _hbr_, _xFrame_, _yFrame_ ); #keyword InvertRgn( _hRgn_ ); w.InvertRgn( _hdcOut_, _hRgn_ ); #keyword PaintRgn( _hRgn_ ); w.PaintRgn( _hdcOut_, _hRgn_ ); #keyword SetROP2( _drawMode_ ); w.SetROP2( _hdcOut_, _drawMode_ ); #keyword CreateDIBitmap ( _lpbmih_, _fdwInit_, _lpbInit_, _lpbmi_, _fuUsage ); w.CreateDIBitmap ( _hdcOut_, _lpbmih_, _fdwInit_, _lpbInit_, _lpbmi_, _fuUsage ); #keyword CreateDIBSection ( _pbmi_, _iUsage_, _ppvBits_, _hSection_, _dwOffset_ ); w.CreateDIBSection ( _hdcOut_, _pbmi_, _iUsage_, _ppvBits_, _hSection_, _dwOffset_ ); #terminator ReleaseDC; w.ReleaseDC( _hWnd_, _hdcOut_ ) #endmacro///////////////////////////////////////////////////////////////////////////////// DebugWindows Stuff:namespace dbg; #macro put( _hwnd_dbgput_, _dbgput_parms_[] ): _dbgput_parmlist_, _cur_dbgput_parm_; #if( debug & @elements( _dbgput_parms_ ) <> 0 ) sub( 4096, esp ); // Make room for string on stack. push( edi ); // We need a register, EDI is as good as any. push( edi ); lea( edi, [esp+20]); // Turn EDI into a string pointer. mov( edi, [esp+4] ); // Save ptr to string. // Initialize the maxlength field of our string (at [edi-8]) with 4084 // (this string has 12 bytes of overhead). mov( 4084, (type str.strRec [edi]).MaxStrLen ); // Initialize the current length to zero (emtpy string ): mov( 0, (type str.strRec [edi]).length ); // Zero terminate the string (needed even for empty strings): mov( #0, (type char [edi]) ); pop( edi ); // Restore EDI // Okay, invoke the str.put macro to process all the dbg.put // parameters passed to us. Note that we have to feed our parameters // to str.put one at a time: ?_dbgput_parmlist_ := ""; #for( _cur_dbgput_parm_ in _dbgput_parms_ ) ?_dbgput_parmlist_ := _dbgput_parmlist_ + "," + _cur_dbgput_parm_; #endfor // Note: "[esp+4]" address depends on the fact that // the str.put macro will push EAX for a reference parameter, // thus messing with the stack. str.put ( (type string [esp+4]) @text( _dbgput_parmlist_ ) ); // End of str.put macro invocation dbg.sendStrToDebugWindow ( _hwnd_dbgput_, #{ pushd( [esp+4] ); }# ); // Clean up the stack now that we're done: add( 4100, esp ); #endif #endmacro #if( @global:debug ) procedure sendStrToDebugWindow( hwnd:dword; s:string ); @nodisplay; @noalignstack; var cds :@global:w.COPYDATASTRUCT; static GoodHandle :boolean := @global:true; begin sendStrToDebugWindow; push( eax ); push( ebx ); push( ecx ); push( edx ); mov( s, ebx ); mov( (type @global:str.strRec [ebx]).length, eax ); inc( eax ); // Account for zero terminating byte mov( ebx, cds.lpData ); mov( eax, cds.cbData ); mov( @global:DebugMsg_c, cds.dwData ); @global:w.FindWindow( "DebugWindowClass", NULL ); // Logic to bring up a dialog box complaining that // DebugWindow is not current running if we fail to // find the window. Note that we don't want to display // this dialog box on each execution of a dbg.put call, // only on the first instance where we get a w.FindWindow // failure. if( GoodHandle ) then if( eax = NULL ) then // Whenever GoodHandle goes from true to false, // print the following error message in a dialog box: @global:w.MessageBox ( 0, "Debug Windows is not active!", "dbg.put Error", @global:w.MB_OK ); mov( @global:false, GoodHandle ); // Only report this once. xor( eax, eax ); // Set back to NULL endif; else // If the handle becomes good after it was bad, // reset the GoodHandle variable. That way if // DebugWindow dies sometime later, we can once again // bring up the dialog box. if( eax <> NULL ) then mov( @global:true, GoodHandle ); endif; endif; lea( ebx, cds ); @global:w.SendMessage( eax, @global:w.WM_COPYDATA, hwnd, ebx ); pop( edx ); pop( ecx ); pop( ebx ); pop( eax ); end sendStrToDebugWindow; #endifend dbg; #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -