HWnd

The window handle of the Zorro window.

Type:

int

Remarks:

Example:

#include <windows.h>
#include <default.c>

long Handle1 = 0;

int click()
{
  if(Handle1)
    PostMessage(Handle1,WM_APP+2,0,0); // WM_APP+2 = trigger callback function
  else
    PostMessage(FindWindow(0,"Msg Test 2"),WM_APP+2,0,0);
}

void callback(void *Message)
{
   printf("\nMessage received!");
}

void main()
{
// use [Result] button for senging
  panelSet(-1,0,"Send",0,0,0);
  Handle1 = FindWindow(0,"Msg Test 1");
  if(1Handle1)
    print(TO_TITLE,"Msg Test 1");
  else
    print(TO_TITLE,"Msg Test 2");
  while(wait(1));
}

See also:

Command line, callback

 

► latest version online