예제 #1
0
int MGLSample1Proc(WND wnd, int msg, int wparam, int lparam)
{
	int handled=FALSE;

	switch (msg)
	{
	case AWM_CREATE:
	case AWM_LOAD:
		MsgCreate(wnd, msg, wparam, lparam);
		handled = TRUE;
		break;

	case AWM_KEYDOWN:
		MsgKeyDown( wnd, wparam, lparam );
		handled = TRUE;
		break;

	case AWM_DESTROY:
	case AWM_SAVE:
		MsgDestroy(wnd, msg, wparam, lparam);
		handled = TRUE;
		break;

	case AWM_TIMER:
		MsgTimer(wnd, msg, wparam, lparam);
		handled = TRUE;
		break;
	}

	return handled;
}
예제 #2
0
int
main( int ac, char *av[] )
{
	Msg_t	*pMsgList;
	StatusEnt_t	*pS;
	int		Ret = 0;
	Hash_t	*pTree;

	if( ac < 3 ) {
		usage();
		Ret = -1;
		goto err;
	}
	pMsgList	= MsgCreate( ST_MSG_SIZE, Malloc, Free );

	Ret = STFileList( av[1], pMsgList );
	if( Ret < 0 )	goto err1;

	pTree = STTreeCreate( pMsgList );

	pS = STTreeFindByPath( av[2], pTree );
	if( pS ) {
		printf("%s is found.\n", av[2] );
	} else {
		printf("%s is not found.\n", av[2] );
	}

	STTreeDestroy( pTree );
err1:
	MsgDestroy( pMsgList );
err:
	return( Ret );
}
예제 #3
0
int MGLDemoIdleProc(WND wnd, int msg, int wparam, int lparam)
{
	int bHandled=FALSE;

	switch (msg)
	{
	case AWM_CREATE:
		bHandled = TRUE;
		MsgCreate(wnd, msg, wparam, lparam);
		break;

	case AWM_RETURN:
		// Below method is not desirable, but MGL should use same window
		WinSetCurrentProc( wnd, PrvMGLMenuWindowProc );
		StaGotoState( wnd, STATE_ID_ENTRY, MSG_DESTROY, MSG_CREATE );
		//WinUpdateWindow( wnd, ERASE_BKGND );	// we use same window handle
		break;

	case AWM_DESTROY:
		bHandled = TRUE;
		MsgDestroy(wnd, msg, wparam, lparam);
		break;
	}

	return bHandled;
}
예제 #4
0
INT_PTR NoiseGateSettings::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
    switch(message)
    {
    case WM_INITDIALOG:
        MsgInitDialog();
        return TRUE;
    case WM_DESTROY:
        MsgDestroy();
        return TRUE;
    case WM_COMMAND:
        return MsgClicked(LOWORD(wParam), HIWORD(wParam), (HWND)lParam);
    case WM_VSCROLL:
    case WM_HSCROLL:
        return MsgScroll(message == WM_VSCROLL, wParam, lParam);
    case WM_TIMER:
        return MsgTimer((int)wParam);
    }
    return FALSE;
}