|
-
Nov 4th, 2004, 05:47 PM
#1
Thread Starter
Addicted Member
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:
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
-
Nov 4th, 2004, 07:39 PM
#2
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|