|
-
Nov 16th, 2000, 07:21 AM
#1
Thread Starter
Hyperactive Member
Hi,
Can anyone explain what are all the paramiters in the function below?
Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Thanks alot.
-
Nov 16th, 2000, 07:26 AM
#2
Frenzied Member
Sure!
This is the code I use in my WindowClass to set it on top or not.
Code:
Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_SHOWWINDOW = &H40
Public Property Let AlwaysOnTop(WinhWnd As Long, flag As Boolean)
SetWindowPos WinhWnd, -2 - flag, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Property
If you want to make windowhandling easier, download my class at
http://www.geocities.com/despotez/WH/
Examples included!
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 16th, 2000, 07:27 AM
#3
Fanatic Member
Of course the x and y are for the coordinates of where u want to place the window according to your screen resolution or screen width! the Hwnd is a number that is like an identity for each window! The rest I don't know
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Nov 16th, 2000, 07:28 AM
#4
_______
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 16th, 2000, 07:28 AM
#5
Guru
This kind of thing is best explained in the MSDN library.
Click this smily:
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
|