FindWindowEx and VP application architecture [resolved]

Discussions related to Visual Prolog
User avatar
Tonton Luc
VIP Member
Posts: 500
Joined: 16 Oct 2001 23:01

FindWindowEx and VP application architecture [resolved]

Unread post by Tonton Luc » 9 Aug 2017 12:23

Hi,

I've a VP 7.3 application named "Attrib_options_excel.exe" and the title of the task is "Attrib_options_excel".
In the task, there is one form (named "Frm1").
In this form, there is an edit control named "prix" (and other controls).
From an Excel VBA macros, I would like to put a value in this edit control.

How to recover the edit control handle ?
Here is my VBA code :

Code: Select all

Sub ApplicationPremierPlan()     Dim hwnd As Long     Dim Hwnd_child As Long     Dim Hwnd_prix As Long       hwnd = FindWindow("PDCFrame32", "Attrib_options_excel")     If hwnd > 0 Then         Hwnd_child = FindWindowEx(hwnd, 0,???, "")      Else         Shell "d:\...my_path...\Attrib_options_excel.exe", vbNormalFocus     End If End Sub
FindWindow works fine in this code, but how to write FindWindowEx ?
Last edited by Tonton Luc on 10 Aug 2017 10:07, edited 1 time in total.

User avatar
Tonton Luc
VIP Member
Posts: 500
Joined: 16 Oct 2001 23:01

Unread post by Tonton Luc » 10 Aug 2017 7:21

I've found what I'm looking for :

Code: Select all

 
:-)

Post Reply