|
toxcct wrote: in the StormSimulation:: namespace
Duh
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
I'm sorry but I cant find where is the "Storm Simulation SDK (SS SDK)"
|
|
|
|
|
I believe we're pulling your leg here.
This is a complex subject. You should be asking PhDs that work on this stuff (maybe there's some
here).
Sine waves are a start but water surface tension, wind, etc. make storm waves alot more complex.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
It has been a while since I have done this, so I can only give you a brief overview of the concept. You basically need to create a vertex shader to modify the verticies of a triangle mesh. The most obvious method to modify the verticies, is to scale their Y position based on a sin wave generated from an origin point.
Below is a code snippet used to calculate the scale:
fTime = ((fFrameTimeElapsed + fPhase) * FREQUENCY)
fScale = sin(fTime * (2*PI)) * APMLITUDE + BASE;
The phase was calculated based on the vector dot product of the position of the current vertex and the polygon normal along the vertical plane.
The actual wave can be modified by changing the amplitude and frequency, but you're not exactly going to get crashing waves with an undertoe simulation.
If you think this is along the lines that could get you started, I can send you my old source code for this written in C using OpenGL, however I didn't comment it very well, so you may be even more confused once you get it.
Dustin
|
|
|
|
|
I shudder to think of the questions you will get if you do that.
I believe there is a screen saver sample here in the OpenGL section that does something like this.
|
|
|
|
|
Provided 'AS IS' with no explicit warranties or customer support.
|
|
|
|
|
i am opening a web page through shellexecuteex. how to know that the web page is being closed by the user. is there anyway to get this event. pls help me
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Wait on the process handle you got in the SHELLEXECUTEINFO structure with e.g. ::WaitForSingleObject(...) .
Make sure you set the fMask member to include SEE_MASK_NOCLOSEPROCESS , otherwise the process handle will always be NULL .
N.B. If IE is already running, the web page will probably be displayed by the running instance of IE and in this case the process handle will be NULL since no new process was created.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
sorry i cant get you. here is my code
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = "open";
ShExecInfo.lpFile = "www.google.com";
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
TerminateProcess( ShExecInfo.hProcess,0);
CloseHandle( ShExecInfo.hProcess);
how to know the user has closed the webpage eventhough its running
-- modified at 11:01 Tuesday 10th April, 2007
|
|
|
|
|
deeps_cute wrote: how to know the user has closed the webpage eventhough its running
If the web page has been closed, how can it also be running?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
im sorry i meant that while running
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: how to know the user has closed the webpage eventhough its running
It's not very clear what you mean, but here's how I interpret your problem:
You want to show a certain web page to the user and get informed when the user has closed the web page.
If you open the web page through the DDE mechanism as you currently are, an already running instance of the browser will show the web page unless configured to explicitly create another instance in its DDE command in the registry which is wuite uncommon.
When this happens you have no way of knowing when the user closes the browser instance since no process handle will be returned.
Even if the browser is not running when you call ::ShellExecuteEx(...) , you have no idea if the user leaves the initial web page.
To my knowledge the only way to do this is running the browser as a COM server and listen for an event fired when the user browse to another page.
I think you have to think this through once again, or at least tell us what limitations you can accept. Consider using ::CreateProcess(...) to create a new browser instance every time, but you still wouldn't know if the user browses to another page.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
yes you r right
"You want to show a certain web page to the user and get informed when the user has closed the web page."
how to do this. i dont know DDE mechanism
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
As I mentioned in my previous post the only way I think would do what you want is using the browser as a COM server.
Have a look here for info about how to use the WebBrowser Control[^].
You can also search the web for more info about the WebBrowser Control.
-- modified at 5:04 Wednesday 11th April, 2007
If you're using MFC you can use CHtmlView that wraps the WebBrowser Control making it very easy to use.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi all:
Every time i write a program and after making sure that everything is okay, each time i reopen again later, i get the errors below while linking even though compiling was successfull.
I have tried using destructors for the CWinApp but it does not work. I've also tried rebuilding the whole project but still it does not work.
The setting are set to "Using MFC in a Shared DLL"
Below is the errors
Linking...
msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/ss.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
ss.exe - 2 error(s), 0 warning(s)
Please help:
Thanking you for being there.
TreeS
|
|
|
|
|
While its not a direct answer...
Have you tried using the AppWizard to make a new simple app similar to yours? (If yours is MDI, choose MDI) and then compare the project settings?
Its possible you've ticked something you shouldn't have (ie Ignore Default Libraries) etc, and this will let you spot the problem.
The other thought that occurs to me is that you're doing a Unicode project and haven't set the entry point to wWinMainCRTStartup (do a search on that if
needed)
Iain.
|
|
|
|
|
I have a windows service application. Created in windows XP and vc++.Net2005. I want this to make it work on windows 95,98,2K,XP and Vista. I want to get the username of the current logged-in user or users(if the user is switching between more than once loggin on the same machine)
I have implemented it in this format:
Added the refrences to my project that is using project properties from the toolbar. Now, wrote in this way:
CString Get_Username()
{
CString Username=_T("");
System::Management::ManagementObjectSearcher q = gcnew System::Management::ManagementObjectSearcher("Select * from Win32_Process");
System::Management::ManagementObjectCollection mc = q.Get();
System::Management::ManagementObject mo = mc.GetEnumerator();
while(!mo)
{
Username = mo("username");
mo.Get(mc);
}
return Username;
}
i am getting the following compilation errors:
.\DataSentinelService.cpp(80) : error C2664: 'System::Management::ManagementObjectSearcher::ManagementObjectSearcher(System::String ^)' : cannot convert parameter 1 from 'System::Management::ManagementObjectSearcher ^' to 'System::String ^'
No user-defined-conversion operator available, or
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\myservice.cpp(81) : error C3673: 'System::Management::ManagementObjectCollection' : class does not have a copy-constructor
.\myservice.cpp(82) : error C2664: 'System::Management::ManagementObject::ManagementObject(System::Management::ManagementPath ^)' : cannot convert parameter 1 from 'System::Management::ManagementObjectCollection::ManagementObjectEnumerator ^' to 'System::Management::ManagementPath ^'
No user-defined-conversion operator available, or
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\myservice.cpp(84) : error C2088: '!' : illegal for class
.\myservice.cpp(84) : fatal error C1903: unable to recover from previous error(s); stopping compilation
I have also tested by placing the following lines in the starting of my myservice.cpp file:
using namespace System;
using namespace System::Management;
But still the same kind of errors persists.
I have even searched on net to get the exact cause of error/problem. In the msdn also, the code samples are given for VB.Net/C# but not for vc++/C++.
Any idea please...
Thanks in advance
Anee
|
|
|
|
|
I want to program a software with VC++.The function of my software is same as the MS's Remote Desktop Client.I want to use the wtsapi32.dll or mstscax.dll to code my software,but I don't know how to use them, What should I do? Could you give me some suggestions? Sample code is best.Thank you very much!
My Email:lipingliang231@163.com.
|
|
|
|
|
It sounds as though you might want to start with a few less-ambitious projects first.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: start with a few less-ambitious projects first
Like ocean wave simulation?
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Is there some correlation between Vietnam and China?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
When I tried to build my windows application, it gave me following error.
Linking...
C:\Program Files\Microsoft Visual Studio\VC98\LIB\LIBCD.lib : fatal error LNK1127: library is corrupt
Error executing link.exe.
Can anyone tell me how to resolve the error. I tried reinstalling Visual Studio, but It didn't work.
Thanks for the prompt reply.
Regards,
Nikhs,
Nikhil Trivedi
|
|
|
|
|
It's strange. It seems that your installation is broken. :-/
Try to search web for LIBCD.lib and download other version.
|
|
|
|
|
I tried to search libcd.lib on microsoft site, but I didn't get it. You are right that there is some problem and might be my copy of Visual studio is corrupted. Is there any other solution ?
Thanks for reply.
Regards
Nikhs
Nikhil Trivedi
|
|
|
|
|