代码拉取完成,页面将自动刷新
同步操作将从 leegoobin/AutoPHS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// DlgListBox.cpp : implementation file
//
#include "stdafx.h"
#include "autophs.h"
#include "DlgListBox.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgListBox
CDlgListBox::CDlgListBox()
{
m_bkColor=-1;
}
CDlgListBox::~CDlgListBox()
{
}
BEGIN_MESSAGE_MAP(CDlgListBox, CListBox)
//{{AFX_MSG_MAP(CDlgListBox)
ON_WM_RBUTTONUP()
ON_WM_RBUTTONDOWN()
ON_WM_CTLCOLOR_REFLECT()
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgListBox message handlers
void CDlgListBox::OnRButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CListBox::OnRButtonUp(nFlags, point);
}
void CDlgListBox::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CPoint po=point;
CListBox::OnRButtonDown(nFlags, point);
CWnd* pWnd=this->GetParent();
if(pWnd!=NULL && IsWindow(pWnd->m_hWnd))
{
this->ClientToScreen(&po);
pWnd->ScreenToClient(&po);
DWORD lp;
lp=po.x | po.y<<16;
pWnd->SendMessage(WM_RBUTTONUP,0,lp);
}
}
void CDlgListBox::GetText(int ix, CString &rString)
{
if(ix > this->GetCount()-1)
{
rString="";
return ;
}
CListBox::GetText(ix,rString);
}
int CDlgListBox::GetText(int ix, LPTSTR lpszBuffer)
{
if(ix > this->GetCount()-1)
{
return LB_ERR;
}
return (int)CListBox::GetText(ix,lpszBuffer);
}
void CDlgListBox::SetBkColor(DWORD color)
{
m_bkColor=color;
m_bkBr.DeleteObject();
LOGBRUSH logBr;
logBr.lbStyle=BS_SOLID;
logBr.lbColor=m_bkColor;
m_bkBr.CreateBrushIndirect(&logBr);
this->Invalidate();
}
HBRUSH CDlgListBox::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
// TODO: Return a non-NULL brush if the parent's handler should not be called
if(m_bkColor==-1)
return NULL;
if(/*nCtlColor==CTLCOLOR_STATIC && */pDC!=NULL)
{
pDC->SetBkMode(TRANSPARENT);
//return NULL;
}
return (HBRUSH)m_bkBr;
}
int CDlgListBox::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CListBox::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。