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

📄 about.c

📁 epson 13506 driver code
💻 C
字号:
//----------------------------------------------------------------------------
//
//  ABOUT.C
//
//  Copyright (c) Seiko Epson Corp. 1998, 2001 All rights reserved.
//
//
//----------------------------------------------------------------------------

#include <windows.h>   
#include "resource.h"   // Windows resource IDs

static LRESULT CALLBACK AboutDlgProc(HWND hDlg,UINT message,UINT wParam,LONG lParam);

//----------------------------------------------------------------------------
//
// FUNCTION: AboutDlg(HWND)
//
// PURPOSE:  Create the "About" dialog
//
//----------------------------------------------------------------------------
extern HINSTANCE ghInstance;

void AboutDlg(HWND hwnd)
    {
    DialogBox (ghInstance, MAKEINTRESOURCE(IDD_ABOUTBOX),hwnd,(DLGPROC)AboutDlgProc); 
    }

//----------------------------------------------------------------------------
//
// FUNCTION: AboutDlgProc(HWND, UINT, WPARAM, LPARAM)
//
// PURPOSE:  Processes messages for "About" dialog box
//
//----------------------------------------------------------------------------
static LRESULT CALLBACK AboutDlgProc(HWND hDlg,UINT message,UINT wParam,LONG lParam)  
    { 
	char szFullPath[MAX_PATH];	// full path of module
	char szGetName[256];		// String to use for extracting version info
	DWORD dwVerInfoSize;		// Size of version information block
	LPSTR lpVersion;			// String pointer to 'version' text
	DWORD dwVerHnd=0;			// An 'ignored' parameter, always '0'
	UINT  uVersionLen;		    // Current length of full version string
	char  szResult[256];		// Temporary result string
    
    switch (message) 
        { 

        case WM_INITDIALOG:

			// Let's dive in and pull out the version information:

			GetModuleFileName (ghInstance, szFullPath, sizeof(szFullPath));
			dwVerInfoSize = GetFileVersionInfoSize(szFullPath, &dwVerHnd);
			if (dwVerInfoSize) 
                {
				LPSTR   lpstrVffInfo;
				HANDLE  hMem;
				hMem = GlobalAlloc(GMEM_MOVEABLE, dwVerInfoSize);
				lpstrVffInfo  = GlobalLock(hMem);
				GetFileVersionInfo(szFullPath, dwVerHnd, dwVerInfoSize, lpstrVffInfo);

				// The below 'hex' value looks a little confusing, but
				// essentially what it is, is the hexidecimal representation
				// of a couple different values that represent the language
				// and character set that we are wanting string values for.
				// 040904E4 is a very common one, because it means:
				//   US English,

				lstrcpy(szGetName, "\\StringFileInfo\\040904B0\\ProductVersion");	 
				VerQueryValue((LPVOID)lpstrVffInfo,szGetName,&lpVersion,&uVersionLen);
				wsprintf(szResult, "13506FILT Version %s",lpVersion);
				SetDlgItemText(hDlg, IDC_VERSION, szResult);

				GlobalUnlock(hMem);
				GlobalFree(hMem);
                }
            return TRUE; 
 
        case WM_COMMAND: 
            if (wParam == IDOK || wParam == IDCANCEL) 
                { 
                EndDialog (hDlg, TRUE);       // Exit the dialog
                return TRUE; 
                } 
            return FALSE; 
 
        case WM_DESTROY:
            return FALSE; 
        } 
    return FALSE; 
    } 
 

⌨️ 快捷键说明

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