• peikj!0214
    了解作者
  • Unix_Linux
    开发工具
  • 55KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2019-05-25 17:52
    上传日期
Rebar 这个代码可以返回当前机子中的网卡的以太网地址
returns.rar
  • VC5Workspace
  • Rebar.dsw
    535B
  • Rebar.dsp
    3.9KB
  • 5Parser
  • ytab.h
    501B
  • cci.h
    2.6KB
  • ytab.c
    45.4KB
  • lex_yy.c
    28.1KB
  • Resource
  • Planets4.bmp
    1.4KB
  • Interface.bmp
    8.3KB
  • Interface Hot.bmp
    8.3KB
  • reverse.ico
    318B
  • Rebar.rc
    11.1KB
  • logon.ico
    318B
  • Computer.bmp
    7.6KB
  • Rebar.ico
    766B
  • load.ico
    318B
  • forward.ico
    318B
  • fastreverse.ico
    318B
  • background.bmp
    598B
  • Information.rtf
    18.6KB
  • appiconsm.ico
    318B
  • resource.h
    4.7KB
  • fastforward.ico
    318B
  • refresh.ico
    318B
  • logoff.ico
    318B
  • execute.ico
    318B
  • resource.hm
    166B
  • Planets.bmp
    7.6KB
  • destroy.ico
    318B
  • nRebar.c
    62.9KB
  • 4Rebar.h
    32.4KB
内容介绍
// Rebar.c : Implementation File // Control Spy: Rebar // Mark J. Finocchio (markfi), Microsoft Corporation // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. // // Copyright (c) 1998 Microsoft Corporation. All Rights Reserved. // Defines #define CSMAIN // Included files #include <windows.h> #include <windowsx.h> #include <commctrl.h> #include <richedit.h> #include <stdio.h> #include "Parser\Cci.h" #include "Rebar.h" #include "Resource\Resource.h" ///////////////////////////////////////////////////////////////////////////////////////////////////////// // ** User definable Control Implementation Code ///////////////////////////////////////////////////////////////////////////////////////////////////////// // User global variables HIMAGELIST g_hImageList = NULL; // Value returned by 'imagelist' keyword in parser HBITMAP g_hBitmap = NULL; // Value returned by 'bitmap' keyword in parser HWND g_hTooltip = NULL; // Value returned by 'tooltip' keyword in parser HPALETTE g_hPalette = NULL; // Value returned by 'palette' keyword in parser HWND g_hCustom = NULL; // Value returned by 'custom' keyword in parser // Rebar child control variables HWND g_hToolbar = NULL; // Value returned by 'toolbar' keyword in parser HIMAGELIST g_hToolbarIL = NULL; HIMAGELIST g_hToolbarHotIL = NULL; HWND g_hComboBoxEx = NULL; // Value returned by 'comboboxex' keyword in parser HIMAGELIST g_hComboBoxExIL = NULL; // Name: InitialControlStyles // Description: Control styles used upon initial creation // Parameters: Pointer to styles and extended styles // Returns: none void InitialControlStyles(LPDWORD p_pStyles,LPDWORD p_pExStyles) { *p_pStyles = WS_CHILD|WS_VISIBLE|WS_BORDER|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|RBS_VARHEIGHT|RBS_BANDBORDERS|RBS_VARHEIGHT; *p_pExStyles = 0; } // Name: ControlStateCallback // Description: Control state callback for user code // Parameters: State, can be CSPY_STARTUP, CSPY_SHUTDOWN, or user numeric state value provided // through interface // Returns: none void ControlStateCallback(INT p_dState) { // Customizable code placed here // Control handle is g_hControl // Parent handle is g_hContainer // Main Dialog handle is g_hDialog // Instance handle is g_hInstance switch(p_dState) { case 0: // Numeric state generated via interface break; case CSPY_STARTUP: // Control just created { REBARBANDINFO rbbInfo; TBBUTTON tbbStruct[10]; UINT dImages[] = { 0,-1,1,2,3,-1,4,-1,5,6 }; COMBOBOXEXITEM cbeItem; LPSTR pLabels[] = { "Desktop","Network","3� Floppy (A:)","HDD (C:)","Control Spy","CDROM (D:)","Printers","Control Panel","Network","Recycle Bin" }; UINT dIndent[] = { 0,1,2,2,3,2,2,2,1,1 }; RECT rectControl; HDC hDC; HBITMAP hBitmap; int dX; // TOOLBAR child g_hToolbar = CreateWindowEx(0,TOOLBARCLASSNAME,NULL,WS_VISIBLE|WS_CHILD|TBSTYLE_FLAT|TBSTYLE_TRANSPARENT|CCS_NORESIZE|CCS_NODIVIDER, 0,0,0,0,g_hControl,NULL,g_hInstance,NULL); // Since created toolbar with CreateWindowEx, specify the button structure size // This step is not required if CreateToolbarEx was used SendMessage(g_hToolbar,TB_BUTTONSTRUCTSIZE,sizeof(TBBUTTON),0); // Create and initialize image list used for child toolbar g_hToolbarIL = ImageList_Create(20,20,ILC_COLORDDB|ILC_MASK,7,1); hBitmap = LoadBitmap(g_hInstance,MAKEINTRESOURCE(IDB_INTERFACE)); ImageList_AddMasked(g_hToolbarIL,hBitmap,RGB(255,0,255)); DeleteObject(hBitmap); // Create and initialize hot image list used for child toolbar g_hToolbarHotIL = ImageList_Create(20,20,ILC_COLORDDB|ILC_MASK,7,1); hBitmap = LoadBitmap(g_hInstance,MAKEINTRESOURCE(IDB_INTERFACEHOT)); ImageList_AddMasked(g_hToolbarHotIL,hBitmap,RGB(255,0,255)); DeleteObject(hBitmap); // Add image lists to toolbar SendMessage(g_hToolbar,TB_SETIMAGELIST,0,(LPARAM)g_hToolbarIL); SendMessage(g_hToolbar,TB_SETHOTIMAGELIST,0,(LPARAM)g_hToolbarHotIL); // Set toolbar padding SendMessage(g_hToolbar,TB_SETINDENT,2,0); // Add buttons to control for(dX=0;dX<10;dX++) { // Add button if(dImages[dX] != -1) { tbbStruct[dX].iBitmap = dImages[dX]; tbbStruct[dX].fsStyle = TBSTYLE_BUTTON; } else { tbbStruct[dX].iBitmap = 0; tbbStruct[dX].fsStyle = TBSTYLE_SEP; } tbbStruct[dX].fsState = TBSTATE_ENABLED; tbbStruct[dX].idCommand = dX; tbbStruct[dX].dwData = 0; tbbStruct[dX].iString = -1; } SendMessage(g_hToolbar,TB_ADDBUTTONS,10,(LPARAM)tbbStruct); // Add Rebar band rbbInfo.cbSize = sizeof(REBARBANDINFO); rbbInfo.fMask = RBBIM_STYLE|RBBIM_CHILD|RBBIM_CHILDSIZE|RBBIM_SIZE; rbbInfo.fStyle = RBBS_GRIPPERALWAYS|RBBS_CHILDEDGE; rbbInfo.hwndChild = g_hToolbar; rbbInfo.cxMinChild = 0; rbbInfo.cyMinChild = HIWORD(SendMessage(g_hToolbar,TB_GETBUTTONSIZE,0,0)); rbbInfo.cx = 200; SendMessage(g_hControl,RB_INSERTBAND,-1,(LPARAM)&rbbInfo); // COMBOBOXEX g_hComboBoxEx = CreateWindowEx(0,WC_COMBOBOXEX,NULL,WS_CHILD|WS_VISIBLE|CBS_DROPDOWNLIST, 0,0,300,150,g_hControl,NULL,g_hInstance,NULL); // Create and initialize image list used for child ComboBoxEx g_hComboBoxExIL = ImageList_Create(16,16,ILC_COLORDDB|ILC_MASK,10,1); hBitmap = LoadBitmap(g_hInstance,MAKEINTRESOURCE(IDB_COMPUTER)); ImageList_AddMasked(g_hComboBoxExIL,hBitmap,RGB(255,0,255)); DeleteObject(hBitmap); // Assign image list to control SendMessage(g_hComboBoxEx,CBEM_SETIMAGELIST,0,(LPARAM)g_hComboBoxExIL); // Add items to control for(dX=0;dX<10;dX++) { cbeItem.mask = CBEIF_IMAGE|CBEIF_SELECTEDIMAGE|CBEIF_TEXT|CBEIF_INDENT; cbeItem.iItem = -1; cbeItem.pszText = pLabels[dX]; cbeItem.cchTextMax = strlen(pLabels[dX]); cbeItem.iImage = dX; cbeItem.iSelectedImage = dX; cbeItem.iIndent = dIndent[dX]; SendMessage(g_hComboBoxEx,CBEM_INSERTITEM,0,(LPARAM)&cbeItem); } // Select first item SendMessage(g_hComboBoxEx,CB_SETCURSEL,4,0); // Add Rebar band rbbInfo.cbSize = sizeof(REBARBANDINFO); rbbInfo.fMask = RBBIM_STYLE|RBBIM_CHILD|RBBIM_TEXT|RBBIM_CHILDSIZE|RBBIM_SIZE; rbbInfo.fStyle = RBBS_GRIPPERALWAYS|RBBS_CHILDEDGE; rbbInfo.hwndChild = g_hComboBoxEx; GetWindowRect(g_hComboBoxEx,&rectControl); rbbInfo.cxMinChild = 0; rbbInfo.cyMinChild = rectControl.bottom-rectControl.top; rbbInfo.lpText = "Address"; rbbInfo.cx = 200; SendMessage(g_hControl,RB_INSERTBAND,-1,(LPARAM)&rbbInfo); // Set size and let bands rearrange rectControl.left = rectControl.top = 0; rectControl.right = 200; rectControl.bottom = 85; SendMessage(g_hControl,RB_SIZETORECT,0,(LPARAM)&rectControl); // Create and initialize image list used, returned via 'imagelist' g_hImageList = ImageList_Create(16,16,ILC_COLORDDB|ILC_MASK,10,1); // Load images based on color depth hDC = GetDC(g_hDialog); if(GetDeviceCaps(hDC,BITSPIXEL) <= 8) hBitmap = LoadBitmap(g_hInstance,MAKEINTRESOURCE(IDB_PLANETS4)); else hBitmap = LoadBitmap(g_hInstance,MAKEINTRESOURCE(IDB_PLANETS)); ReleaseDC(g_hDialog,hDC); // Add images to image list ImageList_AddMasked(g_hImageList,hBitmap,RGB(0,255,255)); DeleteObject(hBitmap); // Load bitmap for use of control, returned via 'bitmap' g_hBitmap = LoadBitmap(g_hInstance,MAKEINTRESOURCE(IDB_BACKGROUND)); // Get associated tooltip control, returned via 'tooltip' g_hTooltip = (HWND)SendMessage(g_hControl,RB_GETTOOLTIPS,0,0); // Get associated palette, returned via 'palette' g_hPalette = (HPALETTE)SendMessag
评论
    相关推荐
    • 3DES加密算法源代码.rar
      DES加密源代码,用3DES加密算法。 加密强度高,到目前为止,还无人能够破解!
    • crc.zip
      CRC校验程序,使用了CRC-16和CRC-CCITT方法
    • rsa1.03.zip
      rsa算法实现,包含文档
    • fast-des3.0.tar.z
      des算法实现源码
    • des3_win32_vc.zip
      一个3des算法的库文件和使用库文件的例子
    • dcpcrypt.zip
      Delphi加密控件源码,包括对称钥匙加密控件和散列函数控件
    • rc.zip
      含有rc2、rc4、rc5、rc6算法的rc算法集合
    • oicqpass.zip
      读取OICQ用户保存在本地机器上的密码
    • elgamal.zip
      另一种公开密钥加密算法的Pascal实现和例子。实现了签名和确认
    • linuxscanners.zip
      linux下的端口扫描器