|
|
That looks like a really cool piece of technology. And at the same time it makes me very sad knowing about this, while being stuck with J2EE.
--
Gott weiß ich will kein Engel sein.
|
|
|
|
|
I am writing a simple dialog-based application in Visual C++ & don't know how to get arguments for the program. E.g. if my program is executed as :
MyProgram.exe Param1 Param2
I would like to get Param1 and Param2
I know that in Console-based applications, there is a "main(argc, argv)" but couldn't find a similar method for my dialog-based applications.
I tried the GetCommandLine, but it seems like it only returns the path to the execution program (C:\Program Files\ ... \MyProgram.exe).
Thanks a lot for any help.
|
|
|
|
|
That should return the command line arguments as well...
There are global variables (declared in stdarg) that have the command line and should be available in any VC program:
__argc,__targv
John
|
|
|
|
|
hongheo76 wrote:
I know that in Console-based applications, there is a "main(argc, argv)" but couldn't find a similar method for my dialog-based applications.
They exist in Windows applications as well, just named __argc and __argv .
hongheo76 wrote:
I tried the GetCommandLine, but it seems like it only returns the path to the execution program (C:\Program Files\ ... \MyProgram.exe).
How are you using it? The docs indicate that it can be used in the manner in which you desire. I just tried it in one of my apps and it worked fine.
Is this an MFC application? If so, have you looked at CWinApp::m_lpCmdLine ?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
There's a member variable m_lpCmdLine in the CWinApp class, and it's public. So AfxGetApp()->m_lpCmdLine where do the work.
|
|
|
|
|
You can use the argv/argc stuff or use the Win32 API function GetCommandLine().
onwards and upwards...
|
|
|
|
|
Thanks a lot
I used CWinApp::m_pCmdLine and it worked.
|
|
|
|
|
Hi all, i am building an application and i need a web browser within the tool. I have added an activeX webbrowser control and it works just fine in my view class. However, when i try to access outside the view it either via a function or a pointer, i get the following assertion error:
ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)
if (m_pCtrlSite == NULL)
Can somebody please help me out. I've spent days on this stuff and i am well behind schedule.
Thank you;
Krugger
|
|
|
|
|
Sounds like you're trying to access the member before the view containing it has been created.
Steve S
|
|
|
|
|
I have develop a sniffer application in W2K
using a RAW socket and WSAIoctl with SIO_RCVALL
as follow:
WSAIoctl(m_Socket,
SIO_RCVALL,
&l_dwBufferInLen,
sizeof(l_dwBufferInLen),
&l_adwBufferLen,
sizeof(l_adwBufferLen),
&l_dwBytesReturned,
NULL,
NULL)
I'd like to port this application in WINNT but I've
found that SIO_RCVALL is not available in WINNT.
How can I set this option for my socket in WINNT ??
Is there something like this ??
Thanks a lot.
|
|
|
|
|
Interesting.
Well if the OS does not support it then you can try including all the require Win2k and newer version DLL with the installation.
Kuphryn
|
|
|
|
|
You'd have to include the whole network stack. Don't try it - these are critical system components, and are likely to break NT 4.0 systems (not to mention being unsupported).
|
|
|
|
|
Yeah I think there is no solution as well.
Kuphryn
|
|
|
|
|
How To Make the new DBase database(new DBase file)??? Where to read about this???
|
|
|
|
|
Are you wanting to create a new DBase file (.dbf extension) programmatically?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Yes, that's exactly what i want .
And additional information about it.
|
|
|
|
|
How would you create the database/table(s) manually? Whatever the commands are, you should be able to do the same thing with the CDatabase::ExecuteSQL() method.
ExecuteSQL("CREATE DATABASE MyDb");
ExecuteSQL("CREATE TABLE table1 (Name TEXT(15), Address TEXT(25), Age INTEGER)");
It's been over a decade since I've used DBase-type files so the actual syntax may be off. Hopefully it gives you a starting point if nothing else.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
OK. Now I'm, uhhh I gon..., ahhhhhh. I don't have any idea what is THE PROBLEM. I set all stuff like this text down there but when I change light2 position from light2_position[]={10.0,0.0,10.0,0.0}; to light2_position[]={10.0,0.0,10.0,1.0}; (last number from 0.0 to 1.0 // directional to positional type of light) there is no lightning at all. It's just change of light type not position and other stuff. All setup code:
GLfloat light2_ambient[]={0.1,0.1,0.1,1.0};<br />
GLfloat light2_diffuse[]={1.0,1.0,1.0,1.0};<br />
GLfloat light2_specular[]={1.0,1.0,1.0,1.0};<br />
GLfloat light2_position[]={10.0,0.0,10.0,0.0};<br />
GLfloat light2_spot_direction[]={0.0,0.0,0.0};<br />
GLfloat light2_spot_exponent[]={1.0};<br />
GLfloat light2_spot_cutoff[]={45.0};<br />
GLfloat light2_quadric_attenuation[]={1.0};<br />
GLfloat light2_linear_attenuation[]={1.0};<br />
GLfloat light2_constant_attenuation[]={1.0};<br />
<br />
glLightfv(GL_LIGHT2, GL_AMBIENT,light2_ambient);<br />
glLightfv(GL_LIGHT2, GL_DIFFUSE,light2_diffuse);<br />
glLightfv(GL_LIGHT2, GL_SPECULAR,light2_specular);<br />
glLightfv(GL_LIGHT2, GL_POSITION, light2_position);<br />
glLightfv(GL_LIGHT2, GL_SPOT_DIRECTION, light2_spot_direction);<br />
glLightfv(GL_LIGHT2, GL_SPOT_EXPONENT, light2_spot_exponent);<br />
glLightfv(GL_LIGHT2, GL_SPOT_CUTOFF, light2_spot_cutoff);<br />
glLightfv(GL_LIGHT2, GL_CONSTANT_ATTENUATION, light2_constant_attenuation);<br />
glLightfv(GL_LIGHT2, GL_LINEAR_ATTENUATION, light2_linear_attenuation);<br />
glLightfv(GL_LIGHT2, GL_QUADRATIC_ATTENUATION, light2_quadric_attenuation);
something missing???????? Why is it working as directional and not as positional??? I didn't say that if light2_spot_cutoff[]={45.0}; is 180.0 and not something form 0.0 to 90.0 then it works again. WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
<<s@t@n>>
|
|
|
|
|
For graphics questions you might try www.gamedev.com or www.flipcode.com, both sites have people who may be better able to help.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Something is corrupting the heap in a 75K-line C++ console program. Normally a little sluething catches these, but this one does not occur in debug mode (where we can check heap consistency with _CrtCheckMemory) -- only release, and mini-dumps are not much help. Happens on XP, but the program is not doing anything particularly fancy -- just using plain only Win32 API's.
I've heard there are tools out there that can track this sort of thing down, particularly one called "Purify." Any recommendations or advice on these? Particularly, do they work well in practice?
Would greatly appreciate any advice.
|
|
|
|
|
Here is a free tool (Debugging Tools for Windows) from MS: http://support.microsoft.com/?kbid=268343
Also w2k resource has plenty of useful utilities:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/default.asp
No fancy UI, but they are fast and work well.
Edward
|
|
|
|
|
|
I'm developing a code in VC++ .NET to read XY data from a file, present the user with a simple plot of the data, allow the user to select the range of good data to use, and then, with the user's inputs, use that range of data for the rest of my calculations. What is the best way to plot the data from VC++ .NET?
Thanks,
Kevin
|
|
|
|
|
Best way is via drawing lines using MFC.
Kuphryn
|
|
|
|