Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define WIN32_LEAN_AND_MEAN
- #define _WIN32_WINNT 0x0501
- #define WINVER 0x0501
- #define _WIN32_IE 0x0600
- #include <windows.h>
- #include <commctrl.h>
- #include "resource.h"
- #include <stdlib.h>
- #include <atlstr.h>
- #pragma comment(linker,"\"/manifestdependency:type='win32' \
- name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
- processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
- #pragma region Declarations
- #define WINDOW_WIDTH 500
- #define WINDOW_HEIGHT 670
- #define IDC_EXIT_BUTTON 9001
- #define IDC_LEVEL 9002
- #define IDC_LEVEL_LBL 9003
- #define IDC_STAT_STR 9004
- #define IDC_STAT_DEX 9005
- #define IDC_STAT_VIT 9006
- #define IDC_STAT_INT 9007
- #define IDC_STAT_STR_LBL 9008
- #define IDC_STAT_DEX_LBL 9009
- #define IDC_STAT_VIT_LBL 9010
- #define IDC_STAT_INT_LBL 9011
- #define IDC_STAT_HP 9012
- #define IDC_STAT_HP_LBL 9013
- #define IDC_RES_PERLIFE 9014
- #define IDC_RES_PERLIFE_LBL 9015
- #define IDC_RES_PHYS 9016
- #define IDC_RES_ALL 9017
- #define IDC_RES_FIRE 9018
- #define IDC_RES_COLD 9019
- #define IDC_RES_POISON 9020
- #define IDC_RES_ARCANE 9021
- #define IDC_RES_LIGHTNING 9065
- #define IDC_RES_MELEE 9022
- #define IDC_RES_RANGE 9023
- #define IDC_RES_PHYS_LBL 9024
- #define IDC_RES_ALL_LBL 9025
- #define IDC_RES_FIRE_LBL 9026
- #define IDC_RES_COLD_LBL 9027
- #define IDC_RES_POISON_LBL 9028
- #define IDC_RES_ARCANE_LBL 9029
- #define IDC_RES_LIGHTNING_LBL 9037
- #define IDC_RES_MELEE_LBL 9030
- #define IDC_RES_RANGE_LBL 9031
- #define IDC_STAT_ARMOR 9032
- #define IDC_STAT_ARMOR_LBL 9033
- #define IDC_STAT_EFFECTIVEHP1 9034
- #define IDC_STAT_EFFECTIVEHP1_LBL 9035
- #define IDC_ITEM1_RES_ALL 9036
- #define IDC_ITEM1_RES_FIRE 9037
- #define IDC_ITEM1_RES_COLD 9038
- #define IDC_ITEM1_RES_POISON 9039
- #define IDC_ITEM1_RES_ARCANE 9040
- #define IDC_ITEM1_RES_LIGHTNING 9041
- #define IDC_ITEM1_RES_MELEE 9042
- #define IDC_ITEM1_RES_RANGE 9043
- #define IDC_ITEM2_RES_ALL 9044
- #define IDC_ITEM2_RES_FIRE 9045
- #define IDC_ITEM2_RES_COLD 9046
- #define IDC_ITEM2_RES_POISON 9047
- #define IDC_ITEM2_RES_ARCANE 9048
- #define IDC_ITEM2_RES_LIGHTNING 9049
- #define IDC_ITEM2_RES_MELEE 9050
- #define IDC_ITEM2_RES_RANGE 9051
- #define IDC_ITEM1_STAT_STR 9052
- #define IDC_ITEM1_STAT_DEX 9053
- #define IDC_ITEM1_STAT_VIT 9054
- #define IDC_ITEM1_STAT_INT 9055
- #define IDC_ITEM1_STAT_ARMOR 9056
- #define IDC_ITEM2_STAT_STR 9057
- #define IDC_ITEM2_STAT_DEX 9058
- #define IDC_ITEM2_STAT_VIT 9059
- #define IDC_ITEM2_STAT_INT 9060
- #define IDC_ITEM2_STAT_ARMOR 9061
- #define IDC_ITEM1_LBL 9062
- #define IDC_ITEM2_LBL 9063
- #define IDC_ITEM_COMPARE_LBL 9064
- #define IDC_ITEM1_RES_ALL_LBL 9065
- #define IDC_ITEM1_RES_FIRE_LBL 9066
- #define IDC_ITEM1_RES_COLD_LBL 9067
- #define IDC_ITEM1_RES_POISON_LBL 9068
- #define IDC_ITEM1_RES_ARCANE_LBL 9069
- #define IDC_ITEM1_RES_LIGHTNING_LBL 9070
- #define IDC_ITEM1_RES_MELEE_LBL 9071
- #define IDC_ITEM1_RES_RANGE_LBL 9072
- #define IDC_ITEM1_STAT_ARMOR_LBL 9073
- #define IDC_ITEM1_STAT_STR_LBL 9074
- #define IDC_ITEM1_STAT_DEX_LBL 9075
- #define IDC_ITEM1_STAT_VIT_LBL 9076
- #define IDC_ITEM1_STAT_INT_LBL 9077
- #define IDC_ITEM2_RES_ALL_LBL 9078
- #define IDC_ITEM2_RES_FIRE_LBL 9079
- #define IDC_ITEM2_RES_COLD_LBL 9080
- #define IDC_ITEM2_RES_POISON_LBL 9081
- #define IDC_ITEM2_RES_ARCANE_LBL 9082
- #define IDC_ITEM2_RES_LIGHTNING_LBL 9083
- #define IDC_ITEM2_RES_MELEE_LBL 9084
- #define IDC_ITEM2_RES_RANGE_LBL 9085
- #define IDC_ITEM2_STAT_ARMOR_LBL 9086
- #define IDC_ITEM2_STAT_STR_LBL 9087
- #define IDC_ITEM2_STAT_DEX_LBL 9088
- #define IDC_ITEM2_STAT_VIT_LBL 9089
- #define IDC_ITEM2_STAT_INT_LBL 9090
- #pragma endregion Declarations
- #pragma region Globals
- HWND hEdit,
- hExitButton,
- hPlayerLevel,
- hPlayerLevelLbl,
- hStatStr,
- hStatDex,
- hStatVit,
- hStatInt,
- hStatStrLbl,
- hStatDexLbl,
- hStatVitLbl,
- hStatIntLbl,
- hStatHP,
- hStatHPLbl,
- hResPerLife,
- hResPerLifeLbl,
- hResPhys,
- hResAll,
- hResFire,
- hResCold,
- hResPoison,
- hResArcane,
- hResLightning,
- hResMelee,
- hResRange,
- hResPhysLbl,
- hResAllLbl,
- hResFireLbl,
- hResColdLbl,
- hResPoisonLbl,
- hResArcaneLbl,
- hResLightningLbl,
- hResMeleeLbl,
- hResRangeLbl,
- hStatArmor,
- hStatArmorLbl,
- hStatEffectiveHP1,
- hStatEffectiveHP1Lbl,
- hItem1ResAll,
- hItem1ResFire,
- hItem1ResCold,
- hItem1ResPoison,
- hItem1ResArcane,
- hItem1ResLightning,
- hItem1ResMelee,
- hItem1ResRange,
- hItem1StatArmor,
- hItem1StatStr,
- hItem1StatDex,
- hItem1StatVit,
- hItem1StatInt,
- hItem1ResAllLbl,
- hItem1ResFireLbl,
- hItem1ResColdLbl,
- hItem1ResPoisonLbl,
- hItem1ResArcaneLbl,
- hItem1ResLightningLbl,
- hItem1ResMeleeLbl,
- hItem1ResRangeLbl,
- hItem1StatArmorLbl,
- hItem1StatStrLbl,
- hItem1StatDexLbl,
- hItem1StatVitLbl,
- hItem1StatIntLbl,
- hItem2ResAll,
- hItem2ResFire,
- hItem2ResCold,
- hItem2ResPoison,
- hItem2ResArcane,
- hItem2ResLightning,
- hItem2ResMelee,
- hItem2ResRange,
- hItem2StatArmor,
- hItem2StatStr,
- hItem2StatDex,
- hItem2StatVit,
- hItem2StatInt,
- hItem2ResAllLbl,
- hItem2ResFireLbl,
- hItem2ResColdLbl,
- hItem2ResPoisonLbl,
- hItem2ResArcaneLbl,
- hItem2ResLightningLbl,
- hItem2ResMeleeLbl,
- hItem2ResRangeLbl,
- hItem2StatArmorLbl,
- hItem2StatStrLbl,
- hItem2StatDexLbl,
- hItem2StatVitLbl,
- hItem2StatIntLbl,
- hItem1Lbl,
- hItem2Lbl,
- hItemCompareLbl;
- float pLevel = 1,
- mLevel = 61,
- pStr = 100,
- pDex = 100,
- pVit = 100,
- pInt = 100,
- pHP = 1000,
- pPerLife = 1,
- pArmor = 1000,
- pEffHP1 = 1,
- pEffHP2 = 1,
- pEffHP3 = 1,
- pResAll = 100,
- pResFire = 100,
- pResCold = 100,
- pResPoison = 100,
- pResArcane = 100,
- pResLightning = 100,
- pResMelee = 100,
- pResRange = 100,
- item1ResAll = 100,
- item1ResFire = 100,
- item1ResCold = 100,
- item1ResPoison = 100,
- item1ResArcane = 100,
- item1ResLightning = 100,
- item1ResMelee = 100,
- item1ResRange = 100,
- item1StatStr = 100,
- item1StatDex = 100,
- item1StatVit = 100,
- item1StatInt = 100,
- item1StatArmor = 1000,
- item2ResAll = 100,
- item2ResFire = 100,
- item2ResCold = 100,
- item2ResPoison = 100,
- item2ResArcane = 100,
- item2ResLightning = 100,
- item2ResMelee = 100,
- item2ResRange = 100,
- item2StatStr = 100,
- item2StatDex = 100,
- item2StatVit = 100,
- item2StatInt = 100,
- item2StatArmor = 1000,
- itemCompareStat = 0;
- HFONT hFont = CreateFont(18, 0, 0, 0, FW_MEDIUM, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Calibri");
- #pragma endregion Globals
- LRESULT CALLBACK WinProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);
- int Round(float f) { return f - (int)f == 0 ? (int)f : (int)f + 1; }
- int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,LPSTR lpCmdLine,int nShowCmd)
- {
- WNDCLASSEX wClass;
- ZeroMemory(&wClass,sizeof(WNDCLASSEX));
- wClass.cbClsExtra=NULL;
- wClass.cbSize=sizeof(WNDCLASSEX);
- wClass.cbWndExtra=NULL;
- wClass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
- wClass.hCursor=LoadCursor(NULL,IDC_ARROW);
- wClass.hInstance=hInst;
- wClass.hIcon=LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON));
- wClass.hIconSm=LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON));
- wClass.lpfnWndProc=(WNDPROC)WinProc;
- wClass.lpszClassName="Window Class";
- wClass.lpszMenuName=NULL;
- wClass.style=CS_HREDRAW|CS_VREDRAW;
- if(!RegisterClassEx(&wClass))
- {
- int nResult=GetLastError();
- MessageBox(NULL,
- "Window class creation failed\r\n",
- "Window Class Failed",
- MB_ICONERROR);
- }
- HWND hWnd=CreateWindowEx(NULL,
- "Window Class",
- "D3 Tools",
- WS_OVERLAPPED|WS_SYSMENU|WS_MINIMIZEBOX,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- WINDOW_WIDTH,
- WINDOW_HEIGHT,
- NULL,
- NULL,
- hInst,
- NULL);
- if(!hWnd)
- {
- int nResult=GetLastError();
- MessageBox(NULL,
- "Window creation failed\r\n",
- "Window Creation Failed",
- MB_ICONERROR);
- }
- ShowWindow(hWnd,nShowCmd);
- MSG msg;
- ZeroMemory(&msg,sizeof(MSG));
- while(GetMessage(&msg,NULL,0,0))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- return 0;
- }
- LRESULT CALLBACK WinProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
- {
- RECT rc;
- GetClientRect(hWnd, &rc);
- int width = rc.right - rc.left;
- int height = rc.bottom - rc.top;
- switch(msg)
- {
- case WM_CREATE:
- {
- hExitButton = CreateWindowEx(NULL,
- "BUTTON",
- "Exit",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
- width - 110,
- height - 34,
- 100,
- 24,
- hWnd,
- (HMENU)IDC_EXIT_BUTTON,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hExitButton, WM_SETFONT, (WPARAM)hFont, TRUE);
- hPlayerLevel = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "1",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 10,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_LEVEL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hPlayerLevel, WM_SETFONT, (WPARAM)hFont, TRUE);
- hPlayerLevelLbl = CreateWindowEx(NULL,
- "STATIC",
- "Player Level:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 13,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_LEVEL_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hPlayerLevelLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatStr = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 36,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_STAT_DEX,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatStr, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatStrLbl = CreateWindowEx(NULL,
- "STATIC",
- "Player Strength:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 39,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_STAT_STR_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatStrLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatDex = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 62,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_STAT_DEX,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatDex, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatDexLbl = CreateWindowEx(NULL,
- "STATIC",
- "Player Dexterity:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 65,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_STAT_DEX_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatDexLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatVit = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 88,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_STAT_VIT,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatVit, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatVitLbl = CreateWindowEx(NULL,
- "STATIC",
- "Player Vitality:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 91,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_STAT_VIT_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatVitLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatInt = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 114,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_STAT_INT,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatInt, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatIntLbl = CreateWindowEx(NULL,
- "STATIC",
- "Player Intelligence:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 117,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_STAT_INT_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatIntLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResPerLife = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "1",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 140,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_PERLIFE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResPerLife, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResPerLifeLbl = CreateWindowEx(NULL,
- "STATIC",
- "Percent Life:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 143,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_RES_PERLIFE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResPerLifeLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatArmor = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "1000",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 166,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_STAT_ARMOR,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatArmor, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatArmorLbl = CreateWindowEx(NULL,
- "STATIC",
- "Armor:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 169,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_STAT_ARMOR_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatArmorLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatHP = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT|ES_READONLY,
- 160,
- 192,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_STAT_HP,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatHP, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatHPLbl = CreateWindowEx(NULL,
- "STATIC",
- "Maximum Life:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 195,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_STAT_HP_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatHPLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResAll = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 10,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_ALL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResAll, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResAllLbl = CreateWindowEx(NULL,
- "STATIC",
- "Resist All:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 13,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_ALL_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResAllLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResPhys = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 36,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_PHYS,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResPhys, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResPhysLbl = CreateWindowEx(NULL,
- "STATIC",
- "Physical Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 39,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_PHYS_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResPhysLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResFire = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 62,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_FIRE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResFire, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResFireLbl = CreateWindowEx(NULL,
- "STATIC",
- "Fire Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 65,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_FIRE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResFireLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResCold = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 88,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_COLD,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResCold, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResColdLbl = CreateWindowEx(NULL,
- "STATIC",
- "Cold Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 91,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_COLD_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResColdLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResPoison = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 114,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_POISON,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResPoison, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResPoisonLbl = CreateWindowEx(NULL,
- "STATIC",
- "Poison Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 117,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_POISON_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResPoisonLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResArcane = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 140,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_ARCANE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResArcane, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResArcaneLbl = CreateWindowEx(NULL,
- "STATIC",
- "Arcane Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 143,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_ARCANE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResArcaneLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResLightning = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 166,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_LIGHTNING,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResLightning, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResLightningLbl = CreateWindowEx(NULL,
- "STATIC",
- "Lightning Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 169,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_LIGHTNING_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResLightningLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResMelee = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 192,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_MELEE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResMelee, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResMeleeLbl = CreateWindowEx(NULL,
- "STATIC",
- "Melee Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 195,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_MELEE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResMeleeLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResRange = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 218,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_RES_RANGE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResRange, WM_SETFONT, (WPARAM)hFont, TRUE);
- hResRangeLbl = CreateWindowEx(NULL,
- "STATIC",
- "Range Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 218,
- 130,
- 24,
- hWnd,
- (HMENU)IDC_RES_RANGE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hResRangeLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatEffectiveHP1 = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT|ES_READONLY,
- 160,
- 218,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_STAT_EFFECTIVEHP1,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatEffectiveHP1, WM_SETFONT, (WPARAM)hFont, TRUE);
- hStatEffectiveHP1Lbl = CreateWindowEx(NULL,
- "STATIC",
- "Effective HP:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 221,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_STAT_EFFECTIVEHP1_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hStatEffectiveHP1Lbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1Lbl = CreateWindowEx(NULL,
- "STATIC",
- "Item 1:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 250,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1Lbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResAll = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 276,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_ALL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResAll, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResAllLbl = CreateWindowEx(NULL,
- "STATIC",
- "Resist All:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 279,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_ALL_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResAllLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResFire = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 303,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_FIRE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResFire, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResFireLbl = CreateWindowEx(NULL,
- "STATIC",
- "Fire Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 306,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_FIRE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResFireLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResCold = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 329,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_COLD,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResCold, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResColdLbl = CreateWindowEx(NULL,
- "STATIC",
- "Cold Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 332,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_COLD_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResColdLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResPoison = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 355,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_POISON,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResPoison, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResPoisonLbl = CreateWindowEx(NULL,
- "STATIC",
- "Poison Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 358,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_POISON_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResPoisonLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResArcane = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 381,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_ARCANE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResArcane, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResArcaneLbl = CreateWindowEx(NULL,
- "STATIC",
- "Arcane Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 384,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_ARCANE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResArcaneLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResLightning = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 407,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_LIGHTNING,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResLightning, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1ResLightningLbl = CreateWindowEx(NULL,
- "STATIC",
- "Lightning Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 410,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_RES_LIGHTNING_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1ResLightningLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatArmor = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "1000",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 433,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_ARMOR,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatArmor, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatArmorLbl = CreateWindowEx(NULL,
- "STATIC",
- "Armor:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 436,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_ARMOR_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatArmorLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatStr = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 459,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_STR,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatStr, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatStrLbl = CreateWindowEx(NULL,
- "STATIC",
- "Strength:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 462,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_STR_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatStrLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatDex = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 485,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_VIT,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatDex, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatDexLbl = CreateWindowEx(NULL,
- "STATIC",
- "Dexterity:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 488,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_DEX_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatDexLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatVit = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 511,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_VIT,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatVit, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatVitLbl = CreateWindowEx(NULL,
- "STATIC",
- "Vitality:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 514,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_VIT_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatVitLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatInt = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 160,
- 537,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_INT,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatInt, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem1StatIntLbl = CreateWindowEx(NULL,
- "STATIC",
- "Intelligence:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 10,
- 540,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM1_STAT_INT_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem1StatIntLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2Lbl = CreateWindowEx(NULL,
- "STATIC",
- "Item 2:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 250,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2Lbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResAll = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 276,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_ALL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResAll, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResAllLbl = CreateWindowEx(NULL,
- "STATIC",
- "Resist All:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 279,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_ALL_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResAllLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResFire = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 303,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_FIRE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResFire, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResFireLbl = CreateWindowEx(NULL,
- "STATIC",
- "Fire Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 306,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_FIRE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResFireLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResCold = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 329,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_COLD,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResCold, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResColdLbl = CreateWindowEx(NULL,
- "STATIC",
- "Cold Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 332,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_COLD_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResColdLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResPoison = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 355,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_POISON,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResPoison, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResPoisonLbl = CreateWindowEx(NULL,
- "STATIC",
- "Poison Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 358,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_POISON_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResPoisonLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResArcane = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 381,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_ARCANE,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResArcane, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResArcaneLbl = CreateWindowEx(NULL,
- "STATIC",
- "Arcane Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 384,
- 120,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_ARCANE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResArcaneLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResLightning = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 407,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_LIGHTNING,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResLightning, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2ResLightningLbl = CreateWindowEx(NULL,
- "STATIC",
- "Lightning Resistance:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 410,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_RES_LIGHTNING_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2ResLightningLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatArmor = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "1000",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 433,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_ARMOR,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatArmor, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatArmorLbl = CreateWindowEx(NULL,
- "STATIC",
- "Armor:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 436,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_ARMOR_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatArmorLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatStr = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 459,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_STR,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatStr, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatStrLbl = CreateWindowEx(NULL,
- "STATIC",
- "Strength:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 462,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_STR_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatStrLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatDex = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 485,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_VIT,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatDex, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatDexLbl = CreateWindowEx(NULL,
- "STATIC",
- "Dexterity:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 488,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_DEX_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatDexLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatVit = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 511,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_VIT,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatVit, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatVitLbl = CreateWindowEx(NULL,
- "STATIC",
- "Vitality:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 514,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_VIT_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatVitLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatInt = CreateWindowEx(WS_EX_CLIENTEDGE,
- "EDIT",
- "100",
- WS_TABSTOP|WS_VISIBLE|WS_CHILD|ES_MULTILINE|ES_NUMBER|ES_RIGHT,
- 415,
- 537,
- 70,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_INT,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatInt, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItem2StatIntLbl = CreateWindowEx(NULL,
- "STATIC",
- "Intelligence:",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 265,
- 540,
- 150,
- 24,
- hWnd,
- (HMENU)IDC_ITEM2_STAT_INT_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItem2StatIntLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- hItemCompareLbl = CreateWindowEx(NULL,
- "STATIC",
- "Comparative Change In Effective Health: +0",
- WS_VISIBLE|WS_CHILD|SS_SIMPLE,
- 100,
- 580,
- 400,
- 24,
- hWnd,
- (HMENU)IDC_ITEM_COMPARE_LBL,
- GetModuleHandle(NULL),
- NULL);
- SendMessage(hItemCompareLbl, WM_SETFONT, (WPARAM)hFont, TRUE);
- }
- return 0;
- break;
- case WM_CTLCOLORSTATIC:
- return 0;
- break;
- case WM_COMMAND:
- {
- switch(LOWORD(wParam))
- {
- case IDC_EXIT_BUTTON:
- {
- PostQuitMessage(0);
- }
- return 0;
- break;
- case IDC_LEVEL:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hPlayerLevel, buffer, sizeof(buffer));
- pLevel = (float)atoi(buffer);
- if (pLevel != NULL)
- {
- if (pLevel > 60 || pLevel < 1)
- {
- MessageBox(hWnd, "Please enter a player level within 1-60!", "Player Level Out Of Bounds", MB_ICONERROR);
- SetWindowText(hPlayerLevel, "1");
- pLevel = 1;
- }
- if (pVit != NULL && pPerLife != NULL && pHP != NULL && hStatHP != NULL)
- {
- pHP = pLevel > 36 ? (36 + 4 * pLevel + (pLevel - 25) * pVit) * (1 + pPerLife / 100) : (36 + 4 * pLevel + 10 * pVit) * (1 + pPerLife / 100);
- _itoa_s(Round(pHP), buffer, 10);
- SetWindowText(hStatHP, buffer);
- }
- }
- }
- }
- return 0;
- break;
- case IDC_STAT_STR:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hStatStr, buffer, sizeof(buffer));
- pStr = (float)atoi(buffer);
- if (pStr != NULL)
- {
- if (pStr < 1)
- {
- MessageBox(hWnd, "Please enter a strength level greater than 1!", "Player Strength Out Of Bounds", MB_ICONERROR);
- SetWindowText(hStatStr, "100");
- pStr = 100;
- }
- }
- }
- }
- return 0;
- break;
- case IDC_STAT_DEX:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hStatDex, buffer, sizeof(buffer));
- pDex = (float)atoi(buffer);
- if (pDex != NULL)
- {
- if (pDex < 1)
- {
- MessageBox(hWnd, "Please enter a dexterity level greater than 1!", "Player Dexterity Out Of Bounds", MB_ICONERROR);
- SetWindowText(hStatDex, "100");
- pDex = 100;
- }
- }
- }
- }
- return 0;
- break;
- case IDC_STAT_VIT:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hStatVit, buffer, sizeof(buffer));
- pVit = (float)atoi(buffer);
- if (pVit != NULL)
- {
- if (pVit < 1)
- {
- MessageBox(hWnd, "Please enter a vitality level greater than 1!", "Player Vitality Out Of Bounds", MB_ICONERROR);
- SetWindowText(hStatVit, "100");
- pVit = 100;
- }
- if (pPerLife != NULL && pLevel != NULL && pHP != NULL && hStatHP != NULL)
- {
- pHP = pLevel > 36 ? (36 + 4 * pLevel + (pLevel - 25) * pVit) * (1 + pPerLife / 100) : (36 + 4 * pLevel + 10 * pVit) * (1 + pPerLife / 100);
- _itoa_s(Round(pHP), buffer, 10);
- SetWindowText(hStatHP, buffer);
- }
- }
- }
- }
- return 0;
- break;
- case IDC_STAT_INT:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hStatInt, buffer, sizeof(buffer));
- pInt = (float)atoi(buffer);
- if (pInt != NULL)
- {
- if (pInt < 1)
- {
- MessageBox(hWnd, "Please enter a intelligence level greater than 1!", "Player Intelligence Out Of Bounds", MB_ICONERROR);
- SetWindowText(hStatInt, "100");
- pInt = 100;
- }
- }
- }
- }
- return 0;
- break;
- case IDC_RES_PERLIFE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResPerLife, buffer, sizeof(buffer));
- pPerLife = (float)atoi(buffer);
- if (pPerLife < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative percent life bonus value!", "Percent Life Bonus Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResPerLife, "1");
- pPerLife = 1;
- return 0;
- break;
- }
- if (pVit != NULL && pLevel != NULL && pHP != NULL && hStatHP != NULL)
- {
- pHP = pLevel > 36 ? (36 + 4 * pLevel + (pLevel - 25) * pVit) * (1 + pPerLife / 100) : (36 + 4 * pLevel + 10 * pVit) * (1 + pPerLife / 100);
- _itoa_s(Round(pHP), buffer, 10);
- SetWindowText(hStatHP, buffer);
- }
- }
- }
- return 0;
- break;
- case IDC_STAT_ARMOR:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hStatArmor, buffer, sizeof(buffer));
- pArmor = (float)atoi(buffer);
- if (pArmor < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative armor value!", "Armor Out Of Bounds", MB_ICONERROR);
- SetWindowText(hStatArmor, "1000");
- pArmor = 1000;
- return 0;
- break;
- }
- }
- }
- return 0;
- break;
- case IDC_RES_ALL:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResAll, buffer, sizeof(buffer));
- pResAll = (float)atoi(buffer);
- if (pResAll < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative resist all value!", "Resist All Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResAll, "100");
- pResAll = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_RES_FIRE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResFire, buffer, sizeof(buffer));
- pResFire = (float)atoi(buffer);
- if (pResFire < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative fire resist value!", "Fire Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResFire, "100");
- pResFire = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_RES_COLD:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResCold, buffer, sizeof(buffer));
- pResCold = (float)atoi(buffer);
- if (pResCold < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative cold resist value!", "Cold Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResCold, "100");
- pResCold = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_RES_POISON:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResPoison, buffer, sizeof(buffer));
- pResPoison = (float)atoi(buffer);
- if (pResPoison < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative poison resist value!", "Poison Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResPoison, "100");
- pResPoison = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_RES_ARCANE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResArcane, buffer, sizeof(buffer));
- pResArcane = (float)atoi(buffer);
- if (pResArcane < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative arcane resist value!", "Arcane Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResArcane, "100");
- pResArcane = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_RES_LIGHTNING:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResLightning, buffer, sizeof(buffer));
- pResLightning = (float)atoi(buffer);
- if (pResLightning < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative lightning resist value!", "Lightning Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResLightning, "100");
- pResLightning = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_RES_MELEE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResMelee, buffer, sizeof(buffer));
- pResMelee = (float)atoi(buffer);
- if (pResMelee < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative melee resist value!", "Melee Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResMelee, "100");
- pResMelee = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_RES_RANGE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hResRange, buffer, sizeof(buffer));
- pResRange = (float)atoi(buffer);
- if (pResRange < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative range resist value!", "Range Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hResRange, "100");
- pResRange = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_RES_ALL:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1ResAll, buffer, sizeof(buffer));
- item1ResAll = (float)atoi(buffer);
- if (item1ResAll < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative resist all value!", "Resist All Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1ResAll, "100");
- item1ResAll = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_RES_FIRE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1ResFire, buffer, sizeof(buffer));
- item1ResFire = (float)atoi(buffer);
- if (item1ResFire < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative fire resistance value!", "Fire Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1ResFire, "100");
- item1ResFire = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_RES_COLD:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1ResCold, buffer, sizeof(buffer));
- item1ResCold = (float)atoi(buffer);
- if (item1ResCold < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative cold resistance value!", "Cold Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1ResCold, "100");
- item1ResCold = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_RES_POISON:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1ResPoison, buffer, sizeof(buffer));
- item1ResPoison = (float)atoi(buffer);
- if (item1ResPoison < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative poison resistance value!", "Poison Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1ResPoison, "100");
- item1ResPoison = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_RES_ARCANE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1ResArcane, buffer, sizeof(buffer));
- item1ResArcane = (float)atoi(buffer);
- if (item1ResArcane < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative arcane resistance value!", "Arcane Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1ResArcane, "100");
- item1ResArcane = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_RES_LIGHTNING:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1ResLightning, buffer, sizeof(buffer));
- item1ResLightning = (float)atoi(buffer);
- if (item1ResLightning < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative lightning resistance value!", "Lightning Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1ResLightning, "100");
- item1ResLightning = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_RES_MELEE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1ResMelee, buffer, sizeof(buffer));
- item1ResMelee = (float)atoi(buffer);
- if (item1ResMelee < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative melee resistance value!", "Melee Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1ResMelee, "100");
- item1ResMelee = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_RES_RANGE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1ResRange, buffer, sizeof(buffer));
- item1ResRange = (float)atoi(buffer);
- if (item1ResRange < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative range resistance value!", "Range Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1ResRange, "100");
- item1ResRange = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM1_STAT_ARMOR:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1StatArmor, buffer, sizeof(buffer));
- item1StatArmor = (float)atoi(buffer);
- if (item1StatArmor < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative armor value!", "Armor Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1StatArmor, "100");
- item1StatArmor = 100;
- }
- }
- }
- case IDC_ITEM1_STAT_STR:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1StatStr, buffer, sizeof(buffer));
- item1StatStr = (float)atoi(buffer);
- if(item1StatStr < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative strength value!", "Strength Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1StatStr, "100");
- item1StatStr = 100;
- }
- }
- }
- case IDC_ITEM1_STAT_DEX:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1StatDex, buffer, sizeof(buffer));
- item1StatDex = (float)atoi(buffer);
- if(item1StatDex < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative dexterity value!", "Dexterity Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1StatDex, "100");
- item1StatDex = 100;
- }
- }
- }
- case IDC_ITEM1_STAT_VIT:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1StatVit, buffer, sizeof(buffer));
- item1StatVit = (float)atoi(buffer);
- if(item1StatVit < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative vitality value!", "Vitality Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1StatVit, "100");
- item1StatVit = 100;
- }
- }
- }
- case IDC_ITEM1_STAT_INT:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem1StatInt, buffer, sizeof(buffer));
- item1StatInt = (float)atoi(buffer);
- if(item1StatInt < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative strength value!", "Strength Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem1StatInt, "100");
- item1StatInt = 100;
- }
- }
- }
- case IDC_ITEM2_RES_ALL:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2ResAll, buffer, sizeof(buffer));
- item2ResAll = (float)atoi(buffer);
- if (item2ResAll < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative resist all value!", "Resist All Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2ResAll, "100");
- item2ResAll = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM2_RES_FIRE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2ResFire, buffer, sizeof(buffer));
- item2ResFire = (float)atoi(buffer);
- if (item2ResFire < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative fire resistance value!", "Fire Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2ResFire, "100");
- item2ResFire = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM2_RES_COLD:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2ResCold, buffer, sizeof(buffer));
- item2ResCold = (float)atoi(buffer);
- if (item2ResCold < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative cold resistance value!", "Cold Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2ResCold, "100");
- item2ResCold = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM2_RES_POISON:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2ResPoison, buffer, sizeof(buffer));
- item2ResPoison = (float)atoi(buffer);
- if (item2ResPoison < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative poison resistance value!", "Poison Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2ResPoison, "100");
- item2ResPoison = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM2_RES_ARCANE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2ResArcane, buffer, sizeof(buffer));
- item2ResArcane = (float)atoi(buffer);
- if (item2ResArcane < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative arcane resistance value!", "Arcane Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2ResArcane, "100");
- item2ResArcane = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM2_RES_LIGHTNING:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2ResLightning, buffer, sizeof(buffer));
- item2ResLightning = (float)atoi(buffer);
- if (item2ResLightning < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative lightning resistance value!", "Lightning Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2ResLightning, "100");
- item2ResLightning = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM2_RES_MELEE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2ResMelee, buffer, sizeof(buffer));
- item2ResMelee = (float)atoi(buffer);
- if (item2ResMelee < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative melee resistance value!", "Melee Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2ResMelee, "100");
- item2ResMelee = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM2_RES_RANGE:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2ResRange, buffer, sizeof(buffer));
- item2ResRange = (float)atoi(buffer);
- if (item2ResRange < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative range resistance value!", "Range Resist Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2ResRange, "100");
- item2ResRange = 100;
- return 0;
- break;
- }
- }
- }
- case IDC_ITEM2_STAT_ARMOR:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2StatArmor, buffer, sizeof(buffer));
- item2StatArmor = (float)atoi(buffer);
- if (item2StatArmor < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative armor value!", "Armor Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2StatArmor, "100");
- item2StatArmor = 100;
- }
- }
- }
- case IDC_ITEM2_STAT_STR:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2StatStr, buffer, sizeof(buffer));
- item2StatStr = (float)atoi(buffer);
- if(item2StatStr < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative strength value!", "Strength Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2StatStr, "100");
- item2StatStr = 100;
- }
- }
- }
- case IDC_ITEM2_STAT_DEX:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2StatDex, buffer, sizeof(buffer));
- item2StatDex = (float)atoi(buffer);
- if(item2StatDex < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative dexterity value!", "Dexterity Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2StatDex, "100");
- item2StatDex = 100;
- }
- }
- }
- case IDC_ITEM2_STAT_VIT:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2StatVit, buffer, sizeof(buffer));
- item2StatVit = (float)atoi(buffer);
- if(item2StatVit < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative vitality value!", "Vitality Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2StatVit, "100");
- item2StatVit = 100;
- }
- }
- }
- case IDC_ITEM2_STAT_INT:
- {
- if (HIWORD(wParam) == EN_CHANGE)
- {
- char buffer[10];
- GetWindowText(hItem2StatInt, buffer, sizeof(buffer));
- item2StatInt = (float)atoi(buffer);
- if(item2StatInt < 0)
- {
- MessageBox(hWnd, "Please enter a non-negative strength value!", "Strength Out Of Bounds", MB_ICONERROR);
- SetWindowText(hItem2StatInt, "100");
- item2StatInt = 100;
- }
- }
- }
- }
- }
- break;
- case WM_DESTROY:
- {
- PostQuitMessage(0);
- }
- return 0;
- break;
- }
- char buffer[10];
- pEffHP1 = pHP * (1 + pArmor / (50 * mLevel + pArmor)) * (1 + pResAll / (5 * mLevel + pResAll)) * (1 + pResFire / (5 * mLevel + pResFire)) * (1 + pResCold / (5 * mLevel + pResCold)) * (1 + pResPoison / (5 * mLevel + pResPoison)) * (1 + pResArcane / (5 * mLevel + pResArcane)) * (1 + pResMelee / (5 * mLevel + pResMelee)) * (1 + pResRange / (5 * mLevel + pResRange));
- _itoa_s(Round(pEffHP1), buffer, 10);
- SetWindowText(hStatEffectiveHP1, buffer);
- pEffHP2 = pHP * (1 + (item1StatArmor + item1StatStr) / (50 * mLevel + (item1StatArmor + item1StatStr))) * (1 + (item1ResAll + item1StatInt / 10) / (5 * mLevel + (item1ResAll + item1StatInt / 10))) * (1 + (item1ResFire + item1StatInt / 10) / (5 * mLevel + (item1ResFire + item1StatInt / 10))) * (1 + (item1ResCold + item1StatInt / 10) / (5 * mLevel + (item1ResCold + item1StatInt / 10))) * (1 + (item1ResPoison + item1StatInt / 10) / (5 * mLevel + (item1ResPoison + item1StatInt / 10))) * (1 + (item1ResArcane + item1StatInt / 10) / (5 * mLevel + (item1ResArcane + item1StatInt / 10)) * (1 + (item1ResMelee + item1StatInt / 10) / (5 * mLevel + (item1ResMelee + item1StatInt / 10)))) * (1 + (item1ResRange + item1StatInt / 10) / (5 * mLevel + (item1ResRange + item1StatInt / 10)));
- pEffHP3 = pHP * (1 + (item2StatArmor + item2StatStr) / (50 * mLevel + (item2StatArmor + item2StatStr))) * (1 + (item2ResAll + item2StatInt / 10) / (5 * mLevel + (item2ResAll + item2StatInt / 10))) * (1 + (item2ResFire + item2StatInt / 10) / (5 * mLevel + (item2ResFire + item2StatInt / 10))) * (1 + (item2ResCold + item2StatInt / 10) / (5 * mLevel + (item2ResCold + item2StatInt / 10))) * (1 + (item2ResPoison + item2StatInt / 10) / (5 * mLevel + (item2ResPoison + item2StatInt / 10))) * (1 + (item2ResArcane + item2StatInt / 10) / (5 * mLevel + (item2ResArcane + item2StatInt / 10)) * (1 + (item2ResMelee + item2StatInt / 10) / (5 * mLevel + (item2ResMelee + item2StatInt / 10)))) * (1 + (item2ResRange + item2StatInt / 10) / (5 * mLevel + (item2ResRange + item2StatInt / 10)));
- CString str;
- _itoa_s(Round(pEffHP2 - pEffHP3), buffer, 10);
- if (pEffHP2 > pEffHP3)
- str.Format("Comparative Change In Effective Health: +%f", pEffHP2 - pEffHP3);
- else
- str.Format("Comparative Change In Effective Health: -%f", pEffHP3 - pEffHP2);
- SetWindowText(hItemCompareLbl, str);
- return DefWindowProc(hWnd,msg,wParam,lParam);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement