示例#1
0
/********************************************************************************************

>	BOOL TipsDlg::OnInitDialog()

	Author:		Colin_Barfoot (Xara Group Ltd) <*****@*****.**>
	Created:	03/08/96
	Returns:	FALSE if initialisation failed
	Purpose:	Initializes this TipsDlg ready for display

********************************************************************************************/
BOOL TipsDlg::OnInitDialog()
{
	// If Tips file does not exist then disable NextTip
	if (!m_bTipOK)
	{
		EnableGadget(_R(IDC_NEXTTIP), FALSE);

	}
	// Check there's more help & disable the more button if there isn't
	HelpID helpID = GetTipHelpID();
	if (helpID == 0)
	{
		EnableGadget(_R(IDC_MORE), FALSE);
	}
	else
	{
		EnableGadget(_R(IDC_MORE), TRUE);
	}		

	// Tip should be some error message if not OK
	DrawTipString();

	SetBoolGadgetSelected(_R(IDC_STARTUP), g_bStartUp);

	return TRUE;
}
示例#2
0
/********************************************************************************************

>	void TipsDlg::OnMoreHelp()

	Author:		Colin_Barfoot (Xara Group Ltd) <*****@*****.**>
	Created:	03/08/96
	Returns:	A MsgResult determining how the message handler should continue processing
	Purpose:	Responds to a user's request for more help for a tip by invoking the on-line
				help.

********************************************************************************************/
void TipsDlg::OnMoreHelp()
{
	HelpID helpID = GetTipHelpID();
	if (helpID > 0)				// Invoke the help system
	{
		HelpUserTopic(helpID);
	}
	else
	{
		GetTipString(_R(IDS_SORRY_NO_HELP));
		DrawTipString();
	}
}
示例#3
0
/********************************************************************************************

>	void TipsDlg::OnNextTip()

	Author:		Colin_Barfoot (Xara Group Ltd) <*****@*****.**>
	Created:	03/08/96
	Purpose:	Responds to a user's request for the Next Tip by displaying it.

********************************************************************************************/
void TipsDlg::OnNextTip()
{
	GetNextTipString();

	// Check there's more help & disable the more button if there isn't
	HelpID helpID = GetTipHelpID();
	if (helpID == 0)
	{
		EnableGadget(_R(IDC_MORE), FALSE);
	}
	else
	{
		EnableGadget(_R(IDC_MORE), TRUE);
	}		

	DrawTipString();
}
示例#4
0
void CScreenSpyDlg::OnPaint()
{
	CPaintDC dc(this); 

	if (m_bIsFirst)
	{
		DrawTipString("请等待...........");
		return;
	}
	
	//将桌面设备缓冲区复制到我们的内存缓冲区,这个就是抓图。
	//将内存缓冲区复制到设备缓冲区就是显示图了。
	BitBlt
		(
		m_hDC,
		0,
		0,
		m_lpbmi->bmiHeader.biWidth, 
		m_lpbmi->bmiHeader.biHeight,
		m_hMemDC,
		m_HScrollPos,
		m_VScrollPos,
		SRCCOPY
		);

	
	//这里画一下鼠标的图像
	if (m_bIsTraceCursor)
		DrawIconEx(
		m_hDC,								
		m_RemoteCursorPos.x - ((int) m_dwCursor_xHotspot) - m_HScrollPos, 
		m_RemoteCursorPos.y - ((int) m_dwCursor_yHotspot) - m_VScrollPos,
		m_CursorInfo.getCursorHandle(m_bCursorIndex == (BYTE)-1 ? 1 : m_bCursorIndex),	// handle to icon to draw 
		0,0,										
		0,										
		NULL,									
		DI_NORMAL | DI_COMPAT					
		);
	
}
示例#5
0
void CScreenSpyDlg::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	if (m_bIsFirst)
	{
		DrawTipString("Please wait - initial screen loading");
		return;
	}

	BitBlt
		(
		m_hDC,
		0,
		0,
		m_lpbmi->bmiHeader.biWidth, 
		m_lpbmi->bmiHeader.biHeight,
		m_hMemDC,
		m_HScrollPos,
		m_VScrollPos,
		SRCCOPY
		);

	// (BYTE)-1 = 255;
	// Draw the cursor
	if (m_bIsTraceCursor)
		DrawIconEx(
			m_hDC,									// handle to device context 
			m_RemoteCursorPos.x - ((int) m_dwCursor_xHotspot) - m_HScrollPos, 
			m_RemoteCursorPos.y - ((int) m_dwCursor_yHotspot) - m_VScrollPos,
			m_CursorInfo.getCursorHandle(m_bCursorIndex == (BYTE)-1 ? 1 : m_bCursorIndex),	// handle to icon to draw 
			0,0,										// width of the icon 
			0,											// index of frame in animated cursor 
			NULL,										// handle to background brush 
			DI_NORMAL | DI_COMPAT						// icon-drawing flags 
			);
	// Do not call CDialog::OnPaint() for painting messages
}
示例#6
0
void CScreenSpyDlg::OnPaint()
{
	CPaintDC dc(this); // device context for painting
	// TODO: 在此处添加消息处理程序代码
	// 不为绘图消息调用 CDialog::OnPaint()



	if (m_bIsFirst)
	{
		DrawTipString("请等待...........");
		return;
	}


	BitBlt(m_hFullDC,0,0,
		m_BitmapInfor_Full->bmiHeader.biWidth, 
		m_BitmapInfor_Full->bmiHeader.biHeight,
		m_hFullMemDC,
		m_ulHScrollPos,
		m_ulVScrollPos,
		SRCCOPY
		);


	if (m_bIsTraceCursor)
		DrawIconEx(
		m_hFullDC,								
		m_ClientCursorPos.x  - m_ulHScrollPos, 
		m_ClientCursorPos.y  - m_ulVScrollPos,
		m_hIcon,
		//m_CursorInfo.getCursorHandle(m_bCursorIndex == (BYTE)0 ? 1 : m_bCursorIndex),	// handle to icon to draw 
		0,0,										
		0,										
		NULL,									
		DI_NORMAL | DI_COMPAT					
		);
}