Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API Routine Not Working
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
API Routine Not Working
Divers
Thread ID:
00999467
Message ID:
00999467
Vues:
63
I used the following code at one point to activate a menu item
inside another VFP application. This no longer works. Anyone
know whats wrong?
PROCEDURE ActivateMenuItem(lHandle AS Long, iPad AS Integer, iBar AS Integer)

  #DEFINE WM_COMMAND 273	
  #DEFINE WM_NULL 0

  LOCAL lMenuHandle AS Long
  LOCAL lPadHandle AS Long
  LOCAL lBarHandle AS Long

  DECLARE INTEGER GetMenu IN User32; 
    INTEGER hWnd

  DECLARE INTEGER GetMenuItemID IN User32; 
    INTEGER hWnd, INTEGER Pos

  DECLARE INTEGER GetSubMenu IN User32; 
    INTEGER hWnd, INTEGER Pos

  DECLARE INTEGER SendMessage IN user32; 
    INTEGER hWnd,; 
    INTEGER Msg,; 
    INTEGER wParam,; 
    INTEGER lParam 

  lMenuHandle = GetMenu(lHandle)
  lPadHandle = GetSubMenu(lMenuHandle, iPad)
  lBarHandle = GetMenuItemId(lPadHandle, iBar)

  =SendMessage(lHandle, WM_COMMAND, lBarHandle, WM_NULL) 

  ENDPROC
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform