archive-com.com » COM » E » EFG2.COM

Total: 878

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • Admin news aol com I don t know if this will help but here goes DRAWING ANGLED STRINGS procedure TForm1 Canvastextoutangle c TCanvas x y integer angle word s string acolor TColor var Logrec TLOGFONT OldFontHandle NewFontHandle HFONT begin GetObject C Font Handle Sizeof Logrec Addr Logrec Logrec lfEscapement angle 10 Logrec lfOrientation angle 10 NewFontHandle CreateFontIndirect Logrec OldFontHandle SelectObject c Handle NewFontHandle c Brush Style bsClear c Brush Color

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0428b.txt (2016-02-14)
    Open archived version from archive



  • HRgn DBrush TBitmap CHint array 0 255 of Char begin BalloonRect Rect 0 0 Width 1 Height 1 adjust to leave room for pointer if FHintDirection in hdUpRight hdUpLeft then Dec BalloonRect Bottom ArrowMargin else Inc BalloonRect Top ArrowMargin if FHintDirection in hdDownLeft hdUpLeft then Dec BalloonRect Right ArrowMargin else Inc BalloonRect Left ArrowMargin adjust to leave room for shadow Dec BalloonRect Bottom ShadowWidth Dec BalloonRect Right ShadowWidth set up drawing regions if FHintDirection in hdDownLeft hdUpLeft then begin ArrowPoints 0 x BalloonRect Right ArrowMargin ArrowPoints 1 x BalloonRect Right EllipseWidth div 2 ArrowPoints 2 x BalloonRect Right 1 end else begin ArrowPoints 0 x BalloonRect Left ArrowMargin ArrowPoints 1 x BalloonRect Left EllipseWidth div 2 ArrowPoints 2 x BalloonRect Left 1 end if FHintDirection in hdUpRight hdUpLeft then begin ArrowPoints 0 y BalloonRect Bottom ArrowMargin ArrowPoints 1 y BalloonRect Bottom 1 ArrowPoints 2 y BalloonRect Bottom EllipseHeight div 2 end else begin ArrowPoints 0 y BalloonRect Top ArrowMargin ArrowPoints 1 y BalloonRect Top 1 ArrowPoints 2 y BalloonRect Top EllipseHeight div 2 end ArrowRgn CreatePolygonRgn ArrowPoints 3 ALTERNATE RoundRgn CreateRoundRectRgn BalloonRect Left BalloonRect Top BalloonRect Right BalloonRect Bottom EllipseWidth EllipseHeight BalloonRgn CreateRectRgn 0 0 1 1 ShadowRgn CreateRectRgn 0 0 1 1 CombineRgn BalloonRgn RoundRgn ArrowRgn RGN OR DeleteObject RoundRgn DeleteObject ArrowRgn CombineRgn ShadowRgn BalloonRgn 0 RGN COPY OffsetRgn ShadowRgn ShadowWidth ShadowWidth DBrush TBitmap Create try DBrush Monochrome True DBrush Height 8 DBrush Width 8 for i 0 to 7 do for j 0 to 7 do begin if i j mod 2 0 then DBrush Canvas Pixels i j clBlack else DBrush Canvas Pixels i j clWhite end with Canvas do begin Brush Style bsSolid Brush Color clWhite Brush Bitmap DBrush Pen Color clBlack Pen Style psSolid Pen Mode pmMask Pen Width 1 draw shadow OldObject SelectObject Canvas

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0528.txt (2016-02-14)
    Open archived version from archive


  • 1 x 50 pts 1 y 250 pts 2 x 250 pts 2 y 250 pts 3 x 250 pts 3 y 50 The second polygon has 3 points poly point count 1 3 pts 4 x 400 pts 4 y 50 pts 5 x 300 pts 5 y 250 pts 6 x 500 pts 6 y 250 The third polygon has 5 points poly point count 2 5 pts

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0301.txt (2016-02-14)
    Open archived version from archive


  • FormPaint Sender TObject var LargeIcon HIcon SmallIcon HIcon IconCount Integer i Integer FileName PChar begin FileName C WINNT REGEDIT EXE IconCount ExtractIconEx FileName 1 LargeIcon SmallIcon 0 for i 0 to Pred IconCount do begin ExtractIconEx FileName i LargeIcon SmallIcon 1 DrawIcon Canvas Handle 5 i 36 5 LargeIcon DrawIconEx Canvas Handle 5 i 36 50 SmallIcon GetSystemMetrics SM CXSMICON GetSystemMetrics SM CYSMICON 0 0 DI NORMAL end end It draws a stripe with all large icons contained in a file and below of that a stripe with all small icons In the other example HINSTANCE is the handle of the calling application not of the called So it s not necessary that the application which you want to draw the icons of must be opened Kerstin Paul Nicholls wrote Hi Kerstin does the code you wrote below retrieve the small icon or the large icon If it retrieves one of these types can the other be retrieved as well I want to get both the small and large icons from a file There is another slight hassle the files I want to get the icons from won t necessarily be running so there won t be a HINSTANCE for

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0714a.txt (2016-02-14)
    Open archived version from archive


  • Reply To colin wilsonc demon co uk Newsgroups borland public delphi graphics In article Sarah Lander wrote I can t seem to work out what I should put for cbSize Has anyone got an example Put in the size of the DrawTextParams structure eg procedure TForm1 Button1Click Sender TObject var textParams DrawTextParams rect TRect begin textParams cbSize sizeof textParams textParams iTabLength 15 textParams iLeftMargin 1 textParams iRightMargin 1 rect ClientRect

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1007b.txt (2016-02-14)
    Open archived version from archive


  • draws it In this example a 10 pixel margin is added Keep in mind that this example does not take into account all the TMemo settings like word wrap But if you look at the help for DrawText you ll find lots of parameters to control the output check DT WORDBREAK note error checking omitted for clarity of code This example uses a TMemo a TImage and a TButton procedure TForm1 Button1Click Sender TObject var bmp TBitmap Draw Memo text on this TextRect TRect For measuring text lcr integer Left Center Right begin bmp TBitmap Create bmp Canvas Font Memo1 Font lcr 0 Avoid compiler warnings if Memo1 Alignment taLeftJustify then lcr DT LEFT if Memo1 Alignment taCenter then lcr DT CENTER if Memo1 Alignment taRightJustify then lcr DT RIGHT TextRect Left 0 TextRect Top 0 First time add DT CALCRECT to determine rectangle size DrawText bmp Canvas Handle PChar Memo1 Text Measure rect length Memo1 Text TextRect DT CALCRECT or DT NOPREFIX or lcr Make our bmp a bit larger to provide a margin bmp Width TextRect Right TextRect Left 20 bmp Height TextRect Bottom TextRect Top 20 bmp Canvas Brush Color clAqua bmp Canvas Fillrect RECT 0 0

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2000/0329.txt (2016-02-14)
    Open archived version from archive


  • lpDisplayDevice TDisplayDevice dwFlags DWORD cc DWORD begin lpdisplaydevice cb sizeof lpdisplaydevice dwflags 0 cc 0 while EnumDisplayDevices nil cc lpDisplayDevice dwFlags do begin inc cc listbox1 items add lpdisplaydevice DeviceString end end Nemesis wrote in message news 8ev0uf ffn2 bornews borland com Can someone help me with how I should use the EnumDisplayDevices function It s not documented in the Delphi Help files but there s some information on http

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2000/0506.txt (2016-02-14)
    Open archived version from archive


  • Is this capability available in D4 Can believe this message has gone unanswered for so long A You will need to call the Windows API function ExtCreatePen to create a geometric pen style and use the Canvas Handle property to use the Windows Path functions Example procedure TForm1 Button1Click Sender TObject var lb TLogBrush begin lb lbStyle BS SOLID lb lbColor RGB 255 0 0 lb lbHatch 0 Form1 Canvas

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0327.txt (2016-02-14)
    Open archived version from archive



  •