?? bank.cpp
字號:
//////////////////////////////////////////////////
//Bank.cpp
#include <windows.h>
#include <commdlg.h>
#include <commctrl.h>
#include <windowsx.h>
#include "resource.h"
#include "bank.h"
#include "d.h"
#include "..\\tc08a32.h"
#include "..\\NewSig.h"
BOOL bHaveLoadDriver;
HANDLE hInst;
HINSTANCE hLib;
extern WORD TotalLine;
HWND hGWnd;
int PASCAL WinMain( HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpszCmdParam, int nCmdShow)
{
static char szAppName[] = "Bank";
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
char strSys[200];
// Unused(lpszCmdParam);
if (!hPrevInstance)
{
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = (WNDPROC)WndProc;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = DLGWINDOWEXTRA;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon (hInstance, "IDI_BANK");
wndclass.hCursor = LoadCursor (NULL, IDI_APPLICATION);
wndclass.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = szAppName;
ATOM a=RegisterClass (&wndclass);
}
GetSystemDirectory(strSys,200);
strcat(strSys,"\\comctl32.dll");
hLib = LoadLibrary(strSys);
hInst = hInstance;
hwnd = CreateDialog(hInstance, "BANK", 0, NULL);
hGWnd=hwnd;
ShowWindow (hwnd, nCmdShow);
UpdateWindow(hwnd);
bHaveLoadDriver=yzInitSystem();
if(!bHaveLoadDriver) PostQuitMessage(0);
//FARPROC lpProc;
//lpProc = MakeProcInstance((FARPROC)TimerProc, hInstance);
SetTimer(hwnd,ID_TIME,100,(TIMERPROC)TimerProc);
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam ;
}
VOID CALLBACK TimerProc(HWND hwnd,UINT uMsg,UINT idEvent,DWORD dwTime)
{
if(idEvent!=ID_TIME) return;
yzDoWork();
}
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, UINT wParam, LONG lParam)
{
switch (message)
{
case WM_DESTROY :
KillTimer(hwnd,ID_TIME);
if(bHaveLoadDriver) yzExitSystem();
PostQuitMessage (0) ;
return 0 ;
break;
case WM_COMMAND:
if(LOWORD(wParam)==ID_OK)
{
KillTimer(hwnd,ID_TIME);
if(bHaveLoadDriver) yzExitSystem();
PostQuitMessage(0);
}
return 0;
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam) ;
break;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -