• Walqer
    了解作者
  • C++
    开发工具
  • 42KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2019-05-25 00:53
    上传日期
Flat Scroll Bar 这个代码可以返回当前机子中的网卡的以太网地址
18747679.rar
  • Resource
  • appiconsm.ico
    318B
  • forward.ico
    318B
  • fastreverse.ico
    318B
  • execute.ico
    318B
  • fastforward.ico
    318B
  • reverse.ico
    318B
  • destroy.ico
    318B
  • Flat Scroll Bar.ico
    766B
  • Flat Scroll Bar.rc
    10.5KB
  • Information.rtf
    3.1KB
  • logon.ico
    318B
  • logoff.ico
    318B
  • resource.h
    4.5KB
  • refresh.ico
    318B
  • resource.hm
    166B
  • load.ico
    318B
  • EParser
  • lex_yy.c
    24.2KB
  • cci.h
    3KB
  • ytab.h
    418B
  • ytab.c
    37.1KB
  • VC5Workspace
  • Flat Scroll Bar.dsp
    4KB
  • Flat Scroll Bar.dsw
    555B
  • CFlat Scoll Bar.c
    59.9KB
  • 3Flat Scroll Bar.h
    28.9KB
内容介绍
// Flat Scroll Bar.c : Implementation File // Control Spy: Flat Scroll Bar // 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 "Flat Scroll Bar.h" #include "Resource\Resource.h" ///////////////////////////////////////////////////////////////////////////////////////////////////////// // ** User definable Control Implementation Code ///////////////////////////////////////////////////////////////////////////////////////////////////////// // User global variables HPALETTE g_hPalette = NULL; // Value returned by 'palette' in parser // 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 = 0; *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 // 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 { SCROLLINFO siBar; // Initialize scroll bars InitializeFlatSB(g_hContainer); FlatSB_ShowScrollBar(g_hContainer,SB_BOTH,TRUE); siBar.cbSize = sizeof(SCROLLINFO); siBar.fMask = SIF_PAGE; siBar.nPage = 32; FlatSB_SetScrollInfo(g_hContainer,SB_HORZ,&siBar,TRUE); FlatSB_SetScrollInfo(g_hContainer,SB_VERT,&siBar,TRUE); } break; case CSPY_SHUTDOWN: // Control spy closing break; } } // Name: ProcessControlNotification // Description: Handles all notification messages from the contol, callbacks handled here // Parameters: Notification message structure // Returns: Result LRESULT ProcessControlNotification(LPNMHDR p_pNotifyStruct) { // Custom control notification messages handled here // Parent handle is g_hContainer // Main Dialog handle is g_hDialog // Instance handle is g_hInstance // Return return 0; } // Name: ProcessControlCommand // Description: Handles all command messages from the contol, callbacks handled here // Parameters: Command notification code // Returns: Result LRESULT ProcessControlCommand(WORD p_wCode) { // Parent handle is g_hContainer // Main Dialog handle is g_hDialog // Instance handle is g_hInstance // Return return 0; } // Name: ProcessWindowMessage // Description: Handles all window messages sent to container as a direct result of the // contol, callbacks handled here // Parameters: Message, wParam, lParam // Returns: Result LRESULT ProcessWindowMessage(UINT p_iMsg,WPARAM p_wParam,LPARAM p_lParam) { // Parent handle is g_hContainer // Main Dialog handle is g_hDialog // Instance handle is g_hInstance switch(p_iMsg) { case WM_HSCROLL: // Horizontal scroll event case WM_VSCROLL: // Vertical scroll event { int dBar; // Determine which scroll bar dBar = (p_iMsg==WM_HSCROLL)?SB_HORZ:SB_VERT; // Set position switch(LOWORD(p_wParam)) { case SB_THUMBPOSITION: case SB_THUMBTRACK: FlatSB_SetScrollPos(g_hContainer,dBar,HIWORD(p_wParam),TRUE); break; case SB_LINEUP: FlatSB_SetScrollPos(g_hContainer,dBar,FlatSB_GetScrollPos(g_hContainer,dBar)-2,TRUE); break; case SB_LINEDOWN: FlatSB_SetScrollPos(g_hContainer,dBar,FlatSB_GetScrollPos(g_hContainer,dBar)+2,TRUE); break; case SB_PAGEUP: FlatSB_SetScrollPos(g_hContainer,dBar,FlatSB_GetScrollPos(g_hContainer,dBar)-32,TRUE); break; case SB_PAGEDOWN: FlatSB_SetScrollPos(g_hContainer,dBar,FlatSB_GetScrollPos(g_hContainer,dBar)+32,TRUE); break; } break; } } // Return return 0; } // Name: RegisterControl // Description: Used to register the control so it may be created // Parameters: none // Returns: none void RegisterControl() { INITCOMMONCONTROLSEX icc; // Initialize common controls structure icc.dwSize = sizeof(INITCOMMONCONTROLSEX); icc.dwICC = ICC_BAR_CLASSES; // Initialize common control InitCommonControlsEx(&icc); } ///////////////////////////////////////////////////////////////////////////////////////////////////////// // ** Background Logic Code ///////////////////////////////////////////////////////////////////////////////////////////////////////// // Name: WinMain // Description: Main entry point // Parameters: Application instance, previous instance, command line, show command // Returns: Return code int WINAPI WinMain(HINSTANCE p_hInstance,HINSTANCE p_hPrevInstance,PSTR p_szCmdLine,int p_iCmdShow) { RegisterControl(); // Make instance handle available to all functions g_hInstance = p_hInstance; // Initialize global variables g_dLastNotifyIndex = -1; g_dLastMessageIndex = -1; g_dLastSendMessageIndex = -1; g_dLastStylesIndex = -1; g_dLastExStylesIndex = -1; g_hStyles = NULL; g_hInformation = NULL; g_hControl = NULL; g_cFilter = '\0'; g_dSLCurrent = -1; g_dSLCount = 0; g_pSL = NULL; g_pSLIndex = NULL; g_bSendAll = FALSE; g_bLogging = FALSE; g_hLogOn = NULL; g_hLogOff = NULL; // Main application dialog return DialogBox(p_hInstance,MAKEINTRESOURCE(IDD_MAINDIALOG),NULL,DlgProc); } // Name: CreateControl // Description: Creates and initializes the control on the specified window. // Parameters: Creation styles, extended styles // Returns: none void CreateControl(UINT p_dStyles,UINT p_dExStyles) { // >> Start control specific // Set control as container so can still track events g_hControl = g_hContainer; // End control specific << // Initialize control ControlStateCallback(CSPY_STARTUP); } // Name: DialogProc // Description: Dialog message callback // Parameters: Handle to dialog, message, message parameters // Returns: TRUE if handled message, FALSE otherwise BOOL CALLBACK DlgProc(HWND p_hDlg,UINT p_iMsg,WPARAM p_wParam,LPARAM p_lParam) { switch(p_iMsg) { // Initialize Dialog case WM_INITDIALOG: { DWORD dControlStyles; DWORD dControlExStyles; // Make dialog handle available to all functions g_hDialog = p_hDlg; // Create support controls (tooltips, images lists, etc.) CreateSupportControls(); // Create control InitialControlStyles(&dControlStyles,&dControlExStyles); CreateControl(dControlStyles,dControlExStyles); } break; // Process command messages from interface case WM_COMMAND: return CommandHandler(HIWORD(p_wParam),LOWORD(p_wParam)); // Close case WM_CLOSE: // Clean up ControlStateCallback(CSPY_SHUTDOWN); if(g_pSL) free(g_pSL); if(g_pSLIndex) free(g_pSLIndex); // Uninstall hook and end dialog UnhookWindowsHookEx(g_hGMHook); UnhookWindowsHookEx(g_hCWHook); EndDialog(p_hDlg,0); return TRUE; } // Did not process message return FALSE; } // Name: CreateSupportControls // Description: Create all controls that make up the background support // Parameters: none // Returns: none void CreateSup
评论
    相关推荐
    • 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下的端口扫描器