|
-
Aug 30th, 2000, 01:28 PM
#1
It doesn't exist, but is there a way around it???? I need that hwnd!!!
-
Aug 30th, 2000, 01:37 PM
#2
transcendental analytic
You are absolutely right, there isn't a hwnd, and the reason is because there isnt'. In other words, a label doesn't have a hwnd.
In fact the caption is written directly on the form so there isn't a window to which it could have a handle
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.
-
Aug 30th, 2000, 01:57 PM
#3
I know there is no hwnd for label. I'm asking if there is a way around it (I need to use the label in subclassing but without the hwnd it's not possible)
P.S. What with that caption????? What caption?????
-
Aug 30th, 2000, 02:00 PM
#4
Fanatic Member
Why exactly do you need it for.
There are more than two ways to get deep pe...
I've said too much.
-
Aug 30th, 2000, 02:01 PM
#5
I need to create a mouse_in and mouse_out event. I did it with command button, picture box, form, frame etc. But all of them had the hwnd. I have a bunch of labels (a lot actually) and I need to create a mouse_in and out event. Without the hwnd - well it's not doable.
-
Aug 30th, 2000, 02:06 PM
#6
_______
<?>
Could you set the Label1.tag = 333
or whatever and access the label by its tag number?
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 30th, 2000, 02:12 PM
#7
He is using it for subclassing, I dont think you can use the Tag property in subclassing... unfortunatly
-
Aug 30th, 2000, 02:14 PM
#8
Monday Morning Lunatic
Make a usercontrol that acts like a label, but is a windowed control.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 30th, 2000, 02:17 PM
#9
HeSaidJoe: Can't do. In my subclassing procedure I have something like this:
Code:
Select Case hwnd
Case frmMain.hwnd
Case frmOption.hwnd
Case frmMain.cmdAdd.hwnd
End Select
the hwnd is part of the subclassing (as far as I know you need to have hwnd to subclass unless I'm mistaken). So as you see I need that [beep] hwnd
-
Aug 30th, 2000, 02:18 PM
#10
Monday Morning Lunatic
The UserControl has the capability to export its hWnd.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 30th, 2000, 03:23 PM
#11
_______
<?>
Don't know if it's of any use to you but I found this on
another site as an answer to finding the hwnd can't be found
'sample of mouse over mouse off
It might give you a spark or something and if not...just more useless code for your situtation.
[code]
Private Sub Form_Load()
Picture1.Height = 1
Picture1.Width = 1
End Sub
Private Sub Label1_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
If State = 1 Then
lblmsg = "Mouse left label1"
Picture1.Drag 0
End If
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblmsg = "Mouse is over label1"
Picture1.Left = Label1.Left + X
Picture1.Top = Label1.Top + Y
Picture1.Drag
End Sub
[code]
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 31st, 2000, 06:29 AM
#12
transcendental analytic
I think you could have a textbox to act like a label if you remove the borders, or ofcouse you could make a usercontrol for that
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.
-
Aug 31st, 2000, 07:38 AM
#13
Why not just place it in a PictureBox?
-
Aug 31st, 2000, 11:48 AM
#14
transcendental analytic
because it would take up more resource than a textbox would
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.
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
|