亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? regview.c

?? MS-Press book about programming under Windows CE with source-codes of examples
?? C
?? 第 1 頁 / 共 2 頁
字號:
//======================================================================
// RegView - WinCE registry viewer
//
// Written for the book Programming Windows CE
// Copyright (C) 1998 Douglas Boling
// 
//======================================================================
#include <windows.h>                 // For all that Windows stuff
#include <commctrl.h>                // Command bar includes
#include <commdlg.h>                 // Common dialog includes

#include "RegView.h"                 // Program-specific stuff

//----------------------------------------------------------------------
// Global data
//
const TCHAR szAppName[] = TEXT ("RegView");
HINSTANCE hInst;                     // Program instance handle

INT nDivPct = 40;                    // Divider setting between windows

// Message dispatch table for MainWindowProc
const struct decodeUINT MainMessages[] = {
    WM_CREATE, DoCreateMain,
    WM_SIZE, DoSizeMain,
    WM_COMMAND, DoCommandMain,
    WM_NOTIFY, DoNotifyMain,
    WM_DESTROY, DoDestroyMain,
};

// Command message dispatch for MainWindowProc
const struct decodeCMD MainCommandItems[] = {
    IDM_EXIT, DoMainCommandExit,
    IDM_ABOUT, DoMainCommandAbout,
};
// Notification message dispatch for MainWindowProc
const struct decodeNotify MainNotifyItems[] = {
    ID_LISTV, DoMainNotifyListV,
    ID_TREEV, DoMainNotifyTreeV,
};
//======================================================================
//
// Program entry point
//
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    LPWSTR lpCmdLine, int nCmdShow) {
    HWND hwndMain;
    MSG msg;
    int rc = 0;

    // Initialize application.
    rc = InitApp (hInstance);
    if (rc) return rc;

    // Initialize this instance.
    hwndMain = InitInstance (hInstance, lpCmdLine, nCmdShow);
    if (hwndMain == 0)
        return 0x10;

    // Application message loop
    while (GetMessage (&msg, NULL, 0, 0)) {
        TranslateMessage (&msg);
        DispatchMessage (&msg);
    }
    // Instance cleanup
    return TermInstance (hInstance, msg.wParam);
}
//----------------------------------------------------------------------
// InitApp - Application initialization
//
int InitApp (HINSTANCE hInstance) {
    WNDCLASS wc;
    INITCOMMONCONTROLSEX icex;

    // Register application main window class.
    wc.style = 0;                             // Window style
    wc.lpfnWndProc = MainWndProc;             // Callback function
    wc.cbClsExtra = 0;                        // Extra class data
    wc.cbWndExtra = 0;                        // Extra window data
    wc.hInstance = hInstance;                 // Owner handle
    wc.hIcon = NULL,                          // Application icon
    wc.hCursor = NULL;                        // Default cursor
    wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
    wc.lpszMenuName =  NULL;                  // Menu name
    wc.lpszClassName = szAppName;             // Window class name

    if (RegisterClass (&wc) == 0) return 1;

    // Load the command bar common control class.
    icex.dwSize = sizeof (INITCOMMONCONTROLSEX);
    icex.dwICC = ICC_BAR_CLASSES | ICC_TREEVIEW_CLASSES | 
                 ICC_LISTVIEW_CLASSES;
    InitCommonControlsEx (&icex);
    return 0;
}
//----------------------------------------------------------------------
// InitInstance - Instance initialization
// 
HWND InitInstance (HINSTANCE hInstance, LPWSTR lpCmdLine, int nCmdShow){
    HWND hWnd;

    // Save program instance handle in global variable.
    hInst = hInstance;

    // Create main window.
    hWnd = CreateWindow (szAppName,           // Window class
                         TEXT ("RegView"),    // Window title
                         WS_VISIBLE,          // Style flags
                         CW_USEDEFAULT,       // x position
                         CW_USEDEFAULT,       // y position
                         CW_USEDEFAULT,       // Initial width
                         CW_USEDEFAULT,       // Initial height
                         NULL,                // Parent
                         NULL,                // Menu, must be null
                         hInstance,           // Application instance
                         NULL);               // Pointer to create
                                              // parameters
    // Return fail code if window not created.
    if (!IsWindow (hWnd)) return 0;

    // Standard show and update calls
    ShowWindow (hWnd, nCmdShow);
    UpdateWindow (hWnd);
    return hWnd;
}
//----------------------------------------------------------------------
// TermInstance - Program cleanup
//
int TermInstance (HINSTANCE hInstance, int nDefRC) {
    return nDefRC;
}
//======================================================================
// Message handling procedures for MainWindow
//
//----------------------------------------------------------------------
// MainWndProc - Callback function for application window
//
LRESULT CALLBACK MainWndProc (HWND hWnd, UINT wMsg, WPARAM wParam, 
                              LPARAM lParam) {
    INT i;
    //
    // Search message list to see if we need to handle this
    // message.  If in list, call procedure.
    //
    for (i = 0; i < dim(MainMessages); i++) {
        if (wMsg == MainMessages[i].Code)
            return (*MainMessages[i].Fxn)(hWnd, wMsg, wParam, lParam);
    }
    return DefWindowProc (hWnd, wMsg, wParam, lParam);
}
//----------------------------------------------------------------------
// DoCreateMain - Process WM_CREATE message for window.
//
LRESULT DoCreateMain (HWND hWnd, UINT wMsg, WPARAM wParam, 
                      LPARAM lParam) {
    HWND hwndCB, hwndChild;
    INT  nHeight;
    RECT rect;
    LPCREATESTRUCT lpcs;

    // Convert lParam into pointer to create structure.
    lpcs = (LPCREATESTRUCT) lParam;

    // Create a minimal command bar that only has a menu and an 
    // exit button.
    hwndCB = CommandBar_Create (hInst, hWnd, IDC_CMDBAR);
    // Insert the menu.
    CommandBar_InsertMenubar (hwndCB, hInst, ID_MENU, 0);
    // Add exit button to command bar. 
    CommandBar_AddAdornments (hwndCB, 0, 0);
    nHeight = CommandBar_Height (hwndCB);

    // Create the tree view control in the left pane.
    SetRect (&rect, 0, nHeight, lpcs->cx/3, lpcs->cy - nHeight);
    hwndChild = CreateTV (hWnd, &rect);

    // Destroy frame if window not created.
    if (!IsWindow (hwndChild)) {
        DestroyWindow (hWnd);
        return 0;
    }

    // Create the list view control in right pane.
    SetRect (&rect, lpcs->cx/3, nHeight, (lpcs->cx*2)/3, 
             lpcs->cy - nHeight);
    hwndChild = CreateLV (hWnd, &rect);

    // Destroy frame if window not created.
    if (!IsWindow (hwndChild)) {
        DestroyWindow (hWnd);
        return 0;
    }
    // Insert the base keys.
    InsertTV (hWnd, NULL, TEXT ("HKEY_CLASSES_ROOT"), 
                        (LPARAM)HKEY_CLASSES_ROOT, 1);
    InsertTV (hWnd, NULL, TEXT ("HKEY_CURRENT_USER"), 
              (LPARAM)HKEY_CURRENT_USER, 1);
    InsertTV (hWnd, NULL, TEXT ("HKEY_LOCAL_MACHINE"), 
              (LPARAM)HKEY_LOCAL_MACHINE, 1);
    InsertTV (hWnd, NULL, TEXT ("HKEY_USERS"), 
              (LPARAM)HKEY_USERS, 1);
    return 0;
}
//----------------------------------------------------------------------
// DoSizeMain - Process WM_SIZE message for window.
// 
LRESULT DoSizeMain (HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam){
    HWND hwndLV, hwndTV;
    RECT rect;
    INT nDivPos;

    hwndTV = GetDlgItem (hWnd, ID_TREEV);
    hwndLV = GetDlgItem (hWnd, ID_LISTV);

    // Adjust the size of the client rect to take into account
    // the command bar height.
    GetClientRect (hWnd, &rect);
    rect.top += CommandBar_Height (GetDlgItem (hWnd, IDC_CMDBAR));

    nDivPos = ((rect.right - rect.left) * nDivPct)/100;

    SetWindowPos (hwndTV, NULL, rect.left, rect.top, 
                  nDivPos, rect.bottom - rect.top,
                  SWP_NOZORDER);

    SetWindowPos (hwndLV, NULL, nDivPos, rect.top, 
                  (rect.right - rect.left) - nDivPos, 
                  rect.bottom - rect.top, SWP_NOZORDER);
    return 0;
}
//----------------------------------------------------------------------
// DoCommandMain - Process WM_COMMAND message for window.
//
LRESULT DoCommandMain (HWND hWnd, UINT wMsg, WPARAM wParam, 
                       LPARAM lParam) {
    WORD idItem, wNotifyCode;
    HWND hwndCtl;
    INT  i;

    // Parse the parameters.
    idItem = (WORD) LOWORD (wParam);
    wNotifyCode = (WORD) HIWORD (wParam);
    hwndCtl = (HWND) lParam;

    // Call routine to handle control message.
    for (i = 0; i < dim(MainCommandItems); i++) {
        if (idItem == MainCommandItems[i].Code)
            return (*MainCommandItems[i].Fxn)(hWnd, idItem, hwndCtl, 
                                              wNotifyCode);
    }
    return 0;
}
//----------------------------------------------------------------------
// DoNotifyMain - Process WM_NOTIFY message for window.
//
LRESULT DoNotifyMain (HWND hWnd, UINT wMsg, WPARAM wParam, 
                      LPARAM lParam) {
    UINT    idItem;
    HWND    hCtl;
    LPNMHDR pHdr;
    INT     i;

    // Parse the parameters.
    idItem = wParam;
    pHdr = (LPNMHDR) lParam;
    hCtl = pHdr->hwndFrom;

    // Call routine to handle control message.
    for (i = 0; i < dim(MainNotifyItems); i++) {
        if (idItem == MainNotifyItems[i].Code)
            return (*MainNotifyItems[i].Fxn)(hWnd, idItem, hCtl, pHdr);
    }
    return 0;
}
//----------------------------------------------------------------------
// DoDestroyMain - Process WM_DESTROY message for window.
//
LRESULT DoDestroyMain (HWND hWnd, UINT wMsg, WPARAM wParam, 
                       LPARAM lParam) {
    PostQuitMessage (0);
    return 0;
}
//======================================================================
// Command handler routines
//
//----------------------------------------------------------------------
// DoMainCommandExit - Process Program Exit command.
//
LPARAM DoMainCommandExit (HWND hWnd, WORD idItem, HWND hwndCtl, 
                          WORD wNotifyCode) {

    SendMessage (hWnd, WM_CLOSE, 0, 0);
    return 0;
}
//----------------------------------------------------------------------
// DoMainCommandAbout - Process the Help | About menu command.
//
LPARAM DoMainCommandAbout(HWND hWnd, WORD idItem, HWND hwndCtl, 
                          WORD wNotifyCode) {

    // Use DialogBox to create modal dialog box.
    DialogBox (hInst, TEXT ("aboutbox"), hWnd, AboutDlgProc);
    return 0;
}
//======================================================================
// Notify handler routines
//
//----------------------------------------------------------------------
// DoMainNotifyListV - Process notify message for list view.
//
LPARAM DoMainNotifyListV (HWND hWnd, WORD idItem, HWND hwndCtl, 
                          LPNMHDR pnmh) {
    return 0;
}

//----------------------------------------------------------------------
// DoMainNotifyTreeV - Process notify message for list view.
//
LPARAM DoMainNotifyTreeV (HWND hWnd, WORD idItem, HWND hwndCtl, 
                          LPNMHDR pnmh) {

    LPNM_TREEVIEW pNotifyTV;
    TCHAR szKey[256];
    HKEY hRoot;
    HTREEITEM hChild, hNext;
    INT i;

    pNotifyTV = (LPNM_TREEVIEW) pnmh;

    switch (pnmh->code) {
        case TVN_ITEMEXPANDED:
            if (pNotifyTV->action == TVE_COLLAPSE) {
                // Delete the children so that on next open, they will
                // be re-enumerated.
                hChild = TreeView_GetChild (hwndCtl, 
                                            pNotifyTV->itemNew.hItem);
                while (hChild) {
                    hNext = TreeView_GetNextItem (hwndCtl, hChild, 
                                                  TVGN_NEXT);
                    TreeView_DeleteItem (hwndCtl, hChild);
                    hChild = hNext;
                }
            }
            break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91露脸合集magnet| 亚洲午夜久久久久中文字幕久| 欧美色视频在线| 色欧美片视频在线观看| 99久久精品免费看国产| 粗大黑人巨茎大战欧美成人| 粉嫩高潮美女一区二区三区| 成人亚洲精品久久久久软件| 国产69精品久久久久毛片 | gogogo免费视频观看亚洲一| 蜜臂av日日欢夜夜爽一区| 久久精品国产精品亚洲红杏| 国内成人精品2018免费看| 国产一区二区在线影院| 成人丝袜高跟foot| 色域天天综合网| 精品国产免费人成在线观看| 欧美特级限制片免费在线观看| 欧美日韩一级视频| 日韩三级在线观看| wwwwxxxxx欧美| 亚洲品质自拍视频网站| 亚洲成av人片在线观看| 精品亚洲成av人在线观看| 国产成人精品一区二区三区四区| 成人ar影院免费观看视频| 91毛片在线观看| 91精品国产91久久久久久最新毛片 | 久久97超碰国产精品超碰| 成人性视频免费网站| 91免费国产在线| 日韩一区二区中文字幕| 国产精品的网站| 丝袜美腿亚洲一区二区图片| 国产成人午夜视频| 欧美日韩在线不卡| 国产精品视频你懂的| 日韩国产精品久久久| av在线免费不卡| 欧美日韩一区不卡| 国产精品成人一区二区三区夜夜夜| 亚洲电影视频在线| 成人永久看片免费视频天堂| 欧美日韩1区2区| 自拍偷拍国产亚洲| 国精产品一区一区三区mba视频| 91久久免费观看| 国产欧美一区二区精品性| 日韩成人精品在线| 在线观看av一区二区| 亚洲国产精品t66y| 精品制服美女久久| 7777精品伊人久久久大香线蕉经典版下载 | 国产精品第四页| 麻豆精品在线播放| 欧美在线观看视频一区二区三区| 国产亚洲1区2区3区| 狠狠色综合播放一区二区| 欧美日韩电影在线| 亚洲综合免费观看高清在线观看| 国产精品系列在线观看| 日韩免费观看2025年上映的电影 | 国内偷窥港台综合视频在线播放| 欧美性一区二区| 亚洲激情第一区| voyeur盗摄精品| 国产日产欧美一区| 国产一区二区三区免费观看| 欧美一卡2卡三卡4卡5免费| 亚洲国产视频网站| 日本高清成人免费播放| 亚洲美女免费视频| 在线观看视频一区二区欧美日韩| 亚洲免费av网站| 日韩欧美国产系列| 美国毛片一区二区| 欧美一区日韩一区| 免费av网站大全久久| 欧美精品高清视频| 日本中文在线一区| 日韩一区二区免费高清| 日本中文一区二区三区| 日韩精品一区二区三区四区视频| 麻豆成人综合网| 精品国产sm最大网站| 国产精品一区二区三区乱码 | 99久久精品国产麻豆演员表| 国产精品欧美一区喷水| 93久久精品日日躁夜夜躁欧美| 亚洲色图制服诱惑| 欧美高清性hdvideosex| 免费成人你懂的| 久久久五月婷婷| 91视频精品在这里| 亚洲国产日韩a在线播放性色| 欧美日韩一级二级三级| 蜜臀av性久久久久蜜臀aⅴ四虎| 久久蜜桃香蕉精品一区二区三区| eeuss鲁片一区二区三区| 亚洲国产美女搞黄色| 日韩欧美一区二区在线视频| 国产一区二区三区免费播放| 亚洲视频一区二区在线观看| 精品视频全国免费看| 激情成人午夜视频| 亚洲综合在线免费观看| 精品国产一区久久| 色老汉av一区二区三区| 精品一区二区三区免费| 亚洲欧美日韩中文字幕一区二区三区| 欧美日韩高清不卡| 99麻豆久久久国产精品免费 | 一区二区三区免费在线观看| 日韩欧美国产电影| 99视频精品全部免费在线| 另类欧美日韩国产在线| 亚洲精品乱码久久久久久久久| 精品欧美一区二区三区精品久久| 91小视频免费观看| 国产在线精品免费| 日日夜夜精品视频免费| 中文字幕中文字幕一区二区| 日韩欧美国产高清| 欧美日韩www| 色94色欧美sute亚洲线路二| 国产在线看一区| 午夜久久福利影院| 亚洲视频精选在线| 久久久久久97三级| 在线成人av网站| 97久久精品人人爽人人爽蜜臀| 久久99蜜桃精品| 无码av中文一区二区三区桃花岛| 中文字幕中文字幕一区| 久久蜜臀精品av| 精品成人在线观看| 欧美va亚洲va香蕉在线| 日韩午夜在线观看视频| 欧美高清视频www夜色资源网| 一本大道av一区二区在线播放| 国产一区欧美日韩| 久久国产麻豆精品| 天天操天天干天天综合网| 尤物在线观看一区| 亚洲男人天堂一区| 亚洲柠檬福利资源导航| 亚洲美女精品一区| 亚洲激情成人在线| 久久99最新地址| 日本欧美一区二区三区| 亚洲大片免费看| 午夜精品久久久久久久久久| 一区二区三区日韩精品视频| ...xxx性欧美| 亚洲色图在线播放| 一区二区三区四区不卡在线| 亚洲精品视频一区| 亚洲国产精品视频| 天天亚洲美女在线视频| 日本午夜精品一区二区三区电影| 丝袜亚洲精品中文字幕一区| 日本午夜精品视频在线观看| 久久国内精品自在自线400部| 国产在线观看一区二区| 国产真实乱对白精彩久久| 国产成人在线视频网站| 97久久精品人人做人人爽| 欧美亚洲综合色| 日韩欧美在线影院| 国产精品美女久久久久久久| 一区二区三区在线视频免费 | 日韩国产欧美三级| 精品一区二区三区免费播放 | 欧美男同性恋视频网站| 日韩欧美亚洲国产另类| 国产欧美日韩另类视频免费观看| ...xxx性欧美| 日韩av高清在线观看| 风流少妇一区二区| 欧洲生活片亚洲生活在线观看| 欧美一区二区三区的| 久久久99久久| 亚洲大片免费看| 成人高清视频在线观看| 欧美精品三级在线观看| 国产欧美日韩另类视频免费观看| 亚洲国产一区二区a毛片| 国产又粗又猛又爽又黄91精品| 色哟哟一区二区三区| 精品久久久久一区二区国产| 一区二区在线观看av| 国产在线一区观看| 欧美色图一区二区三区| 国产欧美日韩在线| 琪琪一区二区三区| 在线精品视频一区二区| 国产三级三级三级精品8ⅰ区| 亚洲国产中文字幕| 一本色道**综合亚洲精品蜜桃冫| 欧美mv日韩mv国产网站app|