![]() |
|
#1
|
|||
|
|||
DLL--i have no idea how to starthey
i'm trying to make a program that adds animation when windows are minimized (mostly because I'm using Litestep and I miss the Explorer animations). anyway, i need a system hook so that i can tell when any window is minimized or restored. for that i need a system hook, and my hook procedure, according to MSDN, needs to be in a DLL. they provide a handy example code snipped for loading the DLL with LoadLibrary(), obtaining a pointer to the hook procedure inside the DLL, and then setting the hook with SetWindowsHookEx(). but they don't mention how to make a DLL. with Dev-C++, when i create a new project and select the type DLL, all i get is: CPP / C++ / C Code:
CPP / C++ / C Code:
i have no idea how to start with this--can someone shed some light on what i need to do to put my hook procedure in this DLL and have it work? |
|
#2
|
|||
|
|||
|
ok partial solution, but this is weird, and aggravating
so i am using these instructions http://neworder.box.sk/newsread_print.php?newsid=10952 to completely sidestep the DLL issue. his example code works in Dev-C++, but i am unable to tweak it to my own usage because i want to set a WH_CBT hook and his sample code seems only to work with low-level hooks--that is, WH_KEYBOARD_LL and WH_MOUSE_LL! also, those hooks get called twice! this makes no sense to me. here is my code: (i commented out WinMain because i tried to convert it from console to windows app but it didn't work, i commented out #include "minfx.h" because i haven't implemented my own header yet, and i commented out the prototypes for winmain() and animateminimizingwindow() because they are not necessary) CPP / C++ / C Code:
|
|
#3
|
|||
|
|||
|
ok, figured it out. i had to use a DLL, and wrap the hook procedure's prototype in extern "C" { } so that C++ name mangling didn't occur.
|
Recent GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Urgent ! Pls Help Me ! | mycashmoney | C Programming Language | 4 | 01-Jul-2006 22:49 |
| start videolan program in c/c++ | Rip7 | C++ Forum | 1 | 06-Jan-2005 22:19 |
| How to start your own messenger service? | GaryD | Open Discussion Forum | 2 | 07-Dec-2004 18:55 |
| Looking for Reliable, Cheap ASP, ASP.NET MSSQL Hosting start from $4 | stevewatt88 | Web Hosting Advertisements & Offers | 1 | 31-Jul-2004 04:27 |
| Athlon system locking up on start up. Is it MoBo, Processor, PSU or what? | ebolaosu | Computer Hardware Forum | 8 | 26-Feb-2004 11:19 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The