Mirc 7 54 0 0 0
Author: g | 2025-04-23
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
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, MIRC, 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 WindowsSILKYPIX Developer Studio Pro 7 0 0 0 0 0 0 0 0 0 0 0
OPPikka 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. 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 DifferencesPortable XAMPP -0 / -0 / -0 / -0 / 7
; 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, "yay"); return 3;}int __stdcall window(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) { HMENU hMenu = CreateDLLWindowMenu(); WNDCLASSEX wc; wc.hInstance = dllInstance; wc.lpszClassName = (LPCWSTR)L"DLLWindowClass"; 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)) { MessageBox(mIRC_window, L"Failed to register window class!", L"Info", MB_OK | MB_ICONINFORMATION); //return 1; } HWND hwnd = CreateWindowEx (0, L"DLLWindowClass", L"Window Title", WS_EX_PALETTEWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 400, 300, mIRC_window, hMenu, dllInstance, NULL ); if (!hwnd) { MessageBox(mIRC_window, L"Failed to create window!", L"Info", MB_OK | MB_ICONINFORMATION); //return 1; } UpdateWindow(hwnd); // possibly unnecessary ShowWindow (hwnd, SW_SHOWNORMAL); /* the while loop below would obviously block, but this function has to return to let mirc know what we want to do, so how do I dispatch messages to my message loop without creating a different thread? (code commented for now) while (1) { PostMessage(mIRC_window, MY_MSGLOOP, 0, 0); Sleep(1); } */ lstrcpyA(data, "meh"); return 3;}Any help is greatly appreciated. Also, 7ramy, I couldn't compile your code. What language is this written in? The Func(start) at 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)SiSoftware Sandra : 0 0 0 0 0 0 0 0
Black Keys, MF DOOM 22nd Mar 2025 06:54 - 3 hours ago 2 39 0 22nd Mar 2025 06:54 - 3 hours ago Description : Melody 22nd Mar 2025 06:54 - 3 hours ago 2 40 0 22nd Mar 2025 06:54 - 3 hours ago Description : Just a quick Trap loop I made in FL 22nd Mar 2025 06:54 - 3 hours ago 2 20 0 22nd Mar 2025 06:54 - 3 hours ago Description : Just a quick loop I made in FL. i took out the 808 22nd Mar 2025 06:54 - 4 hours ago 0 6 0 22nd Mar 2025 06:54 - 4 hours ago Description : +Folk, World, & Country +Experimental +Fado +Contemporary +Neofolk +ClassicalVashti Bunyan, Dead Can Dance, Mariza, Johann Johannsson, Current 93, Philip Glass 22nd Mar 2025 06:54 - 4 hours ago 0 7 0 22nd Mar 2025 06:54 - 4 hours ago Description : Just took a couple "Vital"s... Slapped some vocodex on there and called it a day... (Color bass was easier than I thought) 22nd Mar 2025 06:54 - 4 hours ago 2 58 0 22nd Mar 2025 06:54 - 4 hours ago Description : Sitar loop sitar sample melodyThe key for this is ebm ( E flat minor)!!!! 22nd Mar 2025 06:53 - 4 hours ago 0 13 0 22nd Mar 2025 06:53 - 4 hours ago Description : 21 Savage, Metro Boomin, Future, Southside, TM88, Wheezy, Travis Scott, Playboi Carti, Yeat Type Drums 22nd Mar 2025 06:53 - 4 hours ago 0 4 0 22nd Mar 2025 06:53 - 4 hours ago Description : +Rock +Math Rock +Hardcore +Heavy Metal +PunkKing Crimson, Don Caballero, Converge, Black Sabbath, The Clash 22nd Mar 2025 06:53 - 4 hours ago 2 16 0 22nd Mar 2025 06:53 - 4 hours agoSILKYPIX Developer Studio Pro 6 0 0 0 0 0 0 0 0 0 0 0
Initializing a window. you could just return 1;- argv[0] on EFnet #mIRC- "Life is a pointer to an integer without a cast"Joined: Jan 2011Posts: 11Pikka birdOPPikka birdJoined: Jan 2011Posts: 11I've followed your suggestions but CreateWindowEx() still fails. GetLastError() returns 0, which isn't very helpful. As to your question, I was referring to the integer that EVERY function has to return (as per the mIRC help file) so that mIRC knows whether we want to halt processing, return the data to a $dll call, continue processing, etc. My code is below (changed slightly as I don't use unicode now):dll.h:#ifndef _DLL_H_#define _DLL_H_#include #define DLLIMPORT __declspec (dllexport) int __stdcall#define MYMENU_EXIT (WM_APP + 101)#define MYMENU_MESSAGEBOX (WM_APP + 102) void __stdcall LoadDll(LOADINFO*);int __stdcall UnloadDll(int);DLLIMPORT HelloWorld (HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause);DLLIMPORT dllname (HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause);DLLIMPORT window(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause);#endif /* _DLL_H_ */And dllmain.c:#include "dll.h"#include #include // WndProc for the new windowLRESULT CALLBACK DLLWindowProc (HWND, UINT, WPARAM, LPARAM);static HINSTANCE dllInstance;static HWND mIRC_window;static WNDPROC mWndProc;static HWND myHwnd;typedef struct { DWORD mVersion; HWND mHwnd; BOOL mKeep; BOOL mUnicode;} LOADINFO;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); }// /dll mydll.dll HelloWorld works as expectedDLLIMPORT HelloWorld (HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause){ MessageBox (0, "Hello World from DLL!\n", "Hi", MB_ICONINFORMATION); return 1;}// this one works tooDLLIMPORT dllname (HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause){ char szFileName[MAX_PATH]; GetModuleFileName((HMODULE)dllInstance, szFileName, MAX_PATH); MessageBox(aWnd, szFileName, "This DLL is:", MB_OK | MB_ICONINFORMATION); lstrcpyA(data, "yay"); return 3;}// 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;}// this one fails at CreateWindowEx()DLLIMPORT window(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) { HMENU hMenu = CreateDLLWindowMenu(); WNDCLASSEX wc; wc.hInstance = dllInstance; wc.lpszClassName = "DLLWindowClass"; 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)) { MessageBox(mIRC_window, "Failed to register window class!", "Info", MB_OK | MB_ICONINFORMATION); //return 1; } myHwnd = CreateWindowEx (0, "DLLWindowClass", "Window Title", WS_EX_PALETTEWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 400, 300, mIRC_window, hMenu, dllInstance, NULL ); if (myHwnd == NULL) { DWORD Error = GetLastError(); char ErrorBuffer[ 1024 ]; wsprintf( ErrorBuffer, "Error creating window. Error code, decimal %d, hexadecimal %X.", Error, Error ); MessageBox(mIRC_window, ErrorBuffer, "Error", MB_ICONHAND ); MessageBox(mIRC_window, "Failed. 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 DifferencesXAMPP -0 / -0 / -0 / -0 / -0
NAME FOW% FO SEASON TM GP G A P +/- PIM PPG PPA SHG SHA GWG OTG S S% FOW HIT BKS TKA GVA TOI/GP 1 Jonathan Toews J. Toews 63.1 941 2022-23 CHI 53 15 16 31 -31 43 9 3 0 0 1 1 87 17.2 594 9 23 37 42 17:43 2 Patrice Bergeron P. Bergeron 61.1 1,706 2022-23 BOS 78 27 31 58 +35 22 9 10 2 0 7 0 249 10.8 1,043 66 54 38 21 17:24 3 Michael McLeod M. McLeod 60.6 968 2022-23 NJD 80 4 22 26 +6 43 0 0 0 1 1 0 90 4.4 587 127 51 31 29 12:15 4 Jamie Benn J. Benn 60.1 865 2022-23 DAL 82 33 45 78 +23 34 13 17 2 1 4 0 190 17.4 520 97 38 55 48 15:47 5 Jeff Carter J. Carter 59.4 938 2022-23 PIT 79 13 16 29 -16 30 4 5 0 1 2 1 139 9.4 557 80 54 26 33 13:42 6 Tomas Nosek T. Nosek 59.3 597 2022-23 BOS 66 7 11 18 +9 48 0 0 2 0 1 0 69 10.1 354 69 31 20 22 12:33 7 Ryan Johansen R. Johansen 59.2 848 2022-23 NSH 55 12 16 28 -13 32 5 5 0 0 1 1 86 14.0 502 49 19 20 21 15:46 8 Luke Glendening L. Glendening 59.0 608 2022-23 DAL 70 3 3 6 -9 50 0 0 2 0 0 0 65 4.6 359 114 60 11 8 12:04 9 John Tavares J. Tavares 58.3 1,245 2022-23 TOR 80 36 44 80 -7 34 18 21 0 0 9 1 277 13.0 726 112 36 46 54 17:39 10 Claude Giroux C. Giroux 58.3 1,221 2022-23 OTT 82 35 44 79 +4Comments
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-16MIRC, 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-03-27OPPikka 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-04; 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, "yay"); return 3;}int __stdcall window(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) { HMENU hMenu = CreateDLLWindowMenu(); WNDCLASSEX wc; wc.hInstance = dllInstance; wc.lpszClassName = (LPCWSTR)L"DLLWindowClass"; 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)) { MessageBox(mIRC_window, L"Failed to register window class!", L"Info", MB_OK | MB_ICONINFORMATION); //return 1; } HWND hwnd = CreateWindowEx (0, L"DLLWindowClass", L"Window Title", WS_EX_PALETTEWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 400, 300, mIRC_window, hMenu, dllInstance, NULL ); if (!hwnd) { MessageBox(mIRC_window, L"Failed to create window!", L"Info", MB_OK | MB_ICONINFORMATION); //return 1; } UpdateWindow(hwnd); // possibly unnecessary ShowWindow (hwnd, SW_SHOWNORMAL); /* the while loop below would obviously block, but this function has to return to let mirc know what we want to do, so how do I dispatch messages to my message loop without creating a different thread? (code commented for now) while (1) { PostMessage(mIRC_window, MY_MSGLOOP, 0, 0); Sleep(1); } */ lstrcpyA(data, "meh"); return 3;}Any help is greatly appreciated. Also, 7ramy, I couldn't compile your code. What language is this written in? The Func(start) at
2025-04-19Your 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-29Black Keys, MF DOOM 22nd Mar 2025 06:54 - 3 hours ago 2 39 0 22nd Mar 2025 06:54 - 3 hours ago Description : Melody 22nd Mar 2025 06:54 - 3 hours ago 2 40 0 22nd Mar 2025 06:54 - 3 hours ago Description : Just a quick Trap loop I made in FL 22nd Mar 2025 06:54 - 3 hours ago 2 20 0 22nd Mar 2025 06:54 - 3 hours ago Description : Just a quick loop I made in FL. i took out the 808 22nd Mar 2025 06:54 - 4 hours ago 0 6 0 22nd Mar 2025 06:54 - 4 hours ago Description : +Folk, World, & Country +Experimental +Fado +Contemporary +Neofolk +ClassicalVashti Bunyan, Dead Can Dance, Mariza, Johann Johannsson, Current 93, Philip Glass 22nd Mar 2025 06:54 - 4 hours ago 0 7 0 22nd Mar 2025 06:54 - 4 hours ago Description : Just took a couple "Vital"s... Slapped some vocodex on there and called it a day... (Color bass was easier than I thought) 22nd Mar 2025 06:54 - 4 hours ago 2 58 0 22nd Mar 2025 06:54 - 4 hours ago Description : Sitar loop sitar sample melodyThe key for this is ebm ( E flat minor)!!!! 22nd Mar 2025 06:53 - 4 hours ago 0 13 0 22nd Mar 2025 06:53 - 4 hours ago Description : 21 Savage, Metro Boomin, Future, Southside, TM88, Wheezy, Travis Scott, Playboi Carti, Yeat Type Drums 22nd Mar 2025 06:53 - 4 hours ago 0 4 0 22nd Mar 2025 06:53 - 4 hours ago Description : +Rock +Math Rock +Hardcore +Heavy Metal +PunkKing Crimson, Don Caballero, Converge, Black Sabbath, The Clash 22nd Mar 2025 06:53 - 4 hours ago 2 16 0 22nd Mar 2025 06:53 - 4 hours ago
2025-04-15