예제 #1
0
LOCAL void Hotspot_OnTimer(HWND hWindow, UINT id)
/***********************************************************************/
{ // Timer went off, so execute the same as in WM_LBUTTONDOWN
	STRING szScene;

	KillTimer( hWindow, id );
	GetWindowText( hWindow, szScene, sizeof(szScene)-1 );
	if ( !(*szScene) )
		FORWARD_WM_COMMAND(GetParent(hWindow), GET_WINDOW_ID(hWindow), hWindow, 0, SendMessage);
	else
		GetApp()->GotoScene( GetParent(hWindow), latoi(szScene) );
}
예제 #2
0
LOCAL void Hotspot_OnLButtonUp(HWND hWindow, int x, int y, UINT keyFlags)
/***********************************************************************/
{
	if ( !bTrack )
		return;
	ReleaseCapture(); bTrack = FALSE;
	if ( bInRect )
	{
		STRING szScene;

		GetWindowText( hWindow, szScene, sizeof(szScene)-1 );
		if ( !(*szScene) )
			FORWARD_WM_COMMAND(GetParent(hWindow), GET_WINDOW_ID(hWindow), hWindow, 0, SendMessage);
		else
			GetApp()->GotoScene( GetParent(hWindow), latoi(szScene) );
	}
}
예제 #3
0
//***********************************************************************
BOOL CParser::GetNextNum(LPINT Val)		// get value of next number - must be 0..9
//***********************************************************************
{
	if (!m_lpScript) return 0;
	BOOL bResult = FALSE;
	SkipBlanks();						// go to anything
	LPSTR lpNum = m_lpScript;		// start of the number
	char c;

	while ((c = *(m_lpScript++)) &&
			((c >= '0' && c <= '9') || c == '-'))
	bResult = TRUE;

	m_lpScript--;						// next char after the number
	if (bResult)
		*Val = latoi(lpNum);
	return bResult;
}