|
how to catch commands executed by the cmd.exe.
they may be started from a bat file too.
|
|
|
|
|
See here and here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thanks, but I will need this work for an arbitrary console, not only for child.
Was checking the "AtachConsole" but the only parameter it takes can have one value "ATTACH_PARENT_PROCESS".
src:
http://msdn2.microsoft.com/en-us/library/ms681952.aspx
-- modified at 10:59 Tuesday 13th November, 2007
|
|
|
|
|
having a pointer to the NMLISTVIEW and having in that list some selected items,
how to get an item full path ? no MFC or other frameworks.
thanks
|
|
|
|
|
carabutnicolae1234 wrote: how to get an item full path ?
What do you mean with tha above?
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.
|
|
|
|
|
err, sory.
here is more detail: trying to write a hook procedure that will handle the
"LVN_BEGINDRAG" and "LVN_BEGINRDRAG".
Once I have the notification that this happened I can do this:
------------------------------------------------------------------
std :: list < std :: string > slectedItems;
LPNMLISTVIEW listView = (LPNMLISTVIEW)lParam;
HWND listViewWindowhandle = listView->hdr.hwndFrom;
int index = ListView_GetNextItem( listViewWindowhandle, -1, LVNI_SELECTED );
while( -1 != index )
{
const int bufferSize = 1000;
char buffer[bufferSize] = {0};
ListView_GetItemText( listViewWindowhandle, index, 0, buffer, bufferSize );
slectedItems.push_back( buffer );
index = ListView_GetNextItem( listViewWindowhandle, index, LVNI_SELECTED );
}
------------------------------------------
so far this gives me the items selected and dragged.
didn't found a way to get the full path for each item that has been dragged.
|
|
|
|
|
Um, if you wrote the code that put the data into the listview, then where is your problem?
If you have a list view control, and it sends a NMLISTVIEW at you (it's a notification structure), one of the members of NMLISTVIEW is lParam. Simply use the lParam when you're storing data to get meaningful hints. As for "item full path", that is just gibberish.
If you didn't write the listview, you may want to mention where it is, and how you're getting a pointer to a NMLISTVIEW....?
I'm going to put my psychic hat on, and guess this is in the OPENFILEDIALOG common control, and you've hooked into it.
In which case, the lParam stores the PIDL of the selected file. That's from memory, and I'm sure I read it somewhere. Anyway, that should give you a hint or two for your google search.
Beyond that, you're going to have to provide more info.
Iain.
|
|
|
|
|
yes you're right I only received the pointer to the NMLISTVIEW and I did not wrote the list view. The list view is from "explorer.exe" probably the same as in OPENFILEDIALOG common control.
I think your hint helped, I missed the "lParam" from "NMLISTVIEW" which now I see how to use it with SHxxxx functions.
thanks.
|
|
|
|
|
Hi,
I'm using VC++6.
I have a CTreeCtrl in my dialog.
How do i detect whether the selected item in the tree control is a root item or a child item?
I'm not associating any image to the items.
Thanks & Regards,
sanju.
|
|
|
|
|
First, get the selected item, then check if it has a parent. Not quite sure if this will return TVI_ROOT or NULL for a root item.
HTREEITEM CTreeCtrl::GetParentItem( HTREEITEM hItem );
I've deliberately glossed over the selected item bit, as you could have multiple items selected. You'll have to keep a close eye on the selections you make, search through the item states for TVIS_SELECTED, or monitor TVN_SELCHANGED (which would be my choice).
Iain.<div class="CPhogPost"></div>
<div class="ForumSig"></div>
|
|
|
|
|
When im working in workspace, I got one Pop-up as
"C:\Documents and .......\CSS\CS3Opr.CLW
THis file has been modified outside of source editor,Do u want to reloda it. YES or NO"
Like this i got the popup,when im pressing YES or NO,it does not get vanshed.Its continously asking me.Even i cannot close the pop up.And also the workspace and also VC++.
THen i have to close the vc++ through TaskManager only.
How can i avoid it.
What the mistake i made? now Im doing coding for bitmap button functions.
Anu
|
|
|
|
|
Anu_Bala wrote: Like this i got the popup,when im pressing YES or NO,it does not get vanshed.Its continously asking me.Even i cannot close the pop up.And also the workspace and also VC++.
THen i have to close the vc++ through TaskManager only.
How can i avoid it.
What the mistake i made? now Im doing coding for bitmap button functions.
which service pack of VS6 is installed on your computer!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Im having Vc++6.0 Enterprise edition
Anu
|
|
|
|
|
Anu_Bala wrote: Im having Vc++6.0 Enterprise edition
Sorry, for not able to put my question properly. actually i am looking the Visual Studio Service pack. open Visual Basic 6, you will get Service pack information there i.e. liek SP5,SP6
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Anu_Bala wrote: Im having Vc++6.0 Enterprise edition
Which does not indicate the service pack, if any.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi to all,
I have an problem when I try to build my app:
<br />
error LNK2001: unresolved external symbol __imp__SHCreateStreamOnFileW@12
I included:
<br />
shlwapi.h
and linked it with 'ShLwApi.Lib'.
What seams to be the problem here?
THX
|
|
|
|
|
It seems that the compiler can not determine where the function is, like if the library was not properly included.
Include the library to the project (Project->Add to project...), include the header, delete/rename the debug/release folder and try to "rebuild all..."
What happens?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
I tried something else, now when I compile and get errors saying numerous 'struct' type redefiniton like:
<br />
d:\vistasdk\include\propidl.h(147) : error C2011: 'tagCAUB' : 'struct' type redefinition<br />
d:\vistasdk\include\propidl.h(153) : error C2011: 'tagCAI' : 'struct' type redefinition<br />
d:\vistasdk\include\propidl.h(159) : error C2011: 'tagCAUI' : 'struct' type redefinition<br />
d:\vistasdk\include\propidl.h(165) : error C2011: 'tagCAL' : 'struct' type redefinition
and more!
???
Thanks for your replay!
|
|
|
|
|
I guess you are including a header twice in your app. Because of that you are having the definitions of typedef twice, and the second one gives an error.
Check out your includes, and take a look into #pragma once
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi,
I have a mobile device, I want to run my program on it, my program is written on C++ language, but when one of mobile’s keys is hit, one tool bar comes on top of my program and it does not go until I close my program and then run it again.
How can I remove the tool bar in the middle of running program?
Please help me
Thanks a lot
|
|
|
|
|
Hi all,
I have the following std::string array. How can I get hold of the first elements data? I have tried the following without success:
std::string openDoorTags[50];
char copyToBuf[128]={0}
strcpy(copyToBuf, openDoorTags[0].c_str());
Can anyone please help?
Many thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: I have tried the following without success:
And what is the problem ?
|
|
|
|
|
How do I get hold of the data in the first element of the string array and copy it into the char buffer ? When perform the code above nothing happens .... the buffer remains blank although the string array element has data in it ....
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: the buffer remains blank although the string array element has data in it ....
Uh, in your code above, all the strings in your array are empty, so it's normal that the buffer will be empty too.
What happens if you try something like this ?
std::string openDoorTags[50];<br />
openDoorTags[0] = "Test";<br />
char copyToBuf[128]={0};<br />
strcpy(copyToBuf, openDoorTags[0].c_str());
|
|
|
|
|
Cedric Moonen wrote: all the strings in your array are empty, so it's normal that the buffer will be empty too
Sorry ... I forgot to mention that the string buffer has data in it. But I will try the snippet that you supplied.
Thanks Cédric
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|