Ejemplo n.º 1
0
BOOL CTravelTab::OnInitDialog() 
{
	m_dcPropertyPage = Main->m_pcppTravelTab;
	if(m_bModifyDlgStylesAndPos == false)
		m_dcDialogPage = new CTravelTab;
	Main->m_pcppTravelTab->m_dcCurrentPage = this;

	CDockingPage::OnInitDialog();

	// Set up the travel map window
	int X, Y, M, w, h, zoom;
	X = Main->GetRegistryDword("TravelTab Center X", 3077);
	Y = Main->GetRegistryDword("TravelTab Center Y", 2048);
	M = Main->GetRegistryDword("TravelTab MapPlane", 0);
	zoom = Main->GetRegistryDword("TravelTab Zoom", (DWORD)-2);
	CString csMap;
	csMap.Format("%d", M);
	m_TravelMap.SetZoomLevel((short) zoom);
	WORD wFlags = 0;
	if ( Main->m_dwDrawStatics )
		wFlags |= 0x01;
	if ( Main->m_dwDrawDifs )
		wFlags |= 0x02;
	m_TravelMap.SetDrawFlags(wFlags);
	m_ceMapPlane.SetWindowText(csMap);

	w = m_TravelMap.GetWidth();
	h = m_TravelMap.GetHeight();
	m_csbXScroll.SetScrollRange(0, w);
	m_csbXScroll.SetScrollPos(X);
	m_csbYScroll.SetScrollRange(0, h);
	m_csbYScroll.SetScrollPos(Y);
	xtempscroll = 0;
	ytempscroll = 0;

	Recenter((short) X, (short) Y);
	FillCategoryTree();
	this->m_clcLocations.InsertColumn(0, "Description", LVCFMT_LEFT, 160, -1);
	this->m_clcLocations.InsertColumn(1, "Coordinates", LVCFMT_LEFT, 120, -1);
	m_iCurState = m_clcLocations.GetView();

	cb_world.InitButton(IDI_WORLD,CMsg("IDS_WORLDMAP"));
	cb_world.SetBGColor(Main->crAxisBkg);
	cb_zoomin.InitButton(IDI_ZOOMIN,CMsg("IDS_ZOOMIN"));
	cb_zoomin.SetBGColor(Main->crAxisBkg);
	cb_zoomout.InitButton(IDI_ZOOMOUT,CMsg("IDS_ZOOMOUT"));
	cb_zoomout.SetBGColor(Main->crAxisBkg);
	cb_findarea.InitButton(IDI_FIND,CMsg("IDS_FINDAREA"));
	cb_findarea.SetBGColor(Main->crAxisBkg);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Ejemplo n.º 2
0
CMsg CMsgObjectInfo::Execute( CMsg &x_rMsg )
{
    // Lock the handler list
    CTlLocalLock ll( m_lockMsgHandlers );
    if ( !ll.IsLocked() )
        return CMsg();

    // See if we have a destination for this address
    CMsgTarget mt = m_lstMsgHandlers[ x_rMsg.Mi().Dst()->GetId() ];
    if ( !mt.IsValid() )
        return CMsg();

    return mt( x_rMsg );
}
Ejemplo n.º 3
0
CAxisLog::~CAxisLog()
{
	// Close the file
	Add(1,CMsg("IDS_SHUTDOWN"));
	if ( m_pLog != NULL )
		fclose(m_pLog);
}
Ejemplo n.º 4
0
CTravelTab::CTravelTab() : CDockingPage(CTravelTab::IDD,CMsg("IDS_TRAVEL"))
{
	//{{AFX_DATA_INIT(CTravelTab)
	m_iCatSeq = 0;
	m_bTrack = FALSE;
	//}}AFX_DATA_INIT
}
Ejemplo n.º 5
0
BOOL CLauncherTab::OnInitDialog() 
{
	SetWindowText(CMsg(_T("IDS_LAUNCHER")));
	CDialogPage::OnInitDialog();

	return TRUE;
}
Ejemplo n.º 6
0
/// Routes the message to a remote or local destination
CMsg CMsgObjectInfo::Send( CMsg &x_rMsg )
{
    // Sanity check
    if ( !x_rMsg.IsValid() )
        return CMsg();

    // Can't be routed without an id
    if ( guid::CmpGuid( &IID_ZEROS, &x_rMsg.Mi().Dst()->GetId() ) )
        return CMsg();

    // Set our id in the return address
    x_rMsg.Mi().Src()->SetInstance( &m_guidId );

    // Is it for us?
    if ( guid::CmpGuid( &IID_ZEROS, &x_rMsg.Mi().Dst()->GetInstance() )
         || guid::CmpGuid( &m_guidId, &x_rMsg.Mi().Dst()->GetInstance() ) )
    {   
        // Short circuit the reply queue if needed
        if ( x_rMsg.Mi().WantReply() )
        {
            // Create reply signal
            x_rMsg.EnableReplyEvent( oexTRUE );

            // Set direct reply flag
            x_rMsg.SetDirectReply( oexTRUE );

        } // end if

        // Receive the message
        Recv( x_rMsg );
        
        return x_rMsg;

    } // end if

    // Send through the network
    return oexNet.Send( x_rMsg );
}