|
scody wrote: uniquely select and double click an item in the list view.
So you need to get the list view item when the user double clicks, right?
|
|
|
|
|
No, I need to double click a list view item. Sorry, if it is confusing.. For example, if I want to double click an item named "Item Name", I should be able to click it irrespective of wherever it is positioned in the list, so I called it uniquely(that’s an exaggeration!) select.
|
|
|
|
|
scody wrote: I need to double click a list view item.
Have you added the double clicked event on the listview?
After a list view item being double clicked, what will the program do next?
|
|
|
|
|
I dont have access to the code of the third party software where I am double clicking the item. I just want to invoke the item to perform some task, as if some user is double clicking the item. To cut short I am trying to test the GUI of the third party software.
|
|
|
|
|
I think one possible reason that this doesn't work is that your LVFINDINFO is declared within your application's memory, so other applications won't see this.
|
|
|
|
|
|
And this is possible without any elevated user rights?
Sorry I must leave, the "Security Breach"-Alarm jut got off.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Hello! everyone!
I had a problem want to be resolved in time!
I make an application in full screen. And I use some class derived from CStatic use to draw some characters and pictures. Now when I change some other window's z-order before this window and then change this window to top, only some part of the class derived from CStatic will be displayed, not all. I want to know how to display all window in this situation?
Thx!
John
|
|
|
|
|
So your problem is how to draw on your window even if other dialogs or windows are on top of it?
|
|
|
|
|
Yes. That's my meaning.
Thx!
|
|
|
|
|
How do you draw to your window? Do you use CDC?
|
|
|
|
|
yes. I use CDC to draw some bitmap file in window. The problem is: I take some other window on this window and then take them below. The area occured by other window is be drawn. The other area isn't be drawn and still be blank. That's all. I hope u and some others can tell me how to resolve it.
Thx!
|
|
|
|
|
I experienced the same thing before. What I did was I made the CDC handler for the window into a global variable. Try that first if it works.
|
|
|
|
|
|
If you are coding in MFC, you can use the pDoc->UpdateAllViews (NULL) as well. If the code in your main view is in the OnDraw () this command will update it, doesn't matters where in the Z-Order is.
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
|
|
|
|
|
Hello, again.
I'm working on a program and i need to execute a command line entry from my program in MFC. My problem is how can I call commad promt and how will I execute an entry from my program. I'm using VC++ 2003.
Please comment on how to do this or found a link for this matter.
Thank you
|
|
|
|
|
try CreateProcess with cmd.exe as the application
|
|
|
|
|
|
|
That has nothing to do with templates - polymorphism works only with pointers or references, not concrete objects. Try this instead:
#include <iostream>
#include <deque>
using namespace std;
class A
{
public:
virtual void test() {cout << "A\n";}
};
class B : public A
{
public:
void test();
};
void B::test()
{ cout << "B\n";}
int main(int argc, char **argv)
{
A* x = new B();
deque<A*>* d = new deque<A*>();
d->push_back(x);
for(deque<A*>::iterator itD = d->begin(); itD != d->end(); itD++)
{
(*itD)->test();
}
delete x, d;
return 0;
}
BTW, why are you creating the deque on the heap?
Programming Blog
utf8-cpp
|
|
|
|
|
Oh, and I don't think the line
delete x, d;
is doing what you think it is doing
|
|
|
|
|
That is one tricky expression!
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
It's hard to tell without being able to see how you defined "d", but are you using
a reference or pointer type?
For example, this works as expected:
A* x = new B();
deque<A*> d;
d.push_back(x);
for(deque<A*>::iterator itD = d.begin(); itD != d.end(); itD++)
{
(*itD)->test();
}
delete x;
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: but are you using
a reference or pointer type?
Can't you just assume he is? I think they should just add 'assume' as a C++ keyword, that would solve a lot of CodeProject questions.
Great fishing today eh? I bet you can bag your limit in like 5 minutes. Last modified: 14mins after originally posted --
|
|
|
|
|
led mike wrote: Great fishing today eh?
Actually it's been great for quite a while now....must be related to global warming
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|