|
JM2251 wrote: yes this will hide the command prompt but what about the other application which will launch through command prompt.
You're correct: Cmd is hidden but the app it's executing not. Some solutions:
- create a shortcut to the exe and run that one. In the shortcut you can set options to hide it.
- If it is a console app you could route the display output to a NULL device (example:
Dir > null). See createprocess options.
Hope this helps
|
|
|
|
|
What type of exe you are using...?
|
|
|
|
|
|
First try with SW_SHOWNORMAL mode. if it is working fine then try with SW_HIDE. If it is also not working then check the exe path and command line arguments.
Is it running in normal mode when you using SW_HIDE argument...?
|
|
|
|
|
how can i typecast LPSTR to DWORD_PTR?
DWORD_PTR nBmpID = GetItemData(hTSelItem);
LPSTR lpNodeData = (LPSTR)GlobalLock(hgNodeData);
((DWORD_PTR)lpNodeData) = nBmpID;
shows error
error C2106: '=' : left operand must be l-value
|
|
|
|
|
What's a hTSelItem and what's a hgNodeData ? And what's the point in typecasting something that's on the left side of the assignment operator?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
RakeshManohar wrote: ((DWORD_PTR)lpNodeData) = nBmpID;
change to
lpNodeData =(LPSTR) nBmpID;
|
|
|
|
|
Thanks.. this the right way.
|
|
|
|
|
What a mess. What are you trying to do?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
That's the same exact thought what occurred to me. Which is why I asked the OP a few questions hoping that I could help him, but some other helpful soul has answered the query.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
It's the semantic problem the trouble, Watson, the semantic, my dear, not the syntatic one!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All,
I want to display a message to the user at the time of locking the machine.
The message is to warn the user saying "Before you lock, please check your POWER settings." .
Is there any way to do this ?
Thanks,Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
|
Thanks ... will check that.. Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
I don't think a keyboard hook can be of help here.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Yes..it is not helping me.. Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
class CAdd
{
public:
CAdd(){};
~CAdd(){};
void Display( ){ }
};
CAdd pObj = NULL;
pObj->Display();
Here pObj is set to NULL but call to Display() succeed how?
|
|
|
|
|
Debug or Release version? If Release, the compiler may have been smart enough to see the function didn't do anything and optimized the whole call away. You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
In executes debug as well as in release mode.
Even if write some statements in Display() function it will execute.Its not because of empty function.
|
|
|
|
|
CAdd *pObj = NULL;
pObj->Display();
Call will be succeeded as long as none of the member variables of CAdd is referred in Display(). When pgm loads, a class will be having only one copy of all its member functions for all class variables we create, but will be having its own copy of member variables for each class variables. So members variables will be allocated only when an instance of class is created but there will be already a copy of all member functions even if no instance of class is created. Hope you understood how the calls to Display is succeeded above.
|
|
|
|
|
Yes I understood your explanation.
But still i am not clear with Display() function call with NULL object.
|
|
|
|
|
compiler just examines the type of pointer and so redirect the function call to the location where Display() is loaded. You just write some statements in Display(), put a brake point there and examine 'this' pointer. You can see it as NULL. Whenever you access any of the member variables, then 'this' pointer will be used, and as it is NULL an access violation will be occurred.
|
|
|
|
|
Making Display virtual would make a much more interesting problem. The pointer to the object is NULL so the v-table pointer would be invalid and should crash and certainly would if the nonexistent class instance was being called through a base class pointer somewhere. However, in this case the compiler could verify the actual type of the object and go directly to the v-table and make the call in the name of efficiency. You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
CAdd* pObj = NULL;
pObj->Display();
Compiler actuall transforms the call to some thing as follows:
void Display(CAdd * const this)
{
...
}
so, I think as long as Display() is not accessing any of the members of the class CAdd, it is safe to call Display() with a NULL ptr.
|
|
|
|
|
Because even if you are a death man, you can still breath, because your're still a member of the species.
Well, you know, the OOP mapping to the real world should break at some point...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|