Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API Routine Not Working
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
API Routine Not Working
Miscellaneous
Thread ID:
00999467
Message ID:
00999467
Views:
62
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
Next
Reply
Map
View

Click here to load this message in the networking platform