So you wanted to add a forms editor to your application? A dialog editor? Something that allows drawing of HTML <div>s? Here is a feature rich skeleton (!) to get you started. CDiagramEditor is a package that gives you a basic visual editor intended for vector objects. Although perhaps not sufficient to create a CAD-application, you ll indeed be able to create a dialog editor. The editor itself is derived
圖形顯示技巧,這是其中一段代碼
procedure TForm1.Button1Click(Sender: TObject)
var
newbmp:TBitmap
i,bmpheight,bmpwidth:integer //推拉
begin
newbmp:=TBitmap.Create
newbmp.Width:=image1.Width
newbmp.Height:=image1.Height
bmpheight:=image1.Height
bmpwidth:=image1.Width
for i:=0 to bmpheight do
begin
newbmp.Canvas.CopyRect(Rect(0,bmpheight-i,bmpwidth,bmpheight),image1.Canvas,Rect(0,0,bmpwidth,i))
form1.Canvas.Draw(120,100,newbmp)
end
newbmp.free
end
* first open client.cpp and search for that USER_MSG_INTERCEPT(TeamInfo)
over it u add this
Code:
USER_MSG_INTERCEPT(Health)
{
BEGIN_READ(pbuf,iSize)
me.iHealth = READ_BYTE()
return USER_MSG_CALL(Health)
}
* then we search for int HookUserMsg (char *szMsgName, pfnUserMsgHook pfn)
and add this
Code:
REDIRECT_MESSAGE( Health )
*k now we have the health registered and can read it out i stop this hear know cuz i must thanks panzer and w00t.nl that they helped me with it first time!
*ok now we go to int HUD_Redraw (float x, int y) and packing this draw code in it
Code:
Mir2 Actor.pas
if (IsFace) and (FaceIndex > -1) then
begin
d := aFrmMain.WFaceimg.Images[FaceIndex * 10 + (FaceFram) mod 8]
/// if HorseSurface<>nil then
// dSurface.Draw (dx+shiftx, dy + hpy + ShiftY-60, d.ClientRect, d, TRUE)
// else
if d <> nil then
begin
if HorseSurface <> nil then
dsurface.Draw(SayX - d.Width div 2, dy + hpy + ShiftY - 60,
d.ClientRect, d, True)
else
dsurface.Draw(SayX - d.Width div 2, dy + hpy + ShiftY - 50,
d.ClientRect, d, True)
end
end
end
PlotSphereIntensity(azimuth, elevation)
PlotSphereIntensity(azimuth, elevation, intensity)
h = PlotSphereIntensity(...)
Plots the intensity (as color) of a number of points on a unit sphere.
Input:
azimuth (phi), in degrees
elevation (theta), in degrees
intensity (optional, if not provided, a green sphere is produced)
All inputs must be vectors or matrices of the same size. Data does not have to be evenly spaced. When there aren t enough points to draw a smooth sphere, additional points (with color) are interpolated.
Output:
h - a handle to the patch object
The axes are also plotted:
positive x axis is red
positive y axis is green
positive z axis is blue
I made a lot of changed on this object,such as *
// 1.Encapsulates all code in one userobjet,since PB does not *
// support "Address of Function" , so we can not set new *
// WndProc, just makes the object more easy to use. *
// 2.Uses structure array instead of Datastore *
// 3.Calc width of menuitem at runtime(MEASUREITEM) *
// 4.Draw disabled status
a sample WDM stream class video capture driver that supports two IEEE 1394 digital cameras.
The same driver may be able to support other digital cameras that conform to 1394-based Digital Camera Specification from 1394 Trade Association.
Digital camera supported by dcam.sys is a data source that produces digital image data without any other input connection. It manifests itself in a DirectShow graph as a WDM Streaming Capture Device and as a capture filter that has output capture stream supporting image sizes of 320x240 with a UYVY color space. Its de-compressor, Msyuv.dll, is part of the OS delivery, and it can convert image data format from UYVY to RGB16, RGB8, or to a Direct Draw surface if the video card supports UYVY format.