Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activate Window using hWnd
Message
From
05/01/2005 17:35:20
 
 
To
05/01/2005 17:24:03
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00974484
Message ID:
00974541
Views:
53
This message has been marked as a message which has helped to the initial question of the thread.
>Thanks Herman. Works like a charm. I see the second parameter is WM_ACTIVATE. What is the third parameter (1) for?
>
>>>Is there a way to activate a child IDE window (code window, etc.) using a Win32 API call? I have the hWnd, but for some reason I can't get it to activate from a toolbar button. I've tried SetWindowPos(), ShowWindow(), SetActiveWindow(), and SetForegroudWindow(), but none of these seem to work. Will VFP allow activating a window in this manner?
>>
>>Hi Joel,
>>
>>You can Post/Send WM_ACTIVATE Message. Try something like this:
>>
>>PostMessage( hWnd, 6, 1, 0 )
>>
>>
>>HTH

You're welcome Joel :)

The third params is an activation options.
1 = WA_ACTIVE, means activate the window by a method other than mouse click event.

For more detail info you can read it here:

WM_ACTIVATE Notification
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_activate.asp

Regards
Herman
Previous
Reply
Map
View

Click here to load this message in the networking platform