 |
|
|
 |
|
|
 |
|
 |
followed all the suggested modifications in this forum and it still crashes. (if I put this on a dialog when I do it modal will crush the application...) Has anyone a cleaner version of this? Thank you in advance
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Does anybody know how to do something like this in C# or VB?
Is it possible to compile the C++ code to a dll that can be used in C# or VB?
Cheers, Johnny J.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I just port the water part to my project and find a memory leak  In fuction: BOOL CDIBSectionLite::SetBitmap(LPBITMAPINFO lpBitmapInfo, LPVOID lpBits), // Flush the GDI batch queue GdiFlush();
memcpy(m_ppvBits, lpBits, dwImageSize); // add to fix memort leak delete [] lpBits;
Here the lpBits pointed memory is not used anymore, should be free here.
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
 |
first of all i want to thank you for this Beautiful work. nut when i imported the files to my project i faced this error:
fatal error C1010: unexpected end of file while looking for precompiled header directive CPlasmaRoutine.cpp
for the four classes.
what causes the error here?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
I downloaded the sample code and everything is very specific to the main dialog. If I wanted to use your code in another project I would have to do a lot of copying and pasting to make the work (Ex: I would have to put a timer, mouse move, and left mouse down events in every class I wanted to do this). It just doesn't make sense to do this. Why not make a class....derived from CStatic and put timer and all the other events there. The MouseMove can be down with a timer and the LMouseButtonDown event can be down with a MouseHook.
Chris
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
I will second that. These classes were certainly coded for a specific project. They are not re-usable at all. I am in the process of stripping them down and adding them to some projects, but I am getting error after error. There are memory leaks, hard coded variables, little in the line of error testing and relies on very few functions from the dib wrapper.
Why weren't they prepped into somethig more usable?
|
| Sign In·View Thread·PermaLink | 2.33/5 (2 votes) |
|
|
|
 |
|
 |
I stated in my article "I pulled these out of my code archive, dusted them off, and made a little project that some people might find useful.".
So "Why so complicated???". Its not. It is a demo.
>>These classes were certainly coded for a specific project. They are not re-usable at all. I am in the process of stripping them down and adding them to some projects, but I am getting error after error. There are memory leaks, hard coded variables, little in the line of error testing and relies on very few functions from the dib wrapper.<<
I never stated they were totally re-useable. They illustrate how to achieve the effects and are encapsulated enough for you to do what your doing - adapting the concept/pieces of code to your own purposes.
If you are wondering why on earth you can not just plug it right into your own project - it is because I pulled it out of one of my old projects and wrapped it just enough to share it with you.
I am not sure if you were complaining or just stating a fact. If you were complaining - get over it.
|
| Sign In·View Thread·PermaLink | 5.00/5 (8 votes) |
|
|
|
 |
|
|
 |
|
 |
I am a big fan of Delphi programming and I was wondering if you can do a SpecialFX DLL because I want badly to "import" your effects in my applications.
P.S: Please excuse my bad english...I am Romanian.
10x.
The brain doesn't need blood. It just needs to be kept wet.
|
| Sign In·View Thread·PermaLink | 2.80/5 (2 votes) |
|
|
|
 |
|
 |
Im really sorry if this is stupid.
But I have another dialog (actually im using the About dialog) and on there i have another bmp.
When I add the effect I see the image and then it goes to the effects but with a black background, and no bitmap ??
I have a new "CPictureHolder myTmpPicture2;" on the initdialog of about.
where am i going wrong. any help would be much appreciated. as much as i appreciate you posting this tutorial, thumbs up; top marks!
kurt
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
You still have to add the water effect first, and turn it off in OnTimer if you don't want it.
I mean water effect seems to be the basic one.
Got it?
Zhang Hong@Shanghai.China
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
When i tried using the water effect i got this error e:\Microsoft Visual Studio .Net 2003\Projects\MacroSaver\CWaterRoutine.cpp(402): error C2668: 'sqrt' : ambiguous call to overloaded function I'm not that good at C++ yet so i dunno how to fix it Thanks
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Show me the line - sounds like you might need to cast something. the overloaded function means that the compiler can not tell which version of sqrt you want to call.
|
| Sign In·View Thread·PermaLink | 4.56/5 (3 votes) |
|
|
|
 |
|
 |
i do not know why, but i deal with it like this int((radius-sqrt(square))*((float)(height))); --> int((radius-(int)sqrt((float)square))*((float)(height)));
it works well.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
I must say this is a excellent job.^_^ But I really want to know the principle of the water effect.Would you please send me some article about the water effect?
|
| Sign In·View Thread·PermaLink | 2.00/5 (3 votes) |
|
|
|
 |
|
 |
I dont have an article on the water effect but you could probably find numerous links on google:
Heres a link (aptly titled "The water effect explained"):
http://www.gamedev.net/reference/articles/article915.asp
The principle thing about these effects is the use of buffers and essentially over-drawing them on top of each other. Fairly simple in coding but stunning results can be achieved. There are tons of screensavers and audio-gadgets that use similair techniques.
Hope this helps.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
I just wanted to let you know that I used your project to create an executable file with 2 modifications. I've changed the file icon and the background bitmap picture. I wanted to ask you if it is ok that I send it to one of my friends. I will tell my friend that this is your work. By the way, your article is very good. It's really cool.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |