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

📄 apipage.cpp

📁 Windows 图形编程 书籍
💻 CPP
字号:
//-----------------------------------------------------------------------------------//
//              Windows Graphics Programming: Win32 GDI and DirectDraw               //
//                             ISBN  0-13-086985-6                                   //
//                                                                                   //
//  Written            by  Yuan, Feng                             www.fengyuan.com   //
//  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
//  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
//                                                                                   //
//  FileName   : apipage.cpp			                                             //
//  Description: KApiPage class                                                      //
//  Version    : 1.00.000, May 31, 2000                                              //
//-----------------------------------------------------------------------------------//

#define NOCRYPT

#include <windows.h>
#include <commctrl.h>
#include <assert.h>
#include <stdio.h>
#include <tchar.h>

#include "..\..\include\win.h"
#include "..\..\include\listview.h"
#include "..\..\include\property.h"

#include "..\Diver\Report.h"

#include "Resource.h"
#include "ApiTable.h"
#include "ApiPage.h"


KApiTable ApiTable;


BOOL KApiPage::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {
		case WM_INITDIALOG:
			m_hWnd    = hWnd;

            List.FromDlgItem(hWnd, IDC_LIST);
                
            List.AddIcon(LVSIL_SMALL,  hInst, IDI_API);
            List.AddIcon(LVSIL_SMALL,  hInst, IDI_COM);
			List.AddIcon(LVSIL_SMALL,  hInst, IDI_SYSCALL);

            List.AddColumn(0,  80, _T("Class"));
            List.AddColumn(1,  80, _T("Interface"));
            List.AddColumn(2, 200, _T("Function"));
			List.AddColumn(3,  80, _T("SysCall"));

            if (ApiTable.AddTargets(hInst, GetDlgItem(hWnd, IDC_TARGET)) )
            {
                SendDlgItemMessage(hWnd, IDC_TARGET, CB_SETCURSEL, 0, 0);
                ApiTable.Add2ListView(List);
            }
                                
            return TRUE;

        case WM_COMMAND:
            if ( wParam==MAKEWPARAM(IDC_TARGET, CBN_SELCHANGE) )
            {
                if (ApiTable.Initialize(hInst, SendDlgItemMessage(hWnd, IDC_TARGET, CB_GETCURSEL, 0, 0)))
                    ApiTable.Add2ListView(List);

                return TRUE;
            }
    }
        
    return FALSE;
}


⌨️ 快捷键说明

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