: Http://files.cnblogs.com/rogee/WaveObject.rar
I always envy those with water waves.ProgramHowever, I am helpless. I couldn't write it by myself. It's hard to see a friend's program asking for the source code while having this special effect. Only then did I know that it was a control of Delphi, because I really couldn't get through to Delphi, so I'm sorry.
I suddenly remembered that I had seen such a compilation on Lao Luo's site.CodeTherefore, we have a "out of track" for it. Today I have referenced a lot of information on the Internet and finally compiled it into a lib and written a corresponding header file. Haha, in the future, my program will also have such special effects.
Here I will give the source ASM files I have rewritten, The RASM project files, the compiled lib and. H files, and hope you will like them.
The specific usage is as follows:
1. Load the library file first
# Include "./waveobject. H" # pragma comment (Lib, "./waveobject. lib ")
2. By viewing the original assembly code, we can know that this library needs to be initialized with _ waveinit. Then you can call the corresponding special effect function in the corresponding message function. Therefore, we declare two variables based on the _ waveinit () parameter.
Wave_object m_waveobject; hbitmap m_hbitmap;
The initialization code is as follows:
M_hbitmap = loadbitmap (getmodulehandle (null), makeintresource (idb_bitmap1); // The loaded image resource _ waveinit (& m_waveobject, getdlgitem (callback)-> getsafehwnd (), m_hbitmap, 2,180); // idc_static1 is the image control ID _ waveeffect (& m_waveobject,) of MFC. // you can use a special effect. For more information about the parameters, see the header file.
Add a response to the click Effect
Void upload: onlbuttondown (uint nflags, cpoint point) {clienttoscreen (& Point); getdlgitem (idc_static1)-> screentoclient (& Point); _ wavedropstone (& m_waveobject, point. x, point. y, 2,256); cdialog: onlbuttondown (nflags, point);}
Right-click the switch and try again.
The code for exiting the destroy object is as follows:
void cbesunpackdlg: onclose () {_ wavefree (& m_waveobject); // release the water wave object cdialog :: onclose () ;}