|
-
Dec 3rd, 2001, 04:33 PM
#1
Thread Starter
Addicted Member
Listview not locking
Hi... I am using the LockWindowUpdate API to lock a listview... however it does not seem to be working. I am locking a Treeview at the same time and it works but not the listview. When I try to lock the listview the LockWindowUpdate function returns 0... Any ideas??? Here's my code minus the API Declaration:
VB Code:
Private Sub Listview_DblClick()
Dim retval as Long
retval = LockWindowUpdate(TreeView1.Hwnd) 'returns 1
retval = LockWindowUpdate(ListView1.Hwnd) ' returns 0
End Sub
Thanks....
BestCoder
-
Dec 5th, 2001, 08:42 AM
#2
I did some searching and couldn't find anything specific to a ListView control. Could simple perform a LockWindowUpdate on the entire form? Allegedly, this locks all controls on the form.
-
Dec 5th, 2001, 08:52 AM
#3
Thread Starter
Addicted Member
Yes you are right... I could do that, at least for a test... I do need to access some of the controls on this form while the Treeview and Listview are locked. I'll let you know the results of the test.
Thanks....
BestCoder
-
Dec 5th, 2001, 09:23 AM
#4
Thread Starter
Addicted Member
Ok... not sure why this is but it seems that the one that is locked first is the only one that will work. If I lock the treeview first it locks fine and the listview doesn't, but if I lock the Listview first it locks fine and thre treeview doesn't. Know anything about this??
Thanks a mil.
BestCoder
-
Dec 5th, 2001, 09:34 AM
#5
No idea...how about locking one and disabling the other?
-
Dec 5th, 2001, 11:47 AM
#6
Thread Starter
Addicted Member
yeah that's what I'm doing... strange though.
-
Dec 5th, 2001, 05:14 PM
#7
I know that even in their current iterations these controls have some, how shall I say, "issues", but this is a strange one. I'm going to have a look at MSDN and see what I can see. If I find anything worthy I'll post it.
-
Dec 5th, 2001, 07:52 PM
#8
Thread Starter
Addicted Member
yeah... I looked in the Platform SDK Documentation but couldn't find anything that gave any reasons for that behavior.
-
Dec 17th, 2001, 01:26 PM
#9
Fanatic Member
Only one window can be "locked" at a time. Try locking the form. Or put both the controls in a frame and lock the frame.
You can even lock the desktop (use GetDesktopWindow())
just make sure to call LockWindowUpdate(0) to "unlock" whatever is locked.
-
Dec 17th, 2001, 02:34 PM
#10
Actually, I like that Frame idea that agent has. Have you tried that?
-
Dec 17th, 2001, 02:39 PM
#11
Thread Starter
Addicted Member
Yes that is a good idea. I hadn't thought of that. Thanks for replies agent and hack...
BestCoder
-
Dec 17th, 2001, 07:25 PM
#12
Help R Us...
-
Dec 17th, 2001, 07:32 PM
#13
Thread Starter
Addicted Member
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
|