Results 1 to 2 of 2

Thread: Small Problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    167

    Small Problem

    i'm new to the whole dll programming.

    i'm rewriting my whole program to a activeX dll but i got some problem

    here is a code snip where the problem is:




    VB Code:
    1. BitBlt objto.hdc, 0, 0, StoreSetup.AcceptTrade_cur.Width, StoreSetup.AcceptTrade_cur.Height, hdc, StoreSetup.AcceptTrade_cur.Left, StoreSetup.AcceptTrade_cur.Top, SRCCOPY

    oke so the problem is since the Width,Height,left,top ar never the same i cant use that code into my dll (i got like 10 this like that. for different object)

    so how can i get the Width,Height,left,top from a picturebox for example into my dll?

    note my dll is compiled alone since its better for updates

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    167
    Found it

    Code:
    Function test(ByRef objto As Object, Width As String, Height As String, Left As String, Top As String) As String
    Dim hwnd As Long
    Dim tr As RECT
    Dim hdc As Long
    
    hwnd = GetDesktopWindow()
    GetWindowRect hwnd, tr
    hdc = CreateDCasNull("DISPLAY", ByVal 0&, ByVal 0&, ByVal 0&)
    
    
    BitBlt objto.hdc, 0, 0, Width, Height, hdc, Left, Top, SRCCOPY
    DeleteDC hdc
    or is there a faster way?

    and if i have more then one classes on one dll

    do i need to create a new object for everyclass?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width