18,356
社区成员
发帖
与我相关
我的任务
分享
BOOL CXXXDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
DWORD dwstyle=GetWindowLong(m_ctrList.GetSafeHwnd(),GWL_STYLE);
dwstyle&=~LVS_TYPEMASK;
dwstyle|=LVS_REPORT;
SetWindowLong(m_ctrList.GetSafeHwnd(),GWL_STYLE,dwstyle);
m_ctrList.InsertColumn(0,"Êý¾Ý",LVCFMT_LEFT,525);
m_ctrList.InsertColumn(0,"´óС",LVCFMT_LEFT,80);
m_ctrList.InsertColumn(0,"Ä¿µÄ¶Ë¿Ú",LVCFMT_LEFT,40);
m_ctrList.InsertColumn(0,"Ä¿µÄIPµØÖ·",LVCFMT_LEFT,100);
m_ctrList.InsertColumn(0,"Ô´¶Ë¿Ú",LVCFMT_LEFT,40);
m_ctrList.InsertColumn(0,"Ô´IPµØÖ·",LVCFMT_LEFT,100);
m_ctrList.InsertColumn(0,"ÐÒé",LVCFMT_LEFT,50);
::SendMessage(m_ctrList.m_hWnd,LVM_SETEXTENDEDLISTVIEWSTYLE,LVS_EX_FULLROWSELECT,LVS_EX_FULLROWSELECT);
return TRUE; // return TRUE unless you set the focus to a control
}