diff --git a/src/drivers/win/Win32InputBox.cpp b/src/drivers/win/Win32InputBox.cpp index a7122dcb..4c9956d4 100644 --- a/src/drivers/win/Win32InputBox.cpp +++ b/src/drivers/win/Win32InputBox.cpp @@ -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,7 +310,7 @@ 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); WIN32INPUTBOX_PARAM *param = _this ? _this->GetParam() : 0; diff --git a/src/drivers/win/Win32InputBox.h b/src/drivers/win/Win32InputBox.h index ff1acbe0..e7c87fbf 100644 --- a/src/drivers/win/Win32InputBox.h +++ b/src/drivers/win/Win32InputBox.h @@ -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(); diff --git a/src/drivers/win/archive.cpp b/src/drivers/win/archive.cpp index 845acfbc..75bdfff7 100644 --- a/src/drivers/win/archive.cpp +++ b/src/drivers/win/archive.cpp @@ -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) { diff --git a/src/drivers/win/cdlogger.cpp b/src/drivers/win/cdlogger.cpp index fb3d174c..3d88ced9 100644 --- a/src/drivers/win/cdlogger.cpp +++ b/src/drivers/win/cdlogger.cpp @@ -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) { diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 1e9c5846..2aed3b66 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -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; @@ -1224,7 +1224,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; @@ -1358,7 +1358,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; @@ -1756,7 +1756,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}; diff --git a/src/drivers/win/debuggersp.cpp b/src/drivers/win/debuggersp.cpp index e2180ef9..018c084f 100644 --- a/src/drivers/win/debuggersp.cpp +++ b/src/drivers/win/debuggersp.cpp @@ -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) { diff --git a/src/drivers/win/directories.cpp b/src/drivers/win/directories.cpp index accda7d5..09fdc8db 100644 --- a/src/drivers/win/directories.cpp +++ b/src/drivers/win/directories.cpp @@ -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) { diff --git a/src/drivers/win/guiconfig.cpp b/src/drivers/win/guiconfig.cpp index 9c31aeb5..93c19ee0 100644 --- a/src/drivers/win/guiconfig.cpp +++ b/src/drivers/win/guiconfig.cpp @@ -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) { diff --git a/src/drivers/win/input.cpp b/src/drivers/win/input.cpp index 50668570..4b1165a7 100644 --- a/src/drivers/win/input.cpp +++ b/src/drivers/win/input.cpp @@ -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) { diff --git a/src/drivers/win/log.cpp b/src/drivers/win/log.cpp index 4232180b..70ad7115 100644 --- a/src/drivers/win/log.cpp +++ b/src/drivers/win/log.cpp @@ -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) diff --git a/src/drivers/win/mapinput.cpp b/src/drivers/win/mapinput.cpp index 131740bb..aca19ad1 100644 --- a/src/drivers/win/mapinput.cpp +++ b/src/drivers/win/mapinput.cpp @@ -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) { diff --git a/src/drivers/win/memview.cpp b/src/drivers/win/memview.cpp index fedd28b1..96ccbfdd 100644 --- a/src/drivers/win/memview.cpp +++ b/src/drivers/win/memview.cpp @@ -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: diff --git a/src/drivers/win/memviewsp.cpp b/src/drivers/win/memviewsp.cpp index 1f155455..d65e2ace 100644 --- a/src/drivers/win/memviewsp.cpp +++ b/src/drivers/win/memviewsp.cpp @@ -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) { diff --git a/src/drivers/win/memwatch.cpp b/src/drivers/win/memwatch.cpp index 9f3af8a2..e1ab530f 100644 --- a/src/drivers/win/memwatch.cpp +++ b/src/drivers/win/memwatch.cpp @@ -697,7 +697,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"}; diff --git a/src/drivers/win/monitor.cpp b/src/drivers/win/monitor.cpp index da402c1e..d70c13a4 100644 --- a/src/drivers/win/monitor.cpp +++ b/src/drivers/win/monitor.cpp @@ -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: { diff --git a/src/drivers/win/movieoptions.cpp b/src/drivers/win/movieoptions.cpp index fc4bcb80..8316cb74 100644 --- a/src/drivers/win/movieoptions.cpp +++ b/src/drivers/win/movieoptions.cpp @@ -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) { diff --git a/src/drivers/win/netplay.cpp b/src/drivers/win/netplay.cpp index 9afbdb8d..3c4b4009 100644 --- a/src/drivers/win/netplay.cpp +++ b/src/drivers/win/netplay.cpp @@ -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) { diff --git a/src/drivers/win/ntview.cpp b/src/drivers/win/ntview.cpp index 9a820c3d..87f5c9ac 100644 --- a/src/drivers/win/ntview.cpp +++ b/src/drivers/win/ntview.cpp @@ -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; diff --git a/src/drivers/win/palette.cpp b/src/drivers/win/palette.cpp index bed79087..bf3c3a01 100644 --- a/src/drivers/win/palette.cpp +++ b/src/drivers/win/palette.cpp @@ -68,7 +68,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) diff --git a/src/drivers/win/ppuview.cpp b/src/drivers/win/ppuview.cpp index 4f9f7673..140c94fe 100644 --- a/src/drivers/win/ppuview.cpp +++ b/src/drivers/win/ppuview.cpp @@ -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]; diff --git a/src/drivers/win/ram_search.cpp b/src/drivers/win/ram_search.cpp index a2e38a0c..d66ac558 100644 --- a/src/drivers/win/ram_search.cpp +++ b/src/drivers/win/ram_search.cpp @@ -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 @@ -1396,7 +1396,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) { RECT r; RECT r2; diff --git a/src/drivers/win/ram_search.h b/src/drivers/win/ram_search.h index 122fa82c..66a5457f 100644 --- a/src/drivers/win/ram_search.h +++ b/src/drivers/win/ram_search.h @@ -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); // Too much work to do for resorting the values, and finding the biggest number // by sorting in ram list doesn't help too much in usually use, so I gave it up. diff --git a/src/drivers/win/ramwatch.cpp b/src/drivers/win/ramwatch.cpp index 11769cf1..854f020f 100644 --- a/src/drivers/win/ramwatch.cpp +++ b/src/drivers/win/ramwatch.cpp @@ -154,7 +154,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; @@ -170,7 +170,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]; @@ -775,7 +775,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. @@ -1002,7 +1002,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; @@ -1307,7 +1307,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; @@ -1318,7 +1318,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; } @@ -1332,7 +1332,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; @@ -1345,7 +1345,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)); diff --git a/src/drivers/win/ramwatch.h b/src/drivers/win/ramwatch.h index 2df1638d..1225a689 100644 --- a/src/drivers/win/ramwatch.h +++ b/src/drivers/win/ramwatch.h @@ -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; diff --git a/src/drivers/win/replay.cpp b/src/drivers/win/replay.cpp index acfecfbd..f651dd00 100644 --- a/src/drivers/win/replay.cpp +++ b/src/drivers/win/replay.cpp @@ -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; diff --git a/src/drivers/win/sound.cpp b/src/drivers/win/sound.cpp index ae5f1a86..c751c586 100644 --- a/src/drivers/win/sound.cpp +++ b/src/drivers/win/sound.cpp @@ -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) { diff --git a/src/drivers/win/taseditor.cpp b/src/drivers/win/taseditor.cpp index d0daa0f8..9e1b0f61 100644 --- a/src/drivers/win/taseditor.cpp +++ b/src/drivers/win/taseditor.cpp @@ -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) { diff --git a/src/drivers/win/taseditor/markers_manager.cpp b/src/drivers/win/taseditor/markers_manager.cpp index 654a46c4..dba27a4e 100644 --- a/src/drivers/win/taseditor/markers_manager.cpp +++ b/src/drivers/win/taseditor/markers_manager.cpp @@ -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) diff --git a/src/drivers/win/taseditor/taseditor_window.cpp b/src/drivers/win/taseditor/taseditor_window.cpp index 55699f18..8e3134a7 100644 --- a/src/drivers/win/taseditor/taseditor_window.cpp +++ b/src/drivers/win/taseditor/taseditor_window.cpp @@ -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); @@ -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) diff --git a/src/drivers/win/texthook.cpp b/src/drivers/win/texthook.cpp index 934e946c..5b319a1f 100644 --- a/src/drivers/win/texthook.cpp +++ b/src/drivers/win/texthook.cpp @@ -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... diff --git a/src/drivers/win/timing.cpp b/src/drivers/win/timing.cpp index 89bc6e35..0b833a6b 100644 --- a/src/drivers/win/timing.cpp +++ b/src/drivers/win/timing.cpp @@ -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) { diff --git a/src/drivers/win/tracer.cpp b/src/drivers/win/tracer.cpp index a24ca6a8..314d751a 100644 --- a/src/drivers/win/tracer.cpp +++ b/src/drivers/win/tracer.cpp @@ -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) diff --git a/src/drivers/win/video.cpp b/src/drivers/win/video.cpp index e48bcd72..42910f91 100644 --- a/src/drivers/win/video.cpp +++ b/src/drivers/win/video.cpp @@ -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", diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index ddfa0d37..6c40b5dd 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -117,7 +117,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; @@ -1870,7 +1870,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); @@ -3159,14 +3159,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() diff --git a/src/lua-engine.cpp b/src/lua-engine.cpp index 424c9669..417f5c3f 100644 --- a/src/lua-engine.cpp +++ b/src/lua-engine.cpp @@ -6193,7 +6193,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;