|
that depends on the language windows is running...
for the french version, copy you exe into C:\Documents and Settings\"your user name"\Démarrer\Programmes\Démarrage
there should have a way to get this folder directly...
TOXCCT >>> GEII power
|
|
|
|
|
SHGetSpecialFolderLocation(..)
with csidl
CSIDL_DESKTOP
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
All these starts only when user logs in.
another way is to place exe path in
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
or
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
the simplest method is
under the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
create a String type key and put full path of your exe
like c:\YourFolder\YourExe.exe
I want to change Myself..Can u help me?
|
|
|
|
|
By placing my exe in the given path, its not activated when Windows starts up
|
|
|
|
|
By placing my exe in the following path(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run), the exe does not starts running automaticaly when Windows starts up
|
|
|
|
|
please once more verify the path you given in registry.
that will work..
I want to change Myself..Can u help me?
|
|
|
|
|
Helloo
i think every body told you the registry value but how implement is still i think any body told
so here it is->
CRegKey a;
a.Create(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
a.SetValue("you project path","your project name");
a.Close();
Got it i think
Alok Gupta
visit me at http://alok.stormpages.com
|
|
|
|
|
|
his problem is not in creating the registry value,
it can be created by manually or by program, the PROBLEM is that didnt work in his computer..!!!!!!!!
I want to change Myself..Can u help me?
|
|
|
|
|
Does anyone know of a way to discover all of the preprocessor defines that are set before and during the VC++ compilation of a module? I just want to know the results after plowing through a morass of headers. GNU CPP has such an output. Does VC++? Thanks.
Chas L.
|
|
|
|
|
|
Thanks, but as you know that gives me the result, not the cause of the emitted code.
I figured out I can use the GNU cpp.exe to get most of the info I want. Just need to get at all the built-in MSC defines. There is a list of them in the compiler docs, but it seems to be a small number of them...
Thanks again.
Chas L
|
|
|
|
|
Hi,
Is there a set of commands that deals programatically with FTP ?
My "WishList" will be something like:
Handle h=OpenConnection (Hostname, Username, passwrod);
h->Send...
s->receive...
Anything like that ?
Shay
|
|
|
|
|
Are you looking for CFtpConnection
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
OK, we are getting there.....
Can you give me a small example of how CFtpConnection will connect to a host named ABCD with user XX and password YY ?
Thans a lot
Shay
|
|
|
|
|
Click[^]
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Hi,
I'm a relative newcomer to the MFC world with a question on static library and dialog boxes.
I have two projects, MIM and MCB, MCB is also used to create a static library MCB_Library. MIM links into the MCB_Library and calls several methods which are used for data processing. One of the methods called is supposed to create a dialog box for user input.
When executing the code, the doModal routine is called, but the dialog box doesn't appear.
Is there a way to use modal dialogs across two projects or does the MCB project have to create a modeless dialog box for use by MIM ?
If I'm not clear, I apologize in advance, and will try to fill in more.
Thank you.
liobsynde
--Wish I had something great to say here, but the good ones have already been taken...
|
|
|
|
|
has the dialog resource properly linked to the exe ?
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
There are two projects each with their own resources (MIM.rc and MCB.rc) In the MCB_Library there is a MCB.res file. how do I ensure that this is properly linked to the MIM executable ?
Thank you for being patient with a MFC newbie...
liobsynde
|
|
|
|
|
i am not sure this will work or not, but can you try providing the .res file in the link tab of project settings ?
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
It didn't work. It doesn't like having an additional res file specified.
The creator of the MCB project is going pull out the resources for the two dialog boxes that I need so that I can include just those resources. And try from that angle.
Thank you for your help/ideas.
liobsynde
--Wish I had something great to say here, but the good ones have already been taken...
|
|
|
|
|
Sorry that i could not be of much help.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Ideally, the data processing library (MCB_Library ) shouldn't contain any GUI calls. If there's a need for MCB_Library to get information from the client application at run-time, you might want to make MCB_Library call into its client and execute a known data retrieval method.
For example, define an interface (an abstract base class with a single pure virtual method) called IMCB_Client .
class IMCB_Client
{
public:
IMCB_Client() {};
virtual ~IMCB_Client() {};
public:
virtual bool getDataFromUser
(void* pData) = 0;
} Your MIM application should "implement" the interface (by simply multiply inheriting from IMCB_Client ), like so:
class CMimApp : public CWinApp,
public IMCB_Client()
{
...
public:
bool getDataFromUser
(void* pData);
} The implementation of CMimApp::getDataFromUser() should display the appropriate dialog and store the desired information in pData . The method could return false to indicate the data is not available. CMimApp should register itself as a client of MCB_Library . This just means storing a pointer to CMimApp in MCB_Library .
Finally, replace your call to display the dialog in MCB_Library with this code:
ASSERT (m_pClient != NULL);
DATA someData;
bool bGotData = m_pClient->getDataFromUser (&someData);
if (bGotData)
...
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I want to shut down my computer at a certain time of the day, so I wrote a small program that calls InitiateSystemShutdownEx() and scheduled it using the Task Scheduler. The program works whenever I'm logged in on my computer. However when I'm logged off (i.e. the computer displays the welcome or logon screen), the shutdown doesn't occur. The scheduler does show that the program was executed, so I'm guessing it might have something to do with security.
Here's a section of the code:
if (!mode)
{<br />
HANDLE procHnd, tokHnd;<br />
<br />
procHnd = GetCurrentProcess();<br />
if (!OpenProcessToken(procHnd,TOKEN_ADJUST_PRIVILEGES,&tokHnd))<br />
return;<br />
<br />
TOKEN_PRIVILEGES tp;<br />
LUID luid;<br />
<br />
if (!LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &luid))<br />
return; <br />
<br />
tp.PrivilegeCount = 1;<br />
tp.Privileges[0].Luid = luid;<br />
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;<br />
<br />
AdjustTokenPrivileges(tokHnd, FALSE, &tp, 0, NULL, 0); <br />
<br />
InitiateSystemShutdownEx(NULL, NULL, 15, TRUE, FALSE, SHTDN_REASON_FLAG_PLANNED);<br />
<br />
}<br />
else if (mode == 1)
SetSuspendState(FALSE,TRUE,FALSE);<br />
else if (mode == 2)
SetSuspendState(TRUE,TRUE,FALSE);
I tried using ExitWindowsEx() but have the same problem. However, hibernating does work when I'm logged off.
I'm puzzled
reymano
|
|
|
|