|
-
Jun 6th, 2001, 04:57 AM
#1
Thread Starter
Fanatic Member
GetDesktopDC?
Hi!
I want tot know if there is any function to get
the desktop DC, and load it before my form goes up?
My target is to make a picture with a white back, and
then use SetPixel and GetPixel to make the white part
transparent.
understand me?
If there's other way of making it, tell me...
Thank you,
Arie.
-
Jun 6th, 2001, 09:18 AM
#2
Fanatic Member
Code:
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Dim deskWnd As Long
Dim deskDC As Long
deskWnd = GetDesktopWindow()
deskDC = GetDC(deskWnd)
And Sastraxi is right, use BitBlt instead of Get- and SetPixel, it's much faster...
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
Jun 6th, 2001, 10:22 AM
#3
PowerPoster
err use GetWindowDC not GetDC...
-
Jun 6th, 2001, 10:25 AM
#4
Fanatic Member
GetDC always worked fine for me...
Teaudirenopossum.Musasapientumfixaestinaure.
(I can't hear you. There's a banana in my ear)
-
Jun 6th, 2001, 11:24 AM
#5
transcendental analytic
GetwindowDC returns the dc to the client area of a window while GetDC returns the DC including the non-client area. You can also use GetDC to return the screen device context by passing a null:
ScreenDC=GetDC(0)
Also, you have to use ReleaseDC to free up the resources after you.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 6th, 2001, 12:01 PM
#6
PowerPoster
Seems like noone cracked your numbers yet huh?
-
Jun 6th, 2001, 05:16 PM
#7
transcendental analytic
yeah, that's odd, it's not encrypted or encoded in any way
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 6th, 2001, 05:33 PM
#8
Good Ol' Platypus
I posted something in Chit-Chat!
Is it your VB serial number??? (or C, Java, Interdev, Studio, ???)
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
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
|