|
-
Jan 20th, 2002, 04:37 AM
#1
Thread Starter
Junior Member
Api - SendMessage
does any one knows why is it that when i call a WM_ message
for the API "SendMessage" function,
it is always an empty WM_
while it suppose to be signed &HD or &C1 values or something like that ?
-
Jan 20th, 2002, 07:36 AM
#2
Conquistador
i don'ts know what yous mean?
-
Jan 20th, 2002, 12:22 PM
#3
Did you remember to define the constant?
-
Jan 21st, 2002, 04:32 AM
#4
Thread Starter
Junior Member
this is exactly my problem
lets say i want to use the WM_CLOSEWINDOW,
how do i know what to define ?????????????
const WMCLOSEWINDOW = &???????
-
Jan 21st, 2002, 04:49 AM
#5
Conquistador
you find out
it's WM_CLOSE
the value is &H10
Private Const WM_CLOSEWINDOW = &H10

Use the API viewer
-
Jan 21st, 2002, 05:13 AM
#6
Thread Starter
Junior Member
Thank you so much !!!!!!!!!!!!!!!!!!!!
:-)
can you tell me how can i use sendMessage inorder to resize
a remote window from within my program ?
i intend to turn a remote dos window in to a FULL SCREEN mode, but no mater what i do, it wont work. i tried everything !!
can you also tell me how/where can i look for those codes my self ?
thank you again.
-
Jan 21st, 2002, 06:58 AM
#7
Conquistador
something like this?
VB Code:
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Form_Load()
Dim MyStr As String
Dim dosHand As Long
dosHand = FindWindow("tty", vbNullString)
MyStr = String(GetWindowTextLength(dosHand) + 1, Chr$(0))
GetWindowText dosHand, MyStr, Len(MyStr)
AppActivate MyStr
SendKeys "%~"
AppActivate MyStr
End
End Sub
?
-
Jan 21st, 2002, 11:13 AM
#8
Thread Starter
Junior Member
help
thanx again
:-)
you see, the code you gave me sets the dos window to a normal size, i tried playing with it, but..
i tried already:
ShowWindow hwnd, 3 (API function), but it will return a big dos screen (not totaly full screen)
then i tried:
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, wFlags)
but it only sets the focus to the minimized tab of the dos window on the toolbar, but not resizing it.
what happenes it that when i move from the dos program to the vb program, it makes the dos window minimized, and i want to return from the vb program to the dos program but it wont return to the dos's TOTALY FULL SCREEN mode (the one you can make by pressing Alt & Enter on a dos window)
i hope you are not troubled by me but chalanged :-)
thank you
-
Jan 22nd, 2002, 02:41 AM
#9
Thread Starter
Junior 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
|