Using Win32 functions in Visual FoxPro Image Gallery
Message and Message Queue
..msdn
BroadcastSystemMessage
GetQueueStatus
MQCloseQueue
MQDeleteQueue
MQHandleToFormatName
MQOpenQueue
MQPathNameToFormatName
MQPurgeQueue
PeekMessage
PostMessage
PostQuitMessage
SendMessage
Code examples:
PeekMessage
..msdn    Add comment     W32 Constants      Translate this page
The PeekMessage function dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves the message (if any exist).
Code examples:
Declaration:
BOOL PeekMessage(
    LPMSG lpMsg,
    HWND hWnd,
    UINT wMsgFilterMin,
    UINT wMsgFilterMax,
    UINT wRemoveMsg
);
FoxPro declaration:
DECLARE INTEGER PeekMessage IN user32;
    STRING  @ lpMsg,;
    INTEGER   hWnd,;
    INTEGER   wMsgFilterMin,;
    INTEGER   wMsgFilterMax,;
    INTEGER   wRemoveMsg

Parameters:
lpMsg
[out] Pointer to an MSG structure that receives message information.

hWnd
[in] Handle to the window whose messages are to be examined. The window must belong to the current thread.

wMsgFilterMin
[in] Specifies the value of the first message in the range of messages to be examined.

wMsgFilterMax
[in] Specifies the value of the last message in the range of messages to be examined.

wRemoveMsg
[in] Specifies how messages are handled.

Return value:
If a message is available, the return value is nonzero.
Usage:
* flushes Mouse windows messages
* for all windows that belong to the current thread
#DEFINE WM_MOUSEFIRST 0x0200
#DEFINE WM_MOUSELAST 0x0209
#DEFINE PM_REMOVE 0x0001

cBuffer=REPLICATE(CHR(0), 64)

DO WHILE PeekMessage(@cBuffer, 0, WM_MOUSEFIRST,;
    WM_MOUSELAST, PM_REMOVE) <> 0

    DOEVENTS
ENDDO
My comment:
If hWnd is NULL, PeekMessage retrieves messages for any window that belongs to the current thread, and any messages on the current thread"s message queue whose hwnd value is NULL (see the MSG structure).
Word Index links for the PeekMessage :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2002-08-10 10:03:16
Modified: 2009-02-17 15:38:24
Visited in last 7 days: 17
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.82.112.193)
18 sec.Function: 'GetProcessVersion'
34 sec.Function: 'CreateMenu'
51 sec.Function: 'IsWindow'
1.12 min.Function: 'WTSUnRegisterSessionNotification'
1.42 min.Function: 'ShowCursor'
1.68 min.Function: 'NetShareAdd'
1.98 min.Function: 'GetUserGeoID'
2.25 min.Function: 'GetMenuItemInfo'
2.55 min.Function: 'WritePrivateProfileString'
2.82 min.Function: 'OpenDesktop'
Google
Advertise here!