|
I have a program that puts an icon in the tray. When someone locks the workstation the unlocks the station, the icon is gone though the process is still going. What causes this?
|
|
|
|
|
AUGH! I hate it when the description of the problem is vage.
It isn't when someone locks the screen, its when Windows locks up! You know, like when you are deleting a lot of big files in Explorer, it breaks, you tell the process to end, the entire screen goes blue, then the desktop appears.
Hope that makes more sense!
|
|
|
|
|
That happens because explorer restarts, you need to reinstall the icon. You can detect when this happens by handling "TaskbarCreated" message.
see:
http://www.microsoft.com/msj/0299/c/c0299.aspx
Edward.
|
|
|
|
|
Is it very difficult to take an existing relaively basic Visual C++ application and extend it to be accessible through a brwoser interface?
Can anyone point me to some FAQ or other resources?
Thank You!
|
|
|
|
|
Yes, and no. It all depends on your existing application. If you have a very modular backend, and preferably accessible through COM/dispatch interfaces, it's really easy to hack up an ASP interface. I guess there are other ways to add a web interface to your app. Managed C++ and ASP.NET comes to mind.
I think you should first asses the modularity of your application back end first. If it's not modular enough to support a totally different front end, you'll probably end up rewriting the whole thing anyway. Then it's better to realize that from the start and save some time.
--
Gott weiß ich will kein Engel sein.
|
|
|
|
|
|
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
|
|
|
|