⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filetransferkitview.cpp

📁 IC卡读写 IC卡读写 IC卡读写
💻 CPP
字号:
// FileTransferKitView.cpp : implementation of the CFileTransferKitView class
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "resource.h"

#include "FileTransferKitView.h"

BOOL CFileTransferKitView::PreTranslateMessage(MSG* pMsg)
{
	pMsg;
	return FALSE;
}

/**
  Create a special log view
  @param[in] parent Parent window.
  @param[in] rect Rectangle of the window.
  @return My HWND.
 */
HWND CFileTransferKitView::Create(HWND parent, const ATL::_U_RECT & rect)
{
    if (Base::Create(parent, rect, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER, WS_EX_CLIENTEDGE))
    {
        CRect rect;
        GetClientRect(rect);

        SetExtendedListViewStyle(LVS_EX_DOUBLEBUFFER | LVS_EX_FULLROWSELECT);
        InsertColumn(0, _T(""), LVCFMT_LEFT, IconWidth);
        InsertColumn(1, _T("Type"), LVCFMT_LEFT, TypeWidth);
        InsertColumn(2, _T("Log"), LVCFMT_LEFT, rect.Width() - IconWidth - TypeWidth);

        return m_hWnd;
    }
    else
    {
        return NULL;
    }
}

/**
  Add transfer log.
  @param[in] log Transfer log.
 */
void CFileTransferKitView::AddTransferLog(const TransferLog & log)
{
    static LPTSTR type[] = {
        _T("Info :"),
        _T("Error :"),
        _T("C to S :"),
        _T("S to C :")
    };
    int count = GetItemCount();
    InsertItem(count, _T(""));
    SetItemText(count, 1, type[log.Type()]);
    SetItemText(count, 2, log.Text());
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -