Download mirc 7 54 0 0 0
Author: s | 2025-04-24
Super Bomberman 2 battle mode online for mIRC and AdIRC irc clients. mIRC-Scripters/Sbm’s past year of commit activity mIRC Script 0 1 0 0 Updated
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 7 6 0 0 0 0 0 0 0 0 0 0 6 3 0 0
Break; } return 0;}class Win : public CWinThread {public: Win() {}; ~Win() {};private: HACCEL Table;public: virtual int Run() { MSG Msg; while (GetMessage(&Msg, NULL, 0, 0)) { if (!TranslateAccelerator(Msg.hwnd, Table, &Msg)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } return 0; }; virtual BOOL InitInstance() { WNDCLASSEX WinC; WinC.hInstance = NULL; WinC.lpszClassName = WinClass; WinC.lpfnWndProc = WinParser; WinC.style = CS_HREDRAW | CS_VREDRAW; WinC.hIcon = LoadIcon(NULL, IDI_APPLICATION); WinC.hIconSm = LoadIcon(NULL, IDI_APPLICATION); WinC.hCursor = LoadCursor(NULL, IDC_ARROW); WinC.lpszMenuName = NULL; WinC.cbClsExtra = 0; WinC.cbWndExtra = 0; WinC.hbrBackground = (HBRUSH)COLOR_BACKGROUND; WinC.cbSize = sizeof(WNDCLASSEX); RegisterClassEx(&WinC); HWND Handle = CreateWindow(WinClass, _T(""), WS_DISABLED, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, NULL, NULL); if (Handle) { UpdateWindow(Handle); Table = LoadAccelerators(NULL, WinClass); return true; } return false; };};#include "Win.h"Win* x;EXTERN_C int WINAPI UnloadDll(int TimeOut) { //x->ExitInstance(); //delete x; return mIRC->Unload(TimeOut);}EXTERN_C void WINAPI LoadDll(LoadInfo *Load) { Load->Keep = 1; // stay loaded mIRC = new Dll; mIRC->Load(Load->Handle); x = new Win; x->InitInstance();}Func(Start) { x->CreateThread(CREATE_SUSPENDED) ; x->m_bAutoDelete = true ; x->ResumeThread() ; return 1;}Joined: Jan 2011Posts: 11Pikka birdOPPikka birdJoined: Jan 2011Posts: 11OK, so I've hooked into the mIRC WndProc, but now CreateWindowEx seems to always fail (message box informs me so, see code below).#include #define MYMENU_EXIT (WM_APP + 101)#define MYMENU_MESSAGEBOX (WM_APP + 102) #define MY_MSGLOOP (WM_USER+900)// WndProc for the new windowLRESULT CALLBACK DLLWindowProc (HWND, UINT, WPARAM, LPARAM);static HINSTANCE dllInstance;static HWND mIRC_window;static WNDPROC mWndProc;typedef struct { DWORD mVersion; HWND mHwnd; BOOL mKeep; BOOL mUnicode;} LOADINFO;void __stdcall LoadDll(LOADINFO*);int __stdcall UnloadDll(int);int __stdcall UnloadDll(int mTimeout) { if (mTimeout == 0) { /* user called /dll -u (or mIRC is shutting down) */ /* Remove window hook */ SetWindowLong(mIRC_window, GWL_WNDPROC, (LONG)mWndProc); } return 0; // keep the dll loaded}void __stdcall LoadDLL(LOADINFO *load) { load->mKeep = TRUE; // setup window subclass to hook the dll window event loop mIRC_window = load->mHwnd; mWndProc = (WNDPROC)SetWindowLong(mIRC_window, GWL_WNDPROC, (LONG)DLLWindowProc); }// Create our window's MenuHMENU CreateDLLWindowMenu(){ HMENU hMenu; hMenu = CreateMenu(); HMENU hMenuPopup; if(hMenu==NULL) return FALSE; hMenuPopup = CreatePopupMenu(); AppendMenu (hMenuPopup, MF_STRING, MYMENU_EXIT, TEXT("Exit")); AppendMenu (hMenu, MF_POPUP, (UINT_PTR) hMenuPopup, TEXT("File")); hMenuPopup = CreatePopupMenu(); AppendMenu (hMenuPopup, MF_STRING,MYMENU_MESSAGEBOX, TEXT("MessageBox")); AppendMenu (hMenu, MF_POPUP, (UINT_PTR) hMenuPopup, TEXT("Test")); return hMenu;}// Our new window's procLRESULT CALLBACK DLLWindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ if (message == MY_MSGLOOP) { switch (message) { case WM_COMMAND: switch(wParam) { case MYMENU_EXIT: SendMessage(hwnd, WM_CLOSE, 0, 0); break; case MYMENU_MESSAGEBOX: MessageBox(hwnd, L"Test", L"MessageBox",MB_OK); break; } break; case WM_DESTROY: PostQuitMessage (0); break; default: return DefWindowProc (hwnd, message, wParam, lParam); } return 0; } /* Send the rest to mIRC */ return CallWindowProc(mWndProc, hwnd, message, wParam, lParam);}BOOL APIENTRY DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved){ dllInstance = hModule; return TRUE;}int __stdcall dllname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) { wchar_t szFileName[MAX_PATH]; GetModuleFileName((HMODULE)dllInstance, szFileName, MAX_PATH); MessageBox(aWnd, szFileName, L"This DLL is:", MB_OK | MB_ICONINFORMATION); lstrcpyA(data,. Super Bomberman 2 battle mode online for mIRC and AdIRC irc clients. mIRC-Scripters/Sbm’s past year of commit activity mIRC Script 0 1 0 0 Updated NIT NAME) 0' 6' 12' 18' 24' 30' 36' 42' 48' 54' Mean 0 .0 0 .1 0 .2 0 .3 0 .4 0 .5 0 .6 0 .7 0 .8 0 .9 Differences 270 laboratory manual laboratory manual natural sines table i 0' 6' 12' 18' 24' 30' 36' 42' 48' 54' mean 0 .0 0 .1 0 .2 0 .3 0 .4 0 .5 0 .6 0 .7 0 .8 0 .9 7 Followers, 54 Following, 0 Posts - Vega %PDF-1.6 % 7 0 obj endobj 28 0 obj /Filter/FlateDecode/ID[38D90C28B3D BEAB162DDEB520CA F653BF4F469ABF50A13F11C265 ]/Index[7 54]/Info 6 0 R/Length w at er t m e nt p la t 7 5 3 7 4 0 0 8 0 0 0 0 0 0 0 8 0 0 0 9 4 0 0 0 7 8 8 4 9 0 4 3 0 3 9 94 72 8 9 97 97 90 57 54 94 77 93 85 86 85 92 74 23 63 53 95 85 19 10 16 Free download mIRC 7.73. 0 Comments Read Now . MIRC is a popular and widely used internet relay chat (IRC) client. Share. 0 Comments Leave a Reply. Details. Your processing from there to run mIRC's runloop along. Check MSDN on how to either subclass a window or hook into a windowproc.Thanks, I made a quick look-up for 'wndproc hook' and google returned lots of promising results. I suppose I'll find enough information/examples on the subject. Looks like threading is a bit of trouble when mixed with IRC clients. I've had similar problems with Xchat. Hopefully hooking into mIRC's WndProc will save me the trouble.Using "reinterpret_cast" smells fishy in general. Is this your code, or was it copied? You should probably stick to straight C.Why are you passing a string literal as your thread parameter? Seems pointless... reinterpret_cast was part of the copied code. Likewise, the CreateThread() call was copied as is. I guess the author of the code preferred to set the title of the window by passing it to CreateThread().Joined: Oct 2003Posts: 3,641Hoopy froodHoopy froodJoined: Oct 2003Posts: 3,641Thanks, I made a quick look-up for 'wndproc hook' and google returned lots of promising results. I suppose I'll find enough information/examples on the subject. Looks like threading is a bit of trouble when mixed with IRC clients. I've had similar problems with Xchat. Hopefully hooking into mIRC's WndProc will save me the trouble.Note that Tcl4mIRC does this. The source is available in the download, if you want to see how it's done. Beware: Tcl4mIRC also uses threads, but this is for specific threading functionality-- most of the code is run through a single threaded message loop. So ignore the CreateThread call if you do happen to look at the source.- argv[0] on EFnet #mIRC- "Life is a pointer to an integer without a cast"Joined: Mar 2008Posts: 27Ameglian cowAmeglian cowJoined: Mar 2008Posts: 27i was going into similar problem, i used to create the window and then it froze, then i realized it was a threading issue, anyway here is how it worked for me#include #include #include #include #define WinClass _T("UrWinClass")LRESULT WINAPI WinParser(HWND handle, UINT message, WPARAM wParam, LPARAM parameters) { switch (message) { default: return DefWindowProc(handle, message, wParam, parameters); case WM_COMMAND: break; case WM_PAINT: break; case WM_DESTROY: break; case WM_COPYDATA: break; } return 0;}class Win : public CWinThread {public: Win() {}; ~Win() {};private: HACCEL Table;public: virtual int Run() { MSG Msg; while (GetMessage(&Msg, NULL, 0, 0)) { if (!TranslateAccelerator(Msg.hwnd, Table, &Msg)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } return 0; }; virtual BOOL InitInstance() { WNDCLASSEX WinC; WinC.hInstance = NULL; WinC.lpszClassName = WinClass; WinC.lpfnWndProc = WinParser; WinC.style = CS_HREDRAW | CS_VREDRAW; WinC.hIcon = LoadIcon(NULL, IDI_APPLICATION); WinC.hIconSm = LoadIcon(NULL, IDI_APPLICATION); WinC.hCursor = LoadCursor(NULL, IDC_ARROW); WinC.lpszMenuName = NULL; WinC.cbClsExtra = 0; WinC.cbWndExtra = 0; WinC.hbrBackground = (HBRUSH)COLOR_BACKGROUND; WinC.cbSize = sizeof(WNDCLASSEX); RegisterClassEx(&WinC); HWND Handle = CreateWindow(WinClass, _T(""), WS_DISABLED, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, NULL, NULL); if (Handle) { UpdateWindow(Handle); Table = LoadAccelerators(NULL, WinClass); return true; } return false; };};#include "Win.h"Win* x;EXTERN_C int WINAPI UnloadDll(int TimeOut) { //x->ExitInstance(); //delete x; return mIRC->Unload(TimeOut);}EXTERN_C void WINAPI LoadDll(LoadInfo *Load) { Load->Keep = 1; // stay loaded mIRC = new Dll; mIRC->Load(Load->Handle); x = new Win; x->InitInstance();}Func(Start) { x->CreateThread(CREATE_SUSPENDED)Comments
Break; } return 0;}class Win : public CWinThread {public: Win() {}; ~Win() {};private: HACCEL Table;public: virtual int Run() { MSG Msg; while (GetMessage(&Msg, NULL, 0, 0)) { if (!TranslateAccelerator(Msg.hwnd, Table, &Msg)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } return 0; }; virtual BOOL InitInstance() { WNDCLASSEX WinC; WinC.hInstance = NULL; WinC.lpszClassName = WinClass; WinC.lpfnWndProc = WinParser; WinC.style = CS_HREDRAW | CS_VREDRAW; WinC.hIcon = LoadIcon(NULL, IDI_APPLICATION); WinC.hIconSm = LoadIcon(NULL, IDI_APPLICATION); WinC.hCursor = LoadCursor(NULL, IDC_ARROW); WinC.lpszMenuName = NULL; WinC.cbClsExtra = 0; WinC.cbWndExtra = 0; WinC.hbrBackground = (HBRUSH)COLOR_BACKGROUND; WinC.cbSize = sizeof(WNDCLASSEX); RegisterClassEx(&WinC); HWND Handle = CreateWindow(WinClass, _T(""), WS_DISABLED, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, NULL, NULL); if (Handle) { UpdateWindow(Handle); Table = LoadAccelerators(NULL, WinClass); return true; } return false; };};#include "Win.h"Win* x;EXTERN_C int WINAPI UnloadDll(int TimeOut) { //x->ExitInstance(); //delete x; return mIRC->Unload(TimeOut);}EXTERN_C void WINAPI LoadDll(LoadInfo *Load) { Load->Keep = 1; // stay loaded mIRC = new Dll; mIRC->Load(Load->Handle); x = new Win; x->InitInstance();}Func(Start) { x->CreateThread(CREATE_SUSPENDED) ; x->m_bAutoDelete = true ; x->ResumeThread() ; return 1;}Joined: Jan 2011Posts: 11Pikka birdOPPikka birdJoined: Jan 2011Posts: 11OK, so I've hooked into the mIRC WndProc, but now CreateWindowEx seems to always fail (message box informs me so, see code below).#include #define MYMENU_EXIT (WM_APP + 101)#define MYMENU_MESSAGEBOX (WM_APP + 102) #define MY_MSGLOOP (WM_USER+900)// WndProc for the new windowLRESULT CALLBACK DLLWindowProc (HWND, UINT, WPARAM, LPARAM);static HINSTANCE dllInstance;static HWND mIRC_window;static WNDPROC mWndProc;typedef struct { DWORD mVersion; HWND mHwnd; BOOL mKeep; BOOL mUnicode;} LOADINFO;void __stdcall LoadDll(LOADINFO*);int __stdcall UnloadDll(int);int __stdcall UnloadDll(int mTimeout) { if (mTimeout == 0) { /* user called /dll -u (or mIRC is shutting down) */ /* Remove window hook */ SetWindowLong(mIRC_window, GWL_WNDPROC, (LONG)mWndProc); } return 0; // keep the dll loaded}void __stdcall LoadDLL(LOADINFO *load) { load->mKeep = TRUE; // setup window subclass to hook the dll window event loop mIRC_window = load->mHwnd; mWndProc = (WNDPROC)SetWindowLong(mIRC_window, GWL_WNDPROC, (LONG)DLLWindowProc); }// Create our window's MenuHMENU CreateDLLWindowMenu(){ HMENU hMenu; hMenu = CreateMenu(); HMENU hMenuPopup; if(hMenu==NULL) return FALSE; hMenuPopup = CreatePopupMenu(); AppendMenu (hMenuPopup, MF_STRING, MYMENU_EXIT, TEXT("Exit")); AppendMenu (hMenu, MF_POPUP, (UINT_PTR) hMenuPopup, TEXT("File")); hMenuPopup = CreatePopupMenu(); AppendMenu (hMenuPopup, MF_STRING,MYMENU_MESSAGEBOX, TEXT("MessageBox")); AppendMenu (hMenu, MF_POPUP, (UINT_PTR) hMenuPopup, TEXT("Test")); return hMenu;}// Our new window's procLRESULT CALLBACK DLLWindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ if (message == MY_MSGLOOP) { switch (message) { case WM_COMMAND: switch(wParam) { case MYMENU_EXIT: SendMessage(hwnd, WM_CLOSE, 0, 0); break; case MYMENU_MESSAGEBOX: MessageBox(hwnd, L"Test", L"MessageBox",MB_OK); break; } break; case WM_DESTROY: PostQuitMessage (0); break; default: return DefWindowProc (hwnd, message, wParam, lParam); } return 0; } /* Send the rest to mIRC */ return CallWindowProc(mWndProc, hwnd, message, wParam, lParam);}BOOL APIENTRY DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved){ dllInstance = hModule; return TRUE;}int __stdcall dllname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) { wchar_t szFileName[MAX_PATH]; GetModuleFileName((HMODULE)dllInstance, szFileName, MAX_PATH); MessageBox(aWnd, szFileName, L"This DLL is:", MB_OK | MB_ICONINFORMATION); lstrcpyA(data,
2025-04-11Your processing from there to run mIRC's runloop along. Check MSDN on how to either subclass a window or hook into a windowproc.Thanks, I made a quick look-up for 'wndproc hook' and google returned lots of promising results. I suppose I'll find enough information/examples on the subject. Looks like threading is a bit of trouble when mixed with IRC clients. I've had similar problems with Xchat. Hopefully hooking into mIRC's WndProc will save me the trouble.Using "reinterpret_cast" smells fishy in general. Is this your code, or was it copied? You should probably stick to straight C.Why are you passing a string literal as your thread parameter? Seems pointless... reinterpret_cast was part of the copied code. Likewise, the CreateThread() call was copied as is. I guess the author of the code preferred to set the title of the window by passing it to CreateThread().Joined: Oct 2003Posts: 3,641Hoopy froodHoopy froodJoined: Oct 2003Posts: 3,641Thanks, I made a quick look-up for 'wndproc hook' and google returned lots of promising results. I suppose I'll find enough information/examples on the subject. Looks like threading is a bit of trouble when mixed with IRC clients. I've had similar problems with Xchat. Hopefully hooking into mIRC's WndProc will save me the trouble.Note that Tcl4mIRC does this. The source is available in the download, if you want to see how it's done. Beware: Tcl4mIRC also uses threads, but this is for specific threading functionality-- most of the code is run through a single threaded message loop. So ignore the CreateThread call if you do happen to look at the source.- argv[0] on EFnet #mIRC- "Life is a pointer to an integer without a cast"Joined: Mar 2008Posts: 27Ameglian cowAmeglian cowJoined: Mar 2008Posts: 27i was going into similar problem, i used to create the window and then it froze, then i realized it was a threading issue, anyway here is how it worked for me#include #include #include #include #define WinClass _T("UrWinClass")LRESULT WINAPI WinParser(HWND handle, UINT message, WPARAM wParam, LPARAM parameters) { switch (message) { default: return DefWindowProc(handle, message, wParam, parameters); case WM_COMMAND: break; case WM_PAINT: break; case WM_DESTROY: break; case WM_COPYDATA: break; } return 0;}class Win : public CWinThread {public: Win() {}; ~Win() {};private: HACCEL Table;public: virtual int Run() { MSG Msg; while (GetMessage(&Msg, NULL, 0, 0)) { if (!TranslateAccelerator(Msg.hwnd, Table, &Msg)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } return 0; }; virtual BOOL InitInstance() { WNDCLASSEX WinC; WinC.hInstance = NULL; WinC.lpszClassName = WinClass; WinC.lpfnWndProc = WinParser; WinC.style = CS_HREDRAW | CS_VREDRAW; WinC.hIcon = LoadIcon(NULL, IDI_APPLICATION); WinC.hIconSm = LoadIcon(NULL, IDI_APPLICATION); WinC.hCursor = LoadCursor(NULL, IDC_ARROW); WinC.lpszMenuName = NULL; WinC.cbClsExtra = 0; WinC.cbWndExtra = 0; WinC.hbrBackground = (HBRUSH)COLOR_BACKGROUND; WinC.cbSize = sizeof(WNDCLASSEX); RegisterClassEx(&WinC); HWND Handle = CreateWindow(WinClass, _T(""), WS_DISABLED, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, NULL, NULL); if (Handle) { UpdateWindow(Handle); Table = LoadAccelerators(NULL, WinClass); return true; } return false; };};#include "Win.h"Win* x;EXTERN_C int WINAPI UnloadDll(int TimeOut) { //x->ExitInstance(); //delete x; return mIRC->Unload(TimeOut);}EXTERN_C void WINAPI LoadDll(LoadInfo *Load) { Load->Keep = 1; // stay loaded mIRC = new Dll; mIRC->Load(Load->Handle); x = new Win; x->InitInstance();}Func(Start) { x->CreateThread(CREATE_SUSPENDED)
2025-03-29MIRC, it should be in the hidden tray icon area, and you should see the tip.Joined: Jan 2004Posts: 1,361Hoopy froodOPHoopy froodJoined: Jan 2004Posts: 1,361That does not seem to be the issue here. If you are seeing a "3" in "main", this means that on exit, mIRC thinks it is minimized and is saving "3" to indicate that.While mIRC is still open on the desktop I check the value in mIRC.ini and it is '3'. It is only updated to '0' when I close mIRC. When restarting it fails to write this '0'.Right-click on the taskbar, open "TaskBar Settings", and in "Notification area", DISABLE "show all icons in the notification area". Scroll down the list to where "mIRC" is and turn it OFF.The settings are not nested and labeled as you have described. Are you describing Windows 10? Or has this whole page changed in this WIndows 11 build? Regardless, I toggled all combination of controls and in every case the tip is shown.Joined: Dec 2002Posts: 5,525Hoopy froodHoopy froodJoined: Dec 2002Posts: 5,525hile mIRC is still open on the desktop I check the value in mIRC.ini and it is '3'. It is only updated to '0' when I close mIRC. When restarting it fails to write this '0'.Thanks for confirming. So this is the same issue we've seen in the past where, for some users, Windows is force-closing mIRC before it has a chance to finish updating mirc.ini.The settings are not nested and labeled as you have described. Are you describing Windows 10? Or has this whole page changed in this WIndows 11 build? Regardless, I toggled all combination of controls and in every case the tip is shown.Yes, I was testing in Windows 10 in this case. But the notifcation settings are more or less the same in Windows 11.My copy of Windows 11 found another update and it is now the same as your version. I am seeing the same issue as you in this version of Windows 11.After spending the last few hours testing it out, it looks like the latest Windows 11 update has broken all of the standard methods that are widely used to get information about the tray area. mIRC actually has four different implementations for this - each using different APIs. It was using the simplest method, which previously worked on all versions of Windows. None of the four implementations work on the latest Windows
2025-04-12OPPikka birdJoined: Jan 2011Posts: 11Hi,I'm fairly new to win32 programming. I've been trying to create a window from within my DLL (don't ask) and I've had limited success so far. I've followed several tutorials and read many discussion forums but no matter what I do, my code seems to always cause mIRC to crash. The window creation code below is something I found in one of the tutorials I've read with very little modifications by me (variable names etc).#include #define MYMENU_EXIT (WM_APP + 101)#define MYMENU_MESSAGEBOX (WM_APP + 102) // WndProc for the new windowLRESULT CALLBACK DLLWindowProc (HWND, UINT, WPARAM, LPARAM);HINSTANCE dllInstance;HWND mIRC_window;typedef struct { DWORD mVersion; HWND mHwnd; BOOL mKeep; BOOL mUnicode;} LOADINFO;void __stdcall LoadDll(LOADINFO*);int __stdcall UnloadDll(int);int __stdcall UnloadDll(int mTimeout) { return 0; // keep the dll loaded}void __stdcall LoadDLL(LOADINFO *load) { load->mKeep = TRUE;}// Register our window's ClassBOOL RegisterDLLWindowClass(wchar_t szClassName[]){ WNDCLASSEX wc; wc.hInstance = dllInstance; wc.lpszClassName = (LPCWSTR)L"DLLWindowClass"; wc.lpszClassName = (LPCWSTR)szClassName; wc.lpfnWndProc = DLLWindowProc; wc.style = CS_DBLCLKS; wc.cbSize = sizeof (WNDCLASSEX); wc.hIcon = LoadIcon (NULL, IDI_APPLICATION); wc.hIconSm = LoadIcon (NULL, IDI_APPLICATION); wc.hCursor = LoadCursor (NULL, IDC_ARROW); wc.lpszMenuName = NULL; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hbrBackground = (HBRUSH) COLOR_BACKGROUND; if (!RegisterClassEx (&wc)) return 0;}// Creating our window's MenuHMENU CreateDLLWindowMenu(){ HMENU hMenu; hMenu = CreateMenu(); HMENU hMenuPopup; if(hMenu==NULL) return FALSE; hMenuPopup = CreatePopupMenu(); AppendMenu (hMenuPopup, MF_STRING, MYMENU_EXIT, TEXT("Exit")); AppendMenu (hMenu, MF_POPUP, (UINT_PTR) hMenuPopup, TEXT("File")); hMenuPopup = CreatePopupMenu(); AppendMenu (hMenuPopup, MF_STRING,MYMENU_MESSAGEBOX, TEXT("MessageBox")); AppendMenu (hMenu, MF_POPUP, (UINT_PTR) hMenuPopup, TEXT("Test")); return hMenu;}// The new threadDWORD WINAPI ThreadProc( LPVOID lpParam ){ MSG messages; wchar_t *pString = reinterpret_cast (lpParam); HMENU hMenu = CreateDLLWindowMenu(); RegisterDLLWindowClass(L"DLLWindowClass"); HWND hwnd = CreateWindowEx (0, L"DLLWindowClass", pString, WS_EX_PALETTEWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 400, 300, mIRC_window, hMenu, dllInstance, NULL ); ShowWindow (hwnd, SW_SHOWNORMAL); while (GetMessage (&messages, NULL, 0, 0)) { TranslateMessage(&messages); DispatchMessage(&messages); } return 1;}// Our new window's procLRESULT CALLBACK DLLWindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ switch (message) { case WM_COMMAND: switch(wParam) { case MYMENU_EXIT: SendMessage(hwnd, WM_CLOSE, 0, 0); break; case MYMENU_MESSAGEBOX: MessageBox(hwnd, L"Test", L"MessageBox",MB_OK); break; } break; case WM_DESTROY: PostQuitMessage (0); break; default: return DefWindowProc (hwnd, message, wParam, lParam); } return 0;}BOOL APIENTRY DllMain( HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ){ dllInstance = hModule; return TRUE;}int __stdcall dllname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) { wchar_t szFileName[MAX_PATH]; GetModuleFileName((HMODULE)dllInstance, szFileName, MAX_PATH); MessageBox(aWnd, szFileName, L"This DLL is:", MB_OK | MB_ICONINFORMATION); lstrcpyA(data, "yay"); return 3;}int __stdcall window(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) { mIRC_window = mWnd; HANDLE hThread = CreateThread(0, NULL, ThreadProc, (LPVOID)L"Window Title", NULL, NULL); if (hThread) { lstrcpyA(data, "Thread (and window) created!"); } else { lstrcpyA(data, "Thread creation failed!"); } return 3;}As you can see, the code above creates a new thread for the window, which I'm assuming is the saner way of doing this. I tried creating my window without using a new thread and the result wasn't really different (mIRC crashed).Most of my attempts = no window appears + mIRC crashesIf I'm lucky = window appears, but mIRC crashes shortly after that (the window appears because I would
2025-04-07