|
Hallo everybody, I am developing in Visual C++ and i finish my application, but now i have a seious dudad because i want that my application start when Windows XP start too without i do double click in the exe file of my application.
Can somebody help me?
Tack.
|
|
|
|
|
Make Reg Entry in Registry containing path of your application which you want to run at startup.
// For all user
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
//for Current User
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
But i have a question, i understand that you told me but if my application is running in other user and i dont want that the other user (both in the same comuter) can stop the application like for example remove this entry in the register and the next time that the computer start, it will not start.
If it is possible?
Because i need a application that work in the computer but only one user can use it and it doen't matter who start the computer and who log in, i want that always start to work.
Than you very much.
|
|
|
|
|
You should add the following value to registry subkey :
value:
"AnythingYouWantAsName" = "YourProgramPath"
// for example "Appliction" = "c:\myprogram.exe"
to the registry subkeys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\
so your application runs every time windows starts.
m0n0
|
|
|
|
|
no need to post smthing that was already answered, especially when you don't say more...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
While this is a true statement, you can't assume that Giorgi knew that an answer had already been posted. A common method for me when replying to posts is to right-click on each of the posts that I want to reply to and select Open in New Window. At this point I go through each one, re-read it, type my response, and submit it. It may be 30-45 minutes before I get to the last one and several others might have replied in the meantime.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes David ,thats exactly how i posted my answer , i did not know that anybody had already answered it .
m0n0
|
|
|
|
|
Its Not your business what i post here and what not!
I simply had not viewed what "ThatsAlok" had posted..
m0n0
|
|
|
|
|
|
but you also dispose of a [delete] link for your posts...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
If you had written it as an NT Service, you could mark it startup type as AUTOMATIC. Then it could run without a user being logged in without much trouble.
If you already have an EXE that has a user interface, then it is better to use the RUN method, as suggested. Another option is to add a shortcut to the Start Menu | Programs | Startup item to cause your progrma to run when the user logs in. This is more 'apparent' to the user than some 'hidden ' registry value.
|
|
|
|
|
Hi, my application will not have a user interface, so i dont understan what is the "mark it starup type as automatic" and where i mark it.
And another cuestion is if for example i have 2 different users and in one user have running the application but i dont want that the other can't stop this application, it is possible, doing it like u say in the sartup?
|
|
|
|
|
If you have a Windows NT service, and its configuration is to run 'Automatic' it will start when Windows starts and will be running already for each user.
If you don't want a particular user to be able to stop a service, make sure he is not an administrator on the local machine, or else deny them the start/stop service security privilege.
|
|
|
|
|
Sorry but i dont understand the configuration in Automatic, can u explain me?
Thanks
|
|
|
|
|
Hi
I am used to check the internet connection through vc++(mfc)
and i have checked it through InternetGetConnectedState which shows only the network connection (LAN).I want to check the actual internet connection trough the mfc. If lan is not there and internet connection is there it shold check and show right result.
Waiting for the +ve reply as soon as possible
Best Regards
ganesh
|
|
|
|
|
Anonymous wrote:
InternetGetConnectedState which shows only the network connection (LAN).
Actually the first argument to InternetGetConnectedState() is a mask that can be used to check any of the following situations:- Local system has a valid connection to the Internet, but it might or might not be currently connected.
- Local system uses a local area network to connect to the Internet.
- Local system uses a modem to connect to the Internet.
- Local system is in offline mode.
- Local system uses a proxy server to connect to the Internet.
- Local system has RAS installed.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
How to get the click time of one picture in the IE control?(tool: VC)
To collect the click time of one picture in the IE contral, but this picture hasn't new URL to connecte.
How to get it?
thanks!
no
|
|
|
|
|
Hi,
i'm reading an AVI using Video for Windows VfW. Using AVIFILEINFO structure, i'm able to obtain the height, width etc. But how do i obtain the frame bitdepth(8-bit, 14,32 bit?)?
|
|
|
|
|
I am having trouble with this code. This is giving output as mesgbox with 0, ie successful, but is not filling the image. Please look in to it. I want to replace all connected pixels of a particular color with another color. Normal function outruns stack memory.
Any suggestions will be appreciated.
void dlg::OnButton1()
{
CClientDC* hdc= new CClientDC(this);
CFileDialog fd(1,0,0,0,"Bit Map(*.bmp)|*.bmp||");
fd.m_ofn.lpstrTitle="Browse";
if(fd.DoModal()==IDOK)
{
str=fd.GetPathName();
HBITMAP hBmp = (HBITMAP)::LoadImage(NULL,str,
IMAGE_BITMAP,0,0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);
bmp.Attach(hBmp); //bmp is member of the class dlg
CClientDC dc(this);
bmDC.CreateCompatibleDC(&dc);
pOldbmp = bmDC.SelectObject(&bmp);
BITMAP bi;
bmp.GetBitmap(&bi);
dc.BitBlt(0,0,bi.bmWidth,bi.bmHeight,&bmDC,0,0,SRCCOPY);
bmDC.SelectObject(pOldbmp);
}
}
void dlg::OnLButtonDown(UINT nFlags, CPoint point)
{
COLORREF rgb;
CClientDC dc(this);
CQuickFill qf;
int i;
rgb=RGB(255,10,10);
i=qf.QuickFill(&bmp,point.x,point.y,rgb,CLR_INVALID);
if(i==0)
MessageBox("0","0");
if(i==-1)
MessageBox("1","1");
if(i==-2)
MessageBox("2","2");
if(i==-3)
MessageBox("3","3");
CDialog::OnLButtonDown(nFlags, point);
}
Awasthy
Any work worth doing is worth doing well.
|
|
|
|
|
Hi
I have developed a windows based service in C++ which runs on Windows 2000 Professional OS.
It is a multithreading service in which first it creates one master thread then it creates number of child thread in suspended mode. Now this child thread when resumed...gets the details needed....
For this I use Semaphore to synchronize the threads and WaiForSingleObject() functions to make it work properly.
It is like ....
---------------
if ( WaitForSingleObject(threadHandle,INFINITE) == WAIT_OBJECT_0 )
{
Do some work here.....
}
---------------
But some time it stucks waiting more time to finish so that new thread can start and continue working. So is there any other idea how can I make it run fast ?
Thankx in advance.
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Depending upon what task your 'worker' threads are performing, you can always consider LOWERING their thread priority so that your 'controller' thread has a higher priority and the controller thread will get serviced more frequently when there is a task for it to perform, such as starting more worker threads.
You also might consider creating less worker threads and using a round-robin subdivision of the tasks to be performed, assuming your implementation can afford such a redesign. If each of these threads does not necessarily have to block on something, like a file handle or other event, then perhaps all the servicing can be done from a single thread that processes data for each item in turn, each time the thread executes. If you are making too many threads, your process will spend a significant per-unit amount of time switching threads constantly instead of getting 'real' work done.
|
|
|
|
|
I want to make a tooltip which could show each item(picture)'s thumbnail on the tooltip, but just use LVN_GETINFOTIP message is not enough, as the LPNMLVGETINFOTIP only let me pass in limit string, So is there any way to draw on the List Ctrl's tooltip?
Thanks a lot! any comment is welcom
|
|
|
|
|
Hi,
Instead of creating a new MFC Active-X project, i reused an existing project. But, when both the controls are being used simultaneously, i have the issue of same class-id for both the controls. How do i change the class-id of the control?
The active-x is being rendered on a web-page. Two different controls are needed and because of the same class-id i'm not able to use them.
Please help.
Thanks and Regards
Vikram Attiganal
|
|
|
|
|
Go through all your source files and change the GUID. I haven't done AX controls in MFC in ages, so I don't know off-hand which files to look at, but at the miniumum it will be the IDL or ODL file, and the code used for registration/unregistration of the server.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|