Example #1
0
/**
*  \author Dave Sheppard (DS)
*  \author Darryn Campbell (DCC, JRQ768)
*  \date March 2005 (First Created, DS)
*  \date November 2009 (Converted from static to non-static.  Made Compatible
*                       with PocketBrowser 3.0)
*/
bool CSIP::MoveSip(int x, int y)
{
	int iTemp;
	SIPINFO sipinfo;
	memset(&sipinfo, 0, sizeof(SIPINFO));
	sipinfo.cbSize = sizeof(SIPINFO);
	sipinfo.dwImDataSize = 0;

	SipGetInfo(&sipinfo);
	
	if (!hSipWnd)
		return false;

	GetWindowRect(hSipWnd, &m_rcPosition);

	// Only alter the x value if not -9999
	if (x != -9999) {
		iTemp = m_rcPosition.right - m_rcPosition.left;
		m_rcPosition.left = x;
		m_rcPosition.right = m_rcPosition.left + iTemp;
	}
	
	// Only alter the y value if not -9999
	if (y != -9999) {
		iTemp = m_rcPosition.bottom - m_rcPosition.top;
		m_rcPosition.top = y;
		m_rcPosition.bottom = m_rcPosition.top + iTemp;
	}

	if (hSipWnd) 
		MoveWindow(hSipWnd, m_rcPosition.left, m_rcPosition.top, m_rcPosition.right-m_rcPosition.left, m_rcPosition.bottom-m_rcPosition.top, TRUE);
	

	else 
		return false;

	sipinfo.rcSipRect = m_rcPosition;

	SipSetInfo(&sipinfo);

	return true;
}
Example #2
0
/* Raise the software input panel.  */
static void
raise_sip (HWND dlg)
{
#ifdef HAVE_W32CE_SYSTEM
    SIPINFO si;

    SetForegroundWindow (dlg);

    memset (&si, 0, sizeof si);
    si.cbSize = sizeof si;

    if (SipGetInfo (&si))
    {
        si.fdwFlags |= SIPF_ON;
        SipSetInfo (&si);
    }
#else
    (void)dlg;
#endif
}