CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Cambalinho

Page 1 of 54 1 2 3 4

Search: Search took 0.15 seconds.

  1. Re: Knowing HDC, can i get the actual DIB, or i must create it?

    thank you VictorN
  2. Re: Knowing HDC, can i get the actual DIB, or i must create it?

    both zero

    Dim s As Long s = GetDIBits(DestinationHDC, DestinationBitmap, 0, bm.bmHeight, gptr, bi, DIB_RGB_COLORS)
    If (s = 0) Then
    MsgBox "error " + vbTab + CStr(GetLastError())
    ...
  3. Re: Knowing HDC, can i get the actual DIB, or i must create it?

    so far i did these code:

    Friend Sub DrawImageRectanglePoints(DestinationHDC As Long, Points() As Position3D, WorldSize As Size3D) 'Points(0) is the Upper-Left
    'Points(1) is the Upper-Right...
  4. Knowing HDC, can i get the actual DIB, or i must create it?

    using the GetCurrentObject() with HDC, i can get the actual HBitmap handle....but i need ask more 2 things:
    1 - how can i get the BITMAPINFOHEADER from HBitmap?
    2 - do i need create the DIB or the...
  5. Replies
    0
    Views
    1,117

    how use DIB's?

    i have these 2 functions for get pixels:

    Public Sub GetImageData(ByRef SourcehBitmap As Long, ByRef SourceHDC As Long, ByRef ImageData() As Byte)

    'Declare variables of the necessary bitmap...
  6. Replies
    1
    Views
    1,509

    Re: how rotate a 2D image using 3D rotation?

    i use these functions for rotate a pixel...
    1 - we get the pixel(the Z is zero) on RotationImage() and GetPixel();
    2 - all angles(X, Y and Z) must be converted in Radians(the computer use Radians...
  7. Replies
    1
    Views
    1,509

    how rotate a 2D image using 3D rotation?

    heres the functions that i use for rotation 3D:

    //RotateImage.h:
    #include <iostream>
    #include <windows.h>
    #include <math.h>


    struct PointAPI
    {
  8. Re: how use UDT(User Defined Types) on a class?

    i can't find that option :(
    PS: if i use a 'private' on UDT's and the function that have that parameters being 'private', i will not get that error... but the function must be used.. so must be...
  9. Re: how use UDT(User Defined Types) on a class?

    ok.. the type is public, but i get, now, an error on type:

    Public Type POINTL X As Long
    Y As Long
    End Type
    "compiler error: cannot define a public user-defined type within a private...
  10. Re: how use UDT(User Defined Types) on a class?

    Public Sub DrawImageTrapezoid(ByRef Points() As POINTL, ByVal DestinationHDC As Long, ByVal TranspColor As Long)
    "Compiler error:
    Private enum and user defined types cannot be used as parameters ou...
  11. Re: how use UDT(User Defined Types) on a class?

    heres the error message:
    https://imgur.com/a/hOjFifj
    and now the 'array parentheses':

    Option Explicit

    Private GDIsi As GDIPlusStartupInput, gToken As Long, hGraphics As Long, hBitmap As Long
  12. how use UDT(User Defined Types) on a class?

    i created a class:

    Option Explicit

    Private GDIsi As GDIPlusStartupInput, gToken As Long, hGraphics As Long, hBitmap As Long


    Private Type POINTL
    X As Long
    Y As Long
  13. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    no.... but i'm trying understand if the values from points() to texturepoints() are correct or not :(
    i'm confused... the texture go to the 1st to the 2nd points without problems... i belive the 3...
  14. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    wow i found 1 problem: if the point have a negative value, i will get big numbers... ok these problem will be fixed. after i learn 1 math.
    heres the values:
    35907
    but what i did wrong with values?
  15. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    VictorN: even not be C code... what you think about the image?
    heres a pseud-rectangle(A to D):
    B |-----------|C

    A |-----------| D
    "A pointer to an array of three points in logical space that...
  16. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    finally i'm using it, but i'm getting the wrong shape width..

    'Get the four vectors
    'Floor:
    'Vector1: low-left
    FillPosition3D NewPosition3D(0), Position.X, Position.Y,...
  17. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    correct me anotherthing: even if i fix it, the PlgBlt() can be used on a plane? or the results will be not what we expected?
    i mean drawed the texture.. like create a street
  18. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    PlgBlt Me.hDC, points2, Picture1.hDC, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, &O0, &O0, &O0
    error by ref argument....
  19. Replies
    0
    Views
    453

    how use\add GDIPLUS on VB6?

    how use\add GDIPLUS on VB6?
  20. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    yes

    Dim points2(4) As POINTAPI
    points2(0) = Points(0)
    points2(1) = Points(1)
    points2(2) = Points(2)
    points2(3) = Points(3)
    PlgBlt Me.hDC, points2(0), Picture1.hDC, 0, 0,...
  21. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    i'm trying now testing the function:

    'Convert all 3D vectors to 2D vectors(for screen): Dim i As Integer
    For i = 0 To 3
    Points(i) = ConvertPositon3DTo2D(NewPosition3D(i),...
  22. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    thank you so much for all... thank you
  23. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    maybe i was confused.. nothing more.. sorry
  24. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    i'm sorry, but you miss some words?
    "... VB is the upper-right corner, and VC and the lower-left corner then it looks..."
  25. Replies
    28
    Views
    3,299

    Re: how use PlgBlt() API function?

    is like:
    (upper-left)VA - VB(upper-right)
    (low-right)VC - VD(low-left)
Results 1 to 25 of 1329
Page 1 of 54 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)