TrackPopupMenu API help needed! 
Author Message
 TrackPopupMenu API help needed!

This is starting to drive me bananas - I know I
should know the answer, but I've had 2 days of
fighting it..

I'm using the DDT MENU command to create a bar
and popup, then using the TrackMenuPopup API call
to get the popup to appear at a specific screen
location. The main dialog is hidden and the popup
is triggered by a GetCursorPos() API call.

Can anyone think of a way to close the popup? -
I'm getting errors using the DestroyMenu API, and
destroying it empties the popup content.

I'm launching a new thread to keep timer going so
I can pop the menu down, but just can't seem to
get the thing right!!

Maybe if I could get the menu topmost and active,
it would disappear when the user changes focus
back to a different app - I've also tried to
attach the popup to the desktop with hWnd=0 but
no good there either..

Any sensible (or even silly) ideas greatly
received..

Regards, and thanx to PB for the best compiler on
the planet.

Alan

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 20 Mar 2002 03:00:00 GMT  
 TrackPopupMenu API help needed!
This is the only way i know of.

    Dim PA As POINTAPI

    GetCursorPos PA
    TrackPopupMenu hMenu, 0, PA.x -10, PA.y -10, 0, hWnd, ByVal %NULL
    Postmessage hWnd, %WM_NULL, 0, 0

Quote:

>This is starting to drive me bananas - I know I
>should know the answer, but I've had 2 days of
>fighting it..

>I'm using the DDT MENU command to create a bar
>and popup, then using the TrackMenuPopup API call
>to get the popup to appear at a specific screen
>location. The main dialog is hidden and the popup
>is triggered by a GetCursorPos() API call.

>Can anyone think of a way to close the popup? -
>I'm getting errors using the DestroyMenu API, and
>destroying it empties the popup content.

>I'm launching a new thread to keep timer going so
>I can pop the menu down, but just can't seem to
>get the thing right!!

>Maybe if I could get the menu topmost and active,
>it would disappear when the user changes focus
>back to a different app - I've also tried to
>attach the popup to the desktop with hWnd=0 but
>no good there either..

>Any sensible (or even silly) ideas greatly
>received..

>Regards, and thanx to PB for the best compiler on
>the planet.

>Alan

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Wed, 20 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need guru help with Windows API

2. Need help with LeadTools API and displaying image in image control

3. Need help with PROPPRINT:Context and GetDeviceCaps API call

4. Need help completing API calls getting EXE/DLL Versions

5. HELP NEEDED: An API

6. Windows API call GetDeviceCaps. Need help

7. Need Windows API help

8. HELP - Need to access API - SystemHeapInfo

9. Need Help with API Call

10. Help me.? Need API graphics in CW

11. Need API help

12. Help needed: Updating Clarion 1.5 & Win-API

 

 
Powered by phpBB® Forum Software