Consultor Eletrônico



Kbase 18671: ACTIVEX - How to Get Popup Menus to Work
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/16/1999
ACTIVEX - How to Get Popup Menus to Work

Title: ACTIVEX - How to Get Popup Menus to Work

KnowledgeBase Number: 18671
Creation Date: 16-MAR-99
Modified Date:
This document applies to: Progress 8.2A and Higher
Version and Release Number: 8.2A

Summary:

The following details the code needed to have a Progress popup menu
display when you right click on an OCX control.

Step by step details:

1) Define the popup menu itself (either via hand written code or
by defining it for another widget).

2) Assign the menu handle of the popup menu to the OCX's control
frame:

CtrlFrame:POPUP-MENU = MENU SomePopupMenu:HANDLE.

3) Assuming that the OCX you are using has an event that handles
mouse events, place code *similar* to the following in the
trigger:

IF *TheRightMouseButtonWasPressed* THEN
RUN SendMessageA (SELF:HWND, 517, 0, 0).

4) Put the following external procedure definition in either the
Definitions section or wherever you put your external procedure
definition code:

PROCEDURE SendMessageA EXTERNAL "USER32.DLL":
DEFINE INPUT PARAMETER win-handle AS LONG NO-UNDO.
DEFINE INPUT PARAMETER win-msg AS LONG NO-UNDO.
DEFINE INPUT PARAMETER win-param1 AS LONG NO-UNDO.
DEFINE INPUT PARAMETER win-param2 AS LONG NO-UNDO.
END PROCEDURE.