home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.sberbank.sumy.ua
/
2014.11.ftp.sberbank.sumy.ua.tar
/
ftp.sberbank.sumy.ua
/
incoming
/
1
/
tester.~c
< prev
next >
Wrap
Text File
|
2014-02-08
|
3KB
|
119 lines
/*@@ Wedit generated application. Written Thu Jul 04 16:19:38 2013
@@header: c:\a_all\22\testerres.h
@@resources: c:\a_all\22\tester.rc
Do not edit outside the indicated areas */
/*<---------------------------------------------------------------------->*/
/*<---------------------------------------------------------------------->*/
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
#include <string.h>
#include "testerres.h"
/*<---------------------------------------------------------------------->*/
HINSTANCE hInst; // Instance handle
HWND hwndMain; //Main window handle
LRESULT CALLBACK MainWndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam);
typedef void ( *DLLMESSAGE)( char*, char*);
static BOOL InitApplication(void)
{
WNDCLASS wc;
memset(&wc,0,sizeof(WNDCLASS));
wc.style = CS_HREDRAW|CS_VREDRAW ;
wc.lpfnWndProc = (WNDPROC)MainWndProc;
wc.hInstance = hInst;
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.lpszClassName = "testerWndClass";
wc.lpszMenuName = MAKEINTRESOURCE(IDMAINMENU);
wc.hCursor = LoadCursor(NULL,IDC_ARROW);
wc.hIcon = LoadIcon(NULL,IDI_APPLICATION);
if (!RegisterClass(&wc))
return 0;
/*@@0<-@@*/
// ---TODO--- Call module specific initialization routines here
return 1;
}
/*<---------------------------------------------------------------------->*/
/*@@1->@@*/
HWND CreatetesterWndClassWnd(void)
{
return CreateWindow("testerWndClass","tester",
WS_MINIMIZEBOX|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_MAXIMIZEBOX|WS_CAPTION|WS_BORDER|WS_SYSMENU|WS_THICKFRAME,
100,100,500,200,
NULL,
NULL,
hInst,
NULL);
}
/*@@1<-@@*/
/*<---------------------------------------------------------------------->*/
/* --- The following code comes from C:\a_C\lcc\lib\wizard\defOnCmd.tpl. */
void MainWndProc_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
{
switch(id) {
// ---TODO--- Add new menu commands here
/*@@NEWCOMMANDS@@*/
case IDM_EXIT:
PostMessage(hwnd,WM_CLOSE,0,0);
break;
}
}
/*<---------------------------------------------------------------------->*/
/*@@2->@@*/
LRESULT CALLBACK MainWndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
{
HINSTANCE hinstLib;
DLLMESSAGE DllMessage;
switch (msg) {
case WM_CREATE:
hinstLib = LoadLibrary("JTBknv01.dll");
if( hinstLib == NULL) MessageBox( hwnd,"Load","Load",0);
DllMessage = (DLLMESSAGE)GetProcAddress( hinstLib, "JpgInToBmpOut");
if( DllMessage == NULL) MessageBox( hwnd,"Proc","Proc",0);
DllMessage( "IMG3592A.jpg","Konved.bmp");
return 0;
case WM_COMMAND:
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd,msg,wParam,lParam);
}
/*@@3<-@@*/
return 0;
}
/*@@2<-@@*/
/*<---------------------------------------------------------------------->*/
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow)
{
MSG msg;
HANDLE hAccelTable;
hInst = hInstance;
if (!InitApplication())
return 0;
hAccelTable = LoadAccelerators(hInst,MAKEINTRESOURCE(IDACCEL));
if ((hwndMain = CreatetesterWndClassWnd()) == (HWND)0)
return 0;
ShowWindow(hwndMain,SW_SHOW);
while (GetMessage(&msg,NULL,0,0)) {
if (!TranslateAccelerator(msg.hwnd,hAccelTable,&msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}