Merge pull request #62 from bbbradsmith/dlgproc_fix
DLGPROC and SetWindowLong fixes
This commit is contained in:
commit
97c9cb0068
|
@ -198,7 +198,7 @@ INT_PTR CWin32InputBox::InputBoxEx(WIN32INPUTBOX_PARAM *param)
|
|||
CWin32InputBox inputbox(param);
|
||||
|
||||
// Resize dialog and SHOW or HIDE multiline
|
||||
INT_PTR r = ::DialogBoxIndirectParam(param->hInstance, dlgTemplate, param->hwndOwner, (DLGPROC)DlgProc, (LPARAM)&inputbox);
|
||||
INT_PTR r = ::DialogBoxIndirectParam(param->hInstance, dlgTemplate, param->hwndOwner, DlgProc, (LPARAM)&inputbox);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
@ -310,16 +310,16 @@ void CWin32InputBox::InitDialog()
|
|||
}
|
||||
|
||||
// Message handler for about box.
|
||||
LRESULT CALLBACK CWin32InputBox::DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK CWin32InputBox::DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
CWin32InputBox *_this = (CWin32InputBox *) ::GetWindowLong(hDlg, GWL_USERDATA);
|
||||
CWin32InputBox *_this = (CWin32InputBox *) ::GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||
WIN32INPUTBOX_PARAM *param = _this ? _this->GetParam() : 0;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
::SetWindowLong(hDlg, GWL_USERDATA, (LONG) lParam);
|
||||
::SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
|
||||
|
||||
_this = (CWin32InputBox *) lParam;
|
||||
_this->_param->hDlg = hDlg;
|
||||
|
|
|
@ -73,7 +73,7 @@ class CWin32InputBox
|
|||
{
|
||||
private:
|
||||
WIN32INPUTBOX_PARAM *_param;
|
||||
static LRESULT CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||
static INT_PTR CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||
HWND _hwndEditCtrl;
|
||||
|
||||
void InitDialog();
|
||||
|
|
|
@ -275,7 +275,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static BOOL CALLBACK ArchiveFileSelectorCallback(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK ArchiveFileSelectorCallback(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ bool autoloadCDL = true;
|
|||
bool autoresumeCDLogging = false;
|
||||
char loadedcdfile[2048] = {0};
|
||||
|
||||
BOOL CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK CDLoggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -288,7 +288,7 @@ HWND InitializeCheatList(HWND hwnd)
|
|||
return hwndChtList;
|
||||
}
|
||||
|
||||
BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
switch (uMsg)
|
||||
|
@ -341,16 +341,16 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
SendDlgItemMessage(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT, EM_SETLIMITTEXT, 8, 0);
|
||||
|
||||
// limit their characters
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_ADDR), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_ADDR), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_COM), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_KNOWN), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_NE_BY), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_GT_BY), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_LT_BY), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_TEXT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_ADDR), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_ADDR), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_VAL), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_COM), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_KNOWN), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_NE_BY), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_GT_BY), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_VAL_LT_BY), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_TEXT), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CHEAT_GAME_GENIE_TEXT), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
|
||||
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ void UpdateCheatsAdded()
|
|||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
|
||||
BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// int i;
|
||||
extern void GetUIGGInfo(HWND hwndDlg, uint32* a, uint8* v, int* c);
|
||||
|
@ -1092,10 +1092,10 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
SendDlgItemMessage(hwndDlg, IDC_GAME_GENIE_VAL, WM_SETFONT, (WPARAM)hNewFont, FALSE);
|
||||
|
||||
// limit their characters
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_GAME_GENIE_CODE), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_GAME_GENIE_ADDR), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_GAME_GENIE_COMP), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_GAME_GENIE_VAL), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GAME_GENIE_CODE), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GAME_GENIE_ADDR), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GAME_GENIE_COMP), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_GAME_GENIE_VAL), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
}
|
||||
break;
|
||||
case WM_CLOSE:
|
||||
|
|
|
@ -38,7 +38,7 @@ void SetupCheatFont(HWND hDlg);
|
|||
void DeleteCheatFont();
|
||||
extern POINT CalcSubWindowPos(HWND hDlg, POINT* conf);
|
||||
|
||||
extern BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
extern INT_PTR CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
extern LRESULT APIENTRY FilterEditCtrlProc(HWND hDlg, UINT msg, WPARAM wP, LPARAM lP);
|
||||
extern WNDPROC DefaultEditCtrlProc;
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ static void UpdateDialog(HWND hwndDlg) {
|
|||
//CheckDlgButton(hwndDlg,IDC_ADDBP_MEM_SPR,BST_UNCHECKED);
|
||||
}
|
||||
|
||||
BOOL CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char str[8] = {0};
|
||||
int tmp;
|
||||
|
@ -279,8 +279,8 @@ BOOL CALLBACK AddbpCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
SendDlgItemMessage(hwndDlg, IDC_ADDBP_ADDR_START, EM_SETLIMITTEXT, 4, 0);
|
||||
SendDlgItemMessage(hwndDlg, IDC_ADDBP_ADDR_END, EM_SETLIMITTEXT, 4, 0);
|
||||
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_ADDBP_ADDR_START), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_ADDBP_ADDR_END), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_ADDBP_ADDR_START), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_ADDBP_ADDR_END), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
|
||||
if (WP_edit >= 0)
|
||||
{
|
||||
|
@ -1228,7 +1228,7 @@ int AddAsmHistory(HWND hwndDlg, int id, char *str) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
BOOL CALLBACK AssemblerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
INT_PTR CALLBACK AssemblerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
int romaddr,count,i,j;
|
||||
char str[128],*dasm;
|
||||
static int patchlen,applied,saved,lastundo;
|
||||
|
@ -1362,7 +1362,7 @@ BOOL CALLBACK AssemblerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK PatcherCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
INT_PTR CALLBACK PatcherCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
char str[64]; //mbg merge 7/18/06 changed from unsigned char
|
||||
uint8 *c;
|
||||
int i;
|
||||
|
@ -1760,7 +1760,7 @@ BOOL CALLBACK IDC_DEBUGGER_DISASSEMBLY_WndProc(HWND hwndDlg, UINT uMsg, WPARAM w
|
|||
return CallWindowProc(IDC_DEBUGGER_DISASSEMBLY_oldWndProc, hwndDlg, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
RECT wrect;
|
||||
char str[256] = {0};
|
||||
|
@ -1825,12 +1825,12 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_SPR,EM_SETLIMITTEXT,2,0);
|
||||
|
||||
// limit input
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_PCSEEK), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_PC), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_A), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_X), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_Y), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_BOOKMARK), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_PCSEEK), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_PC), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_A), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_X), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DEBUGGER_VAL_Y), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DEBUGGER_BOOKMARK), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
|
||||
//I'm lazy, disable the controls which I can't mess with right now
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PPU,EM_SETREADONLY,TRUE,0);
|
||||
|
@ -1851,7 +1851,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
hDisasmcontext = LoadMenu(fceu_hInstance,"DISASMCONTEXTMENUS");
|
||||
|
||||
// subclass editfield
|
||||
IDC_DEBUGGER_DISASSEMBLY_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_DEBUGGER_DISASSEMBLY), GWL_WNDPROC, (LONG)IDC_DEBUGGER_DISASSEMBLY_WndProc);
|
||||
IDC_DEBUGGER_DISASSEMBLY_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DEBUGGER_DISASSEMBLY), GWLP_WNDPROC, (LONG_PTR)IDC_DEBUGGER_DISASSEMBLY_WndProc);
|
||||
|
||||
debugger_open = 1;
|
||||
inDebugger = true;
|
||||
|
|
|
@ -70,6 +70,6 @@ public:
|
|||
} *debugSystem;
|
||||
|
||||
// extern WNDPROC DefaultEditCtrlProc;
|
||||
// extern LRESULT APIENTRY FilterEditCtrlProc(HWND hwnd, UINT msg, WPARAM wP, LPARAM lP);
|
||||
// extern INT_PTR APIENTRY FilterEditCtrlProc(HWND hwnd, UINT msg, WPARAM wP, LPARAM lP);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -62,7 +62,7 @@ int debuggerWasActive = 0;
|
|||
char temp_chr[40] = {0};
|
||||
char delimiterChar[2] = "#";
|
||||
|
||||
extern BOOL CALLBACK nameBookmarkCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
extern INT_PTR CALLBACK nameBookmarkCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
extern char bookmarkDescription[];
|
||||
|
||||
MemoryMappedRegister RegNames[] = {
|
||||
|
@ -919,7 +919,7 @@ void GoToDebuggerBookmark(HWND hwnd)
|
|||
Disassemble(hwnd, IDC_DEBUGGER_DISASSEMBLY, IDC_DEBUGGER_DISASSEMBLY_VSCR, n);
|
||||
}
|
||||
|
||||
BOOL CALLBACK SymbolicNamingCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK SymbolicNamingCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ void CloseDirectoriesDialog(HWND hwndDlg)
|
|||
}
|
||||
|
||||
///Callback function for the directories configuration dialog.
|
||||
static BOOL CALLBACK DirConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK DirConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -107,7 +107,7 @@ void CloseGuiDialog(HWND hwndDlg)
|
|||
/**
|
||||
* Message loop of the GUI configuration dialog.
|
||||
**/
|
||||
BOOL CALLBACK GUIConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK GUIConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -281,32 +281,32 @@ HWND InitHeaderEditDialog(HWND hwnd, iNES_HEADER* header)
|
|||
|
||||
// Assign ID to the sub edit control in these comboboxes
|
||||
// PRG ROM
|
||||
SetWindowLong(GetWindow(GetDlgItem(hwnd, IDC_PRGROM_COMBO), GW_CHILD), GWL_ID, IDC_PRGROM_EDIT);
|
||||
SetWindowLongPtr(GetWindow(GetDlgItem(hwnd, IDC_PRGROM_COMBO), GW_CHILD), GWL_ID, IDC_PRGROM_EDIT);
|
||||
// PRG RAM
|
||||
SetWindowLong(GetWindow(GetDlgItem(hwnd, IDC_PRGRAM_COMBO), GW_CHILD), GWL_ID, IDC_PRGRAM_EDIT);
|
||||
SetWindowLongPtr(GetWindow(GetDlgItem(hwnd, IDC_PRGRAM_COMBO), GW_CHILD), GWL_ID, IDC_PRGRAM_EDIT);
|
||||
// PRG NVRAM
|
||||
SetWindowLong(GetWindow(GetDlgItem(hwnd, IDC_PRGNVRAM_COMBO), GW_CHILD), GWL_ID, IDC_PRGNVRAM_EDIT);
|
||||
SetWindowLongPtr(GetWindow(GetDlgItem(hwnd, IDC_PRGNVRAM_COMBO), GW_CHILD), GWL_ID, IDC_PRGNVRAM_EDIT);
|
||||
// CHR ROM
|
||||
SetWindowLong(GetWindow(GetDlgItem(hwnd, IDC_CHRROM_COMBO), GW_CHILD), GWL_ID, IDC_CHRROM_EDIT);
|
||||
SetWindowLongPtr(GetWindow(GetDlgItem(hwnd, IDC_CHRROM_COMBO), GW_CHILD), GWL_ID, IDC_CHRROM_EDIT);
|
||||
// CHR RAM
|
||||
SetWindowLong(GetWindow(GetDlgItem(hwnd, IDC_CHRRAM_COMBO), GW_CHILD), GWL_ID, IDC_CHRRAM_EDIT);
|
||||
SetWindowLongPtr(GetWindow(GetDlgItem(hwnd, IDC_CHRRAM_COMBO), GW_CHILD), GWL_ID, IDC_CHRRAM_EDIT);
|
||||
// CHR NVRAM
|
||||
SetWindowLong(GetWindow(GetDlgItem(hwnd, IDC_CHRNVRAM_COMBO), GW_CHILD), GWL_ID, IDC_CHRNVRAM_EDIT);
|
||||
SetWindowLongPtr(GetWindow(GetDlgItem(hwnd, IDC_CHRNVRAM_COMBO), GW_CHILD), GWL_ID, IDC_CHRNVRAM_EDIT);
|
||||
|
||||
|
||||
// Change the default wndproc of these control to limit their text
|
||||
// PRG ROM
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(GetDlgItem(hwnd, IDC_PRGROM_COMBO), IDC_PRGROM_EDIT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(GetDlgItem(hwnd, IDC_PRGROM_COMBO), IDC_PRGROM_EDIT), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
// PRG RAM
|
||||
SetWindowLong(GetDlgItem(GetDlgItem(hwnd, IDC_PRGRAM_COMBO), IDC_PRGRAM_EDIT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(GetDlgItem(hwnd, IDC_PRGRAM_COMBO), IDC_PRGRAM_EDIT), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
// PRG NVRAM
|
||||
SetWindowLong(GetDlgItem(GetDlgItem(hwnd, IDC_PRGNVRAM_COMBO), IDC_PRGNVRAM_EDIT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(GetDlgItem(hwnd, IDC_PRGNVRAM_COMBO), IDC_PRGNVRAM_EDIT), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
// CHR ROM
|
||||
SetWindowLong(GetDlgItem(GetDlgItem(hwnd, IDC_CHRROM_COMBO), IDC_CHRROM_EDIT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(GetDlgItem(hwnd, IDC_CHRROM_COMBO), IDC_CHRROM_EDIT), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
// CHR RAM
|
||||
SetWindowLong(GetDlgItem(GetDlgItem(hwnd, IDC_CHRRAM_COMBO), IDC_CHRRAM_EDIT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(GetDlgItem(hwnd, IDC_CHRRAM_COMBO), IDC_CHRRAM_EDIT), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
// CHR NVRAM
|
||||
SetWindowLong(GetDlgItem(GetDlgItem(hwnd, IDC_CHRNVRAM_COMBO), IDC_CHRNVRAM_EDIT), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(GetDlgItem(hwnd, IDC_CHRNVRAM_COMBO), IDC_CHRNVRAM_EDIT), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
|
||||
|
||||
ToggleINES20(hwnd, IsDlgButtonChecked(hwnd, IDC_RADIO_VERSION_INES20) == BST_CHECKED);
|
||||
|
@ -496,7 +496,7 @@ void ToggleUnofficialPrgRamPresent(HWND hwnd, bool ines20, bool unofficial_check
|
|||
EnableWindow(GetDlgItem(hwnd, IDC_PRGRAM_COMBO), enable);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK HeaderEditorProc(HWND hDlg, UINT uMsg, WPARAM wP, LPARAM lP)
|
||||
INT_PTR CALLBACK HeaderEditorProc(HWND hDlg, UINT uMsg, WPARAM wP, LPARAM lP)
|
||||
{
|
||||
|
||||
static iNES_HEADER* header;
|
||||
|
@ -599,7 +599,7 @@ void DoHeadEdit()
|
|||
if (GameInfo)
|
||||
{
|
||||
if (LoadHeader(hAppWnd, header))
|
||||
CreateDialogParam(fceu_hInstance, MAKEINTRESOURCE(IDD_EDIT_HEADER), hAppWnd, (DLGPROC)HeaderEditorProc, (LPARAM)header);
|
||||
CreateDialogParam(fceu_hInstance, MAKEINTRESOURCE(IDD_EDIT_HEADER), hAppWnd, HeaderEditorProc, (LPARAM)header);
|
||||
else
|
||||
free(header);
|
||||
}
|
||||
|
@ -607,7 +607,7 @@ void DoHeadEdit()
|
|||
// temporarily borrow LoadedRomFName, when no game is loaded, it is unused.
|
||||
LoadedRomFName[0] = 0;
|
||||
if (ShowINESFileBox(hAppWnd) && LoadHeader(hAppWnd, header))
|
||||
DialogBoxParam(fceu_hInstance, MAKEINTRESOURCE(IDD_EDIT_HEADER), hAppWnd, (DLGPROC)HeaderEditorProc, (LPARAM)header);
|
||||
DialogBoxParam(fceu_hInstance, MAKEINTRESOURCE(IDD_EDIT_HEADER), hAppWnd, HeaderEditorProc, (LPARAM)header);
|
||||
else
|
||||
free(header);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ bool GetComboBoxListItemData(HWND hwnd, UINT id, int* value, char* buf, bool exa
|
|||
bool SaveINESFile(HWND hwnd, char* path, iNES_HEADER* header);
|
||||
|
||||
|
||||
LRESULT CALLBACK HeaderEditorProc(HWND hDlg, UINT uMsg, WPARAM wP, LPARAM lP);
|
||||
INT_PTR CALLBACK HeaderEditorProc(HWND hDlg, UINT uMsg, WPARAM wP, LPARAM lP);
|
||||
extern WNDPROC DefaultEditCtrlProc;
|
||||
extern LRESULT APIENTRY FilterEditCtrlProc(HWND hwnd, UINT msg, WPARAM wP, LPARAM lP);
|
||||
|
||||
|
|
|
@ -842,7 +842,7 @@ static const uint8 *DWBText;
|
|||
|
||||
static HWND die;
|
||||
|
||||
static BOOL CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
switch(uMsg) {
|
||||
|
@ -1060,7 +1060,7 @@ static const char *DoTBTitle=0;
|
|||
static int DoTBMax=0;
|
||||
static int DoTBType=0,DoTBPort=0;
|
||||
|
||||
static BOOL CALLBACK DoTBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK DoTBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
|
@ -1208,7 +1208,7 @@ static void UpdateFourscoreState(HWND dlg)
|
|||
}
|
||||
|
||||
//Callback function of the input configuration dialog.
|
||||
BOOL CALLBACK InputConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK InputConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -73,7 +73,7 @@ void RedoText(void)
|
|||
/**
|
||||
* Callback function for the log window.
|
||||
**/
|
||||
BOOL CALLBACK LogCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK LogCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
RECT wrect; //For remembering window position
|
||||
switch(uMsg)
|
||||
|
|
|
@ -332,7 +332,7 @@ char* GetKeyComboName(int c)
|
|||
}
|
||||
|
||||
//Callback function for the dialog where the user can change hotkeys.
|
||||
BOOL CALLBACK ChangeInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK ChangeInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static HANDLE hThread = NULL;
|
||||
static DWORD dwThreadId = 0;
|
||||
|
@ -702,7 +702,7 @@ void ApplyDefaultCommandMapping()
|
|||
/**
|
||||
* Callback function of the Map Input dialog
|
||||
**/
|
||||
BOOL CALLBACK MapInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK MapInputDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -142,7 +142,7 @@ int GetHexScreenCoordy(int offset);
|
|||
int GetAddyFromCoord(int x,int y);
|
||||
void AutoScrollFromCoord(int x,int y);
|
||||
LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
BOOL CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
void FindNext();
|
||||
void OpenFindDialog();
|
||||
static int GetFileData(uint32 offset);
|
||||
|
@ -2218,7 +2218,7 @@ void DoMemView()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
INT_PTR CALLBACK MemFindCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
|
||||
switch(uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
|
|
|
@ -57,7 +57,7 @@ char bookmarkDescription[51] = {0};
|
|||
BOOL CenterWindow(HWND hwndDlg);
|
||||
|
||||
/// Callback function for the name bookmark dialog
|
||||
BOOL CALLBACK nameBookmarkCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK nameBookmarkCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
|
|
|
@ -728,7 +728,7 @@ void ClearAllText()
|
|||
fileChanged = false;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
const int FMAX = 6;
|
||||
string formula[FMAX] = {"> than", "> by 1", "< than", "< by 1", "equal", "!equal"};
|
||||
|
@ -795,7 +795,7 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||
|
||||
// experimental: limit the text length and input to hex values
|
||||
SendDlgItemMessage(hwndDlg, MW_ADDR[i], EM_SETLIMITTEXT, 4, 0);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, MW_ADDR[i]), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, MW_ADDR[i]), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
}
|
||||
|
||||
//Populate Formula pulldown menus
|
||||
|
|
|
@ -219,7 +219,7 @@ unsigned int ruleBox_to_ruleInput(unsigned int ruleBox)
|
|||
return ruleBox - RULE_BOX_1 + RULE_INPUT_1;
|
||||
}
|
||||
|
||||
BOOL CALLBACK MonitorCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK MonitorCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg) {
|
||||
case WM_MOVE: {
|
||||
|
|
|
@ -53,7 +53,7 @@ void CloseMovieOptionsDialog(HWND hwndDlg)
|
|||
/**
|
||||
* Callback function of the Timing configuration dialog.
|
||||
**/
|
||||
BOOL CALLBACK MovieOptionsCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK MovieOptionsCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -393,7 +393,7 @@ CFGSTRUCT NetplayConfig[]={
|
|||
};
|
||||
|
||||
|
||||
static BOOL CALLBACK NetCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK NetCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -435,7 +435,7 @@ void KillNTView() {
|
|||
NTViewSkip=0;
|
||||
}
|
||||
|
||||
BOOL CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
INT_PTR CALLBACK NTViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
RECT wrect;
|
||||
char str[50];
|
||||
int TileID, TileX, TileY, NameTable, PPUAddress, AttAddress, Attrib;
|
||||
|
|
|
@ -69,7 +69,7 @@ int LoadPaletteFile()
|
|||
/**
|
||||
* Callback function for the palette configuration dialog.
|
||||
**/
|
||||
BOOL CALLBACK PaletteConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK PaletteConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char text[40];
|
||||
switch(uMsg)
|
||||
|
|
|
@ -364,7 +364,7 @@ void KillPPUView()
|
|||
PPUViewSkip=0;
|
||||
}
|
||||
|
||||
BOOL CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK PPUViewCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
RECT wrect;
|
||||
char str[20];
|
||||
|
|
|
@ -1101,15 +1101,15 @@ void ReopenRamWindows() //Reopen them when a new Rom is loaded
|
|||
if(!RamSearchHWnd)
|
||||
{
|
||||
reset_address_info();
|
||||
LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
RamSearchHWnd = CreateDialog(hInst, MAKEINTRESOURCE(IDD_RAMSEARCH), hWnd, (DLGPROC) RamSearchProc);
|
||||
INT_PTR CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
RamSearchHWnd = CreateDialog(hInst, MAKEINTRESOURCE(IDD_RAMSEARCH), hWnd, RamSearchProc);
|
||||
}
|
||||
|
||||
if (AutoRWLoad)
|
||||
OpenRWRecentFile(0);
|
||||
|
||||
if (!RamWatchHWnd)
|
||||
RamWatchHWnd = CreateDialog(hInst, MAKEINTRESOURCE(IDD_RAMWATCH), hWnd, (DLGPROC) RamWatchProc);
|
||||
RamWatchHWnd = CreateDialog(hInst, MAKEINTRESOURCE(IDD_RAMWATCH), hWnd, RamWatchProc);
|
||||
|
||||
if (hwnd == hWnd && hwnd != GetActiveWindow())
|
||||
SetActiveWindow(hWnd); // restore focus to the main window if it had it before
|
||||
|
@ -1395,7 +1395,7 @@ static BOOL SelectingByKeyboard()
|
|||
return (a | b | c | d) & 0x80;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
static int watchIndex=0;
|
||||
|
@ -1526,7 +1526,7 @@ LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
{
|
||||
case NM_CUSTOMDRAW:
|
||||
{
|
||||
SetWindowLong(hDlg, DWL_MSGRESULT, CustomDraw(lParam));
|
||||
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CustomDraw(lParam));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ void SetSearchType(int SearchType); //Set the search type
|
|||
void DoRamSearchOperation(); //Perform a search
|
||||
|
||||
extern HWND RamSearchHWnd;
|
||||
extern LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
extern INT_PTR CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
extern POINT CalcSubWindowPos(HWND hDlg, POINT* conf);
|
||||
|
||||
// Too much work to do for resorting the values, and finding the biggest number
|
||||
|
|
|
@ -155,7 +155,7 @@ bool InsertWatch(const AddressWatcher& Watch, HWND parent)
|
|||
|
||||
rswatches[tmpWatchIndex] = Watch;
|
||||
rswatches[tmpWatchIndex].CurValue = GetCurrentValue(rswatches[tmpWatchIndex]);
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), parent, (DLGPROC)EditWatchProc, tmpWatchIndex);
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), parent, EditWatchProc, tmpWatchIndex);
|
||||
rswatches.erase(tmpWatchIndex);
|
||||
|
||||
return WatchCount > prevWatchCount;
|
||||
|
@ -171,7 +171,7 @@ bool InsertWatches(const AddressWatcher* watches, HWND parent, const int count)
|
|||
char comment[256];
|
||||
rswatches[-1] = watches[0];
|
||||
rswatches[-1].comment = comment;
|
||||
if(DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), parent, (DLGPROC)EditWatchProc, (LPARAM)-1))
|
||||
if(DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), parent, EditWatchProc, (LPARAM)-1))
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
AddressWatcher watcher = watches[i];
|
||||
|
@ -776,7 +776,7 @@ void RefreshWatchListSelectedItemControlStatus(HWND hDlg)
|
|||
}
|
||||
}
|
||||
|
||||
LRESULT CALLBACK EditWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) //Gets info for a RAM Watch, and then inserts it into the Watch List
|
||||
INT_PTR CALLBACK EditWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) //Gets info for a RAM Watch, and then inserts it into the Watch List
|
||||
{
|
||||
|
||||
// since there are 3 windows can pops up the add watch dialog, we should store them separately.
|
||||
|
@ -1015,7 +1015,7 @@ void RefreshWatchListSelectedCountControlStatus(HWND hDlg, int newComer)
|
|||
}
|
||||
}
|
||||
|
||||
LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static int watchIndex = 0; // current watch index
|
||||
static bool listFocus;
|
||||
|
@ -1180,7 +1180,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
// disable search by keyboard typing,
|
||||
// because it interferes with some of the accelerators
|
||||
// and it isn't very useful here anyway
|
||||
SetWindowLong(hDlg, DWL_MSGRESULT, ListView_GetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST)));
|
||||
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, ListView_GetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST)));
|
||||
return 1;
|
||||
}
|
||||
case NM_SETFOCUS:
|
||||
|
@ -1197,12 +1197,12 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
switch (nmcd->dwDrawStage)
|
||||
{
|
||||
case CDDS_PREPAINT:
|
||||
SetWindowLong(hDlg, DWL_MSGRESULT, CDRF_NOTIFYITEMDRAW);
|
||||
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CDRF_NOTIFYITEMDRAW);
|
||||
break;
|
||||
case CDDS_ITEMPREPAINT:
|
||||
if (rswatches[nmcd->dwItemSpec].Type == 'S')
|
||||
// A separator looks very different from normal watches, it should be drawn in another space while I want to use the highlight bar and the focus frame from the system.
|
||||
SetWindowLong(hDlg, DWL_MSGRESULT, CDRF_NOTIFYPOSTPAINT);
|
||||
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CDRF_NOTIFYPOSTPAINT);
|
||||
else
|
||||
{
|
||||
NMLVCUSTOMDRAW* lplvcd = (NMLVCUSTOMDRAW*)lParam;
|
||||
|
@ -1210,7 +1210,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
{
|
||||
default:
|
||||
case 0:
|
||||
SetWindowLong(hDlg, DWL_MSGRESULT, CDRF_DODEFAULT);
|
||||
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CDRF_DODEFAULT);
|
||||
return TRUE;
|
||||
case 1:
|
||||
lplvcd->clrTextBk = RGB(216, 203, 253); break;
|
||||
|
@ -1222,7 +1222,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
lplvcd->clrTextBk = RGB(175, 94, 253);
|
||||
lplvcd->clrText = RGB(255, 255, 255); break; // use a more visual color in dark background
|
||||
}
|
||||
SetWindowLong(hDlg, DWL_MSGRESULT, CDRF_NEWFONT);
|
||||
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CDRF_NEWFONT);
|
||||
}
|
||||
break;
|
||||
case CDDS_ITEMPOSTPAINT:
|
||||
|
@ -1301,7 +1301,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
watchIndex = ListView_GetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST));
|
||||
if(watchIndex != -1)
|
||||
{
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, (DLGPROC)EditWatchProc, watchIndex);
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, EditWatchProc, watchIndex);
|
||||
SetFocus(GetDlgItem(hDlg,IDC_WATCHLIST));
|
||||
}
|
||||
return true;
|
||||
|
@ -1312,7 +1312,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
target.WrongEndian = 0;
|
||||
target.Size = 'b';
|
||||
target.Type = 's';
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, (DLGPROC)EditWatchProc, WatchCount);
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, EditWatchProc, WatchCount);
|
||||
SetFocus(GetDlgItem(hDlg, IDC_WATCHLIST));
|
||||
return true;
|
||||
}
|
||||
|
@ -1326,7 +1326,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
AddressWatcher* source = &rswatches[watchIndex];
|
||||
memcpy(target, source, sizeof(AddressWatcher));
|
||||
target->comment = strcpy(str_tmp, source->comment);
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, (DLGPROC)EditWatchProc, WatchCount);
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, EditWatchProc, WatchCount);
|
||||
SetFocus(GetDlgItem(hDlg, IDC_WATCHLIST));
|
||||
}
|
||||
return true;
|
||||
|
@ -1339,7 +1339,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
target->Size = 'S';
|
||||
target->Type = 'S';
|
||||
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, (DLGPROC)EditWatchProc, (LPARAM)WatchCount);
|
||||
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_EDITWATCH), hDlg, EditWatchProc, (LPARAM)WatchCount);
|
||||
|
||||
// InsertWatch(separator, "----------------------------");
|
||||
SetFocus(GetDlgItem(hDlg, IDC_WATCHLIST));
|
||||
|
|
|
@ -70,8 +70,8 @@ bool Load_Watches(bool clear, const char* filename);
|
|||
void RWAddRecentFile(const char *filename);
|
||||
void UpdateWatchCheats();
|
||||
|
||||
LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
LRESULT CALLBACK EditWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK EditWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
extern HWND RamWatchHWnd;
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ void AbsoluteToRelative(char *const dst, const char *const dir, const char *cons
|
|||
}
|
||||
|
||||
|
||||
BOOL CALLBACK ReplayMetadataDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK ReplayMetadataDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
RECT wrect;
|
||||
switch(uMsg)
|
||||
|
@ -502,7 +502,7 @@ void HandleScan(HWND hwndDlg, FCEUFILE* file, int& i)
|
|||
SendDlgItemMessage(hwndDlg, IDC_COMBO_FILENAME, CB_INSERTSTRING, i++, (LPARAM)relative);
|
||||
}
|
||||
|
||||
BOOL CALLBACK ReplayDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK ReplayDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
@ -841,7 +841,7 @@ static void UpdateRecordDialogPath(HWND hwndDlg, const std::string &fname)
|
|||
}
|
||||
}
|
||||
|
||||
static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static INT_PTR CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static struct CreateMovieParameters* p = NULL;
|
||||
|
||||
|
|
|
@ -500,7 +500,7 @@ static void UpdateSD(HWND hwndDlg)
|
|||
UpdateSoundChannelQualityMode(hwndDlg);
|
||||
}
|
||||
|
||||
BOOL CALLBACK SoundConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK SoundConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
switch(uMsg) {
|
||||
|
|
|
@ -245,7 +245,7 @@ void updateTASEditor()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL CALLBACK newProjectProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK newProjectProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static struct NewProjectParameters* p = NULL;
|
||||
switch (message)
|
||||
|
@ -518,7 +518,7 @@ void SaveCompact_GetDialogItems(HWND hwndDlg)
|
|||
else
|
||||
taseditorConfig.saveCompact_GreenzoneSavingMode = GREENZONE_SAVING_MODE_NO;
|
||||
}
|
||||
BOOL CALLBACK SaveCompactProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK SaveCompactProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
|
@ -655,7 +655,7 @@ void importInputData()
|
|||
}
|
||||
}
|
||||
|
||||
BOOL CALLBACK aboutWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK aboutWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
|
@ -678,7 +678,7 @@ BOOL CALLBACK aboutWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK savingOptionsWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK savingOptionsWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
|
@ -768,7 +768,7 @@ BOOL CALLBACK savingOptionsWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LP
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK ExportProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK ExportProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
|
|
|
@ -78,7 +78,7 @@ void BOOKMARKS::init()
|
|||
// prepare bookmarks listview
|
||||
ListView_SetExtendedListViewStyleEx(hwndBookmarksList, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
|
||||
// subclass the listview
|
||||
hwndBookmarksList_oldWndProc = (WNDPROC)SetWindowLong(hwndBookmarksList, GWL_WNDPROC, (LONG)BookmarksListWndProc);
|
||||
hwndBookmarksList_oldWndProc = (WNDPROC)SetWindowLongPtr(hwndBookmarksList, GWLP_WNDPROC, (LONG_PTR)BookmarksListWndProc);
|
||||
// setup images for the listview
|
||||
hImgList = ImageList_Create(11, 13, ILC_COLOR8 | ILC_MASK, 1, 1);
|
||||
HBITMAP bmp = LoadBitmap(fceu_hInstance, MAKEINTRESOURCE(IDB_BITMAP0));
|
||||
|
|
|
@ -56,7 +56,7 @@ void BRANCHES::init()
|
|||
free();
|
||||
|
||||
// subclass BranchesBitmap
|
||||
hwndBranchesBitmap_oldWndProc = (WNDPROC)SetWindowLong(bookmarks.hwndBranchesBitmap, GWL_WNDPROC, (LONG)BranchesBitmapWndProc);
|
||||
hwndBranchesBitmap_oldWndProc = (WNDPROC)SetWindowLongPtr(bookmarks.hwndBranchesBitmap, GWLP_WNDPROC, (LONG_PTR)BranchesBitmapWndProc);
|
||||
|
||||
// init arrays
|
||||
branchX.resize(TOTAL_BOOKMARKS+1);
|
||||
|
|
|
@ -116,7 +116,7 @@ void HISTORY::init()
|
|||
hwndHistoryList = GetDlgItem(taseditorWindow.hwndTASEditor, IDC_HISTORYLIST);
|
||||
ListView_SetExtendedListViewStyleEx(hwndHistoryList, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
|
||||
// subclass the listview
|
||||
hwndHistoryList_oldWndProc = (WNDPROC)SetWindowLong(hwndHistoryList, GWL_WNDPROC, (LONG)historyListWndProc);
|
||||
hwndHistoryList_oldWndProc = (WNDPROC)SetWindowLongPtr(hwndHistoryList, GWLP_WNDPROC, (LONG_PTR)historyListWndProc);
|
||||
LVCOLUMN lvc;
|
||||
lvc.mask = LVCF_WIDTH | LVCF_FMT;
|
||||
lvc.cx = HISTORY_LIST_WIDTH;
|
||||
|
|
|
@ -619,7 +619,7 @@ void MARKERS_MANAGER::updateEditedMarkerNote()
|
|||
}
|
||||
}
|
||||
// ------------------------------------------------------------------------------------
|
||||
BOOL CALLBACK findNoteWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK findNoteWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
extern MARKERS_MANAGER markersManager;
|
||||
switch (message)
|
||||
|
|
|
@ -141,9 +141,9 @@ void PIANO_ROLL::init()
|
|||
ListView_SetExtendedListViewStyleEx(hwndList, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
|
||||
// subclass the header
|
||||
hwndHeader = ListView_GetHeader(hwndList);
|
||||
hwndHeaderOldWndproc = (WNDPROC)SetWindowLong(hwndHeader, GWL_WNDPROC, (LONG)headerWndProc);
|
||||
hwndHeaderOldWndproc = (WNDPROC)SetWindowLongPtr(hwndHeader, GWLP_WNDPROC, (LONG_PTR)headerWndProc);
|
||||
// subclass the whole listview
|
||||
hwndListOldWndProc = (WNDPROC)SetWindowLong(hwndList, GWL_WNDPROC, (LONG)listWndProc);
|
||||
hwndListOldWndProc = (WNDPROC)SetWindowLongPtr(hwndList, GWLP_WNDPROC, (LONG_PTR)listWndProc);
|
||||
// disable Visual Themes for header
|
||||
SetWindowTheme(hwndHeader, L"", L"");
|
||||
// setup images for the listview
|
||||
|
|
|
@ -65,7 +65,7 @@ void PLAYBACK::init()
|
|||
SendMessage(hwndPlaybackMarkerEditField, EM_SETLIMITTEXT, MAX_NOTE_LEN - 1, 0);
|
||||
SendMessage(hwndPlaybackMarkerEditField, WM_SETFONT, (WPARAM)pianoRoll.hMarkersEditFont, 0);
|
||||
// subclass the edit control
|
||||
playbackMarkerEdit_oldWndproc = (WNDPROC)SetWindowLong(hwndPlaybackMarkerEditField, GWL_WNDPROC, (LONG)UpperMarkerEditWndProc);
|
||||
playbackMarkerEdit_oldWndproc = (WNDPROC)SetWindowLongPtr(hwndPlaybackMarkerEditField, GWLP_WNDPROC, (LONG_PTR)UpperMarkerEditWndProc);
|
||||
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ void SELECTION::init()
|
|||
SendMessage(hwndSelectionMarkerEditField, EM_SETLIMITTEXT, MAX_NOTE_LEN - 1, 0);
|
||||
SendMessage(hwndSelectionMarkerEditField, WM_SETFONT, (WPARAM)pianoRoll.hMarkersEditFont, 0);
|
||||
// subclass the edit control
|
||||
selectionMarkerEdit_oldWndproc = (WNDPROC)SetWindowLong(hwndSelectionMarkerEditField, GWL_WNDPROC, (LONG)LowerMarkerEditWndProc);
|
||||
selectionMarkerEdit_oldWndproc = (WNDPROC)SetWindowLongPtr(hwndSelectionMarkerEditField, GWLP_WNDPROC, (LONG_PTR)LowerMarkerEditWndProc);
|
||||
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -53,12 +53,12 @@ extern bool mustCallManualLuaFunction;
|
|||
|
||||
extern char* GetKeyComboName(int c);
|
||||
|
||||
extern BOOL CALLBACK findNoteWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
extern BOOL CALLBACK aboutWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
extern BOOL CALLBACK savingOptionsWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
extern INT_PTR CALLBACK findNoteWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
extern INT_PTR CALLBACK aboutWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
extern INT_PTR CALLBACK savingOptionsWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
// main window wndproc
|
||||
BOOL CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
// wndprocs for "Marker X" text fields
|
||||
LRESULT APIENTRY IDC_PLAYBACK_MARKER_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
LRESULT APIENTRY IDC_SELECTION_MARKER_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
@ -264,33 +264,33 @@ void TASEDITOR_WINDOW::init()
|
|||
updateTooltips();
|
||||
toggleTooltips();
|
||||
// subclass "Marker X" text fields
|
||||
IDC_PLAYBACK_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_PLAYBACK_MARKER), GWL_WNDPROC, (LONG)IDC_PLAYBACK_MARKER_WndProc);
|
||||
IDC_SELECTION_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_SELECTION_MARKER), GWL_WNDPROC, (LONG)IDC_SELECTION_MARKER_WndProc);
|
||||
IDC_PLAYBACK_MARKER_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_PLAYBACK_MARKER), GWLP_WNDPROC, (LONG_PTR)IDC_PLAYBACK_MARKER_WndProc);
|
||||
IDC_SELECTION_MARKER_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_SELECTION_MARKER), GWLP_WNDPROC, (LONG_PTR)IDC_SELECTION_MARKER_WndProc);
|
||||
// subclass all buttons
|
||||
IDC_PROGRESS_BUTTON_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_PROGRESS_BUTTON), GWL_WNDPROC, (LONG)IDC_PROGRESS_BUTTON_WndProc);
|
||||
IDC_BRANCHES_BUTTON_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_BRANCHES_BUTTON), GWL_WNDPROC, (LONG)IDC_BRANCHES_BUTTON_WndProc);
|
||||
TASEDITOR_REWIND_FULL_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_REWIND_FULL), GWL_WNDPROC, (LONG)TASEDITOR_REWIND_FULL_WndProc);
|
||||
TASEDITOR_REWIND_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_REWIND), GWL_WNDPROC, (LONG)TASEDITOR_REWIND_WndProc);
|
||||
TASEDITOR_PLAYSTOP_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_PLAYSTOP), GWL_WNDPROC, (LONG)TASEDITOR_PLAYSTOP_WndProc);
|
||||
TASEDITOR_FORWARD_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_FORWARD), GWL_WNDPROC, (LONG)TASEDITOR_FORWARD_WndProc);
|
||||
TASEDITOR_FORWARD_FULL_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_FORWARD_FULL), GWL_WNDPROC, (LONG)TASEDITOR_FORWARD_FULL_WndProc);
|
||||
CHECK_FOLLOW_CURSOR_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, CHECK_FOLLOW_CURSOR), GWL_WNDPROC, (LONG)CHECK_FOLLOW_CURSOR_WndProc);
|
||||
CHECK_AUTORESTORE_PLAYBACK_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, CHECK_AUTORESTORE_PLAYBACK), GWL_WNDPROC, (LONG)CHECK_AUTORESTORE_PLAYBACK_WndProc);
|
||||
IDC_RADIO_ALL_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_RADIO_ALL), GWL_WNDPROC, (LONG)IDC_RADIO_ALL_WndProc);
|
||||
IDC_RADIO_1P_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_RADIO_1P), GWL_WNDPROC, (LONG)IDC_RADIO_1P_WndProc);
|
||||
IDC_RADIO_2P_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_RADIO_2P), GWL_WNDPROC, (LONG)IDC_RADIO_2P_WndProc);
|
||||
IDC_RADIO_3P_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_RADIO_3P), GWL_WNDPROC, (LONG)IDC_RADIO_3P_WndProc);
|
||||
IDC_RADIO_4P_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_RADIO_4P), GWL_WNDPROC, (LONG)IDC_RADIO_4P_WndProc);
|
||||
IDC_SUPERIMPOSE_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_SUPERIMPOSE), GWL_WNDPROC, (LONG)IDC_SUPERIMPOSE_WndProc);
|
||||
IDC_USEPATTERN_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_USEPATTERN), GWL_WNDPROC, (LONG)IDC_USEPATTERN_WndProc);
|
||||
TASEDITOR_PREV_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_PREV_MARKER), GWL_WNDPROC, (LONG)TASEDITOR_PREV_MARKER_WndProc);
|
||||
TASEDITOR_FIND_BEST_SIMILAR_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_FIND_BEST_SIMILAR_MARKER), GWL_WNDPROC, (LONG)TASEDITOR_FIND_BEST_SIMILAR_MARKER_WndProc);
|
||||
TASEDITOR_FIND_NEXT_SIMILAR_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_FIND_NEXT_SIMILAR_MARKER), GWL_WNDPROC, (LONG)TASEDITOR_FIND_NEXT_SIMILAR_MARKER_WndProc);
|
||||
TASEDITOR_NEXT_MARKER_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_NEXT_MARKER), GWL_WNDPROC, (LONG)TASEDITOR_NEXT_MARKER_WndProc);
|
||||
CHECK_TURBO_SEEK_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, CHECK_TURBO_SEEK), GWL_WNDPROC, (LONG)CHECK_TURBO_SEEK_WndProc);
|
||||
IDC_RECORDING_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_RECORDING), GWL_WNDPROC, (LONG)IDC_RECORDING_WndProc);
|
||||
TASEDITOR_RUN_MANUAL_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, TASEDITOR_RUN_MANUAL), GWL_WNDPROC, (LONG)TASEDITOR_RUN_MANUAL_WndProc);
|
||||
IDC_RUN_AUTO_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndTASEditor, IDC_RUN_AUTO), GWL_WNDPROC, (LONG)IDC_RUN_AUTO_WndProc);
|
||||
IDC_PROGRESS_BUTTON_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_PROGRESS_BUTTON), GWLP_WNDPROC, (LONG_PTR)IDC_PROGRESS_BUTTON_WndProc);
|
||||
IDC_BRANCHES_BUTTON_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_BRANCHES_BUTTON), GWLP_WNDPROC, (LONG_PTR)IDC_BRANCHES_BUTTON_WndProc);
|
||||
TASEDITOR_REWIND_FULL_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_REWIND_FULL), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_REWIND_FULL_WndProc);
|
||||
TASEDITOR_REWIND_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_REWIND), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_REWIND_WndProc);
|
||||
TASEDITOR_PLAYSTOP_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_PLAYSTOP), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_PLAYSTOP_WndProc);
|
||||
TASEDITOR_FORWARD_oldWndProc =(WNDPROC) SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_FORWARD), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_FORWARD_WndProc);
|
||||
TASEDITOR_FORWARD_FULL_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_FORWARD_FULL), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_FORWARD_FULL_WndProc);
|
||||
CHECK_FOLLOW_CURSOR_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, CHECK_FOLLOW_CURSOR), GWLP_WNDPROC, (LONG_PTR)CHECK_FOLLOW_CURSOR_WndProc);
|
||||
CHECK_AUTORESTORE_PLAYBACK_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, CHECK_AUTORESTORE_PLAYBACK), GWLP_WNDPROC, (LONG_PTR)CHECK_AUTORESTORE_PLAYBACK_WndProc);
|
||||
IDC_RADIO_ALL_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_RADIO_ALL), GWLP_WNDPROC, (LONG_PTR)IDC_RADIO_ALL_WndProc);
|
||||
IDC_RADIO_1P_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_RADIO_1P), GWLP_WNDPROC, (LONG_PTR)IDC_RADIO_1P_WndProc);
|
||||
IDC_RADIO_2P_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_RADIO_2P), GWLP_WNDPROC, (LONG_PTR)IDC_RADIO_2P_WndProc);
|
||||
IDC_RADIO_3P_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_RADIO_3P), GWLP_WNDPROC, (LONG_PTR)IDC_RADIO_3P_WndProc);
|
||||
IDC_RADIO_4P_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_RADIO_4P), GWLP_WNDPROC, (LONG_PTR)IDC_RADIO_4P_WndProc);
|
||||
IDC_SUPERIMPOSE_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_SUPERIMPOSE), GWLP_WNDPROC, (LONG_PTR)IDC_SUPERIMPOSE_WndProc);
|
||||
IDC_USEPATTERN_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_USEPATTERN), GWLP_WNDPROC, (LONG_PTR)IDC_USEPATTERN_WndProc);
|
||||
TASEDITOR_PREV_MARKER_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_PREV_MARKER), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_PREV_MARKER_WndProc);
|
||||
TASEDITOR_FIND_BEST_SIMILAR_MARKER_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_FIND_BEST_SIMILAR_MARKER), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_FIND_BEST_SIMILAR_MARKER_WndProc);
|
||||
TASEDITOR_FIND_NEXT_SIMILAR_MARKER_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_FIND_NEXT_SIMILAR_MARKER), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_FIND_NEXT_SIMILAR_MARKER_WndProc);
|
||||
TASEDITOR_NEXT_MARKER_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_NEXT_MARKER), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_NEXT_MARKER_WndProc);
|
||||
CHECK_TURBO_SEEK_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, CHECK_TURBO_SEEK), GWLP_WNDPROC, (LONG_PTR)CHECK_TURBO_SEEK_WndProc);
|
||||
IDC_RECORDING_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_RECORDING), GWLP_WNDPROC, (LONG_PTR)IDC_RECORDING_WndProc);
|
||||
TASEDITOR_RUN_MANUAL_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, TASEDITOR_RUN_MANUAL), GWLP_WNDPROC, (LONG_PTR)TASEDITOR_RUN_MANUAL_WndProc);
|
||||
IDC_RUN_AUTO_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndTASEditor, IDC_RUN_AUTO), GWLP_WNDPROC, (LONG_PTR)IDC_RUN_AUTO_WndProc);
|
||||
// create "Recent" submenu
|
||||
hRecentProjectsMenu = CreateMenu();
|
||||
updateRecentProjectsMenu();
|
||||
|
@ -780,7 +780,7 @@ void TASEDITOR_WINDOW::recheckPatternsMenu()
|
|||
}
|
||||
|
||||
// ====================================================================================================
|
||||
BOOL CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
extern TASEDITOR_WINDOW taseditorWindow;
|
||||
switch(uMsg)
|
||||
|
@ -833,7 +833,7 @@ BOOL CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
switch(((LPNMHDR)lParam)->code)
|
||||
{
|
||||
case NM_CUSTOMDRAW:
|
||||
SetWindowLong(hWnd, DWL_MSGRESULT, pianoRoll.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||
SetWindowLongPtr(hWnd, DWLP_MSGRESULT, pianoRoll.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||
return TRUE;
|
||||
case LVN_GETDISPINFO:
|
||||
pianoRoll.getDispInfo((NMLVDISPINFO*)lParam);
|
||||
|
@ -854,7 +854,7 @@ BOOL CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
switch(((LPNMHDR)lParam)->code)
|
||||
{
|
||||
case NM_CUSTOMDRAW:
|
||||
SetWindowLong(hWnd, DWL_MSGRESULT, bookmarks.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||
SetWindowLongPtr(hWnd, DWLP_MSGRESULT, bookmarks.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||
return TRUE;
|
||||
case LVN_GETDISPINFO:
|
||||
bookmarks.getDispInfo((NMLVDISPINFO*)lParam);
|
||||
|
@ -865,7 +865,7 @@ BOOL CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
switch(((LPNMHDR)lParam)->code)
|
||||
{
|
||||
case NM_CUSTOMDRAW:
|
||||
SetWindowLong(hWnd, DWL_MSGRESULT, history.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||
SetWindowLongPtr(hWnd, DWLP_MSGRESULT, history.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||
return TRUE;
|
||||
case LVN_GETDISPINFO:
|
||||
history.getDispInfo((NMLVDISPINFO*)lParam);
|
||||
|
|
|
@ -777,7 +777,7 @@ int TextHookerSaveTableFile(){
|
|||
* Looking for comments? Inqure within!
|
||||
*
|
||||
*/
|
||||
BOOL CALLBACK TextHookerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
INT_PTR CALLBACK TextHookerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
RECT wrect;
|
||||
char str[2048];
|
||||
char bufferstr[10240]; //holds the entire buffer, so it needs to be big...
|
||||
|
|
|
@ -71,7 +71,7 @@ void CloseTimingDialog(HWND hwndDlg)
|
|||
/**
|
||||
* Callback function of the Timing configuration dialog.
|
||||
**/
|
||||
BOOL CALLBACK TimingConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK TimingConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
|
|
|
@ -373,7 +373,7 @@ BOOL CALLBACK TracerResizingEnumWindowsProc(HWND hwnd, LPARAM lParam)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int i;
|
||||
switch(uMsg)
|
||||
|
@ -443,7 +443,7 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
EnableTracerMenuItems();
|
||||
|
||||
// subclass editfield
|
||||
IDC_TRACER_LOG_oldWndProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_TRACER_LOG), GWL_WNDPROC, (LONG)IDC_TRACER_LOG_WndProc);
|
||||
IDC_TRACER_LOG_oldWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TRACER_LOG), GWLP_WNDPROC, (LONG_PTR)IDC_TRACER_LOG_WndProc);
|
||||
break;
|
||||
}
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
|
|
|
@ -1148,7 +1148,7 @@ double GetDlgItemDouble(HWND hDlg, int item)
|
|||
return(ret);
|
||||
}
|
||||
|
||||
BOOL CALLBACK VideoConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK VideoConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static char *vmstr[11]={
|
||||
"Custom",
|
||||
|
@ -1288,10 +1288,10 @@ BOOL CALLBACK VideoConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
EnableWindow(GetDlgItem(hwndDlg, IDC_TVASPECT_Y), eoptions&EO_TVASPECT);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC_SLASHTEXT), eoptions&EO_TVASPECT);
|
||||
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLong(GetDlgItem(hwndDlg, IDC_WINSIZE_MUL_X), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_WINSIZE_MUL_Y), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_TVASPECT_X), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
SetWindowLong(GetDlgItem(hwndDlg, IDC_TVASPECT_Y), GWL_WNDPROC, (LONG)FilterEditCtrlProc);
|
||||
DefaultEditCtrlProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_WINSIZE_MUL_X), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_WINSIZE_MUL_Y), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TVASPECT_X), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TVASPECT_Y), GWLP_WNDPROC, (LONG_PTR)FilterEditCtrlProc);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ extern bool turbo;
|
|||
extern bool movie_readonly;
|
||||
extern bool AutoSS; //flag for whether an auto-save has been made
|
||||
extern int newppu;
|
||||
extern BOOL CALLBACK ReplayMetadataDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); //Metadata dialog
|
||||
extern INT_PTR CALLBACK ReplayMetadataDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); //Metadata dialog
|
||||
extern bool CheckFileExists(const char* filename); //Receives a filename (fullpath) and checks to see if that file exists
|
||||
extern bool oldInputDisplay;
|
||||
extern int RAMInitOption;
|
||||
|
@ -1037,7 +1037,7 @@ void HideFWindow(int h)
|
|||
SetWindowPos(hAppWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOREPOSITION | SWP_NOSIZE);
|
||||
}
|
||||
|
||||
SetWindowLong(hAppWnd, GWL_STYLE, desa | ( GetWindowLong(hAppWnd, GWL_STYLE) & WS_VISIBLE ));
|
||||
SetWindowLongPtr(hAppWnd, GWL_STYLE, desa | ( GetWindowLong(hAppWnd, GWL_STYLE) & WS_VISIBLE ));
|
||||
SetWindowPos(hAppWnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
|
||||
}
|
||||
|
||||
|
@ -1877,7 +1877,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
case ID_FILE_OPENLUAWINDOW:
|
||||
if (!LuaConsoleHWnd)
|
||||
{
|
||||
LuaConsoleHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_LUA), hWnd, (DLGPROC) DlgLuaScriptDialog);
|
||||
LuaConsoleHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_LUA), hWnd, DlgLuaScriptDialog);
|
||||
} else
|
||||
{
|
||||
ShowWindow(LuaConsoleHWnd, SW_SHOWNORMAL);
|
||||
|
@ -3168,14 +3168,14 @@ void OpenRamSearch()
|
|||
if (GameInfo)
|
||||
{
|
||||
reset_address_info();
|
||||
RamSearchHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_RAMSEARCH), MainhWnd, (DLGPROC)RamSearchProc);
|
||||
RamSearchHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_RAMSEARCH), MainhWnd, RamSearchProc);
|
||||
}
|
||||
}
|
||||
|
||||
void OpenRamWatch()
|
||||
{
|
||||
if (GameInfo)
|
||||
RamWatchHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_RAMWATCH), MainhWnd, (DLGPROC) RamWatchProc);
|
||||
RamWatchHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_RAMWATCH), MainhWnd, RamWatchProc);
|
||||
}
|
||||
|
||||
void SaveSnapshotAs()
|
||||
|
@ -3265,7 +3265,7 @@ POINT CalcSubWindowPos(HWND hDlg, POINT* conf)
|
|||
LRESULT APIENTRY FilterEditCtrlProc(HWND hwnd, UINT msg, WPARAM wP, LPARAM lP)
|
||||
{
|
||||
bool through = true;
|
||||
LRESULT result = 0;
|
||||
INT_PTR result = 0;
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
|
|
|
@ -6194,7 +6194,7 @@ int FCEU_LoadLuaCode(const char *filename, const char *arg) {
|
|||
info_onstart = WinLuaOnStart;
|
||||
info_onstop = WinLuaOnStop;
|
||||
if(!LuaConsoleHWnd)
|
||||
LuaConsoleHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_LUA), hAppWnd, (DLGPROC) DlgLuaScriptDialog);
|
||||
LuaConsoleHWnd = CreateDialog(fceu_hInstance, MAKEINTRESOURCE(IDD_LUA), hAppWnd, DlgLuaScriptDialog);
|
||||
info_uid = (int)LuaConsoleHWnd;
|
||||
#else
|
||||
info_print = NULL;
|
||||
|
|
Loading…
Reference in New Issue