|
|
Use GetFirstSelectedItemPosition and GetNextSelectedItem
|
|
|
|
|
Thank u Dreamz, I got the solution based on u r idea.
|
|
|
|
|
tejaswini.g wrote: But how can i know the index.(
It's passed to your LVN_ITEMCHANGED handler. You can also get it via GetNextItem() .
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi there everyone...
Can any one give me example codes on how to move the circle in vertical or horizontal direction once the program starts to run without pressing the keyboard... i can create the circle but i could not move the circle. Any ideas?
Need urgent help here.
Thanks in advance
|
|
|
|
|
Which circle ?
You have to be a LOT more precise and explain the problem clearly if you want an answer.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
You can create a timer . Start the timer in the WM_CREATE.Here I assume that you are working on WIN32 rather that MFC. So you can keep on changing the center coordinates of the circle being drawn in the frame and redraw this in the timer
function.
I hope that this will help you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Can you be more specific
You can use WM_TIMER and use from x,y that you want to create circle for change location
whitesky
|
|
|
|
|
Hello! I've made a program using Visual C++ (6.0) and MFC classes that connects to a database(SQL Express Edition) and does all sort of things with it. Now I want to be able to save the results comming from a "select from ... where...." in excell file format so I can open it with Excel. Can any one help with tips or something pls.
|
|
|
|
|
You have to search for excel automation. Maybe you can found usefull articles here[^]
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
|
They could, assuming that unlike many of the posters of questions here, they had the wit and patience to perform a search on the site (or even on Google).
At least they wrote a question which was intelligible. I recognise that for a lot of CP members, English may not be their first language, but it is the primary language used on the site (for good or ill, although as someone who only speaks English/EnglishUS, I'd have to leave if that changed).
Steve S
Developer for hire
|
|
|
|
|
How will I kill all the spawned processes of my application? I dont want to kill my main application, but only the all other processes spawned by my main application? Is there any articles related to this?
Thanks,
Stanly
|
|
|
|
|
When u spawn a process using CreateProcess() u will get the preocss handle of the new process. Store that handle in a Vaiable. So when u want to Kill the spawned preocess, call TerminateProcess() with that handle.
nave
|
|
|
|
|
The problem with me is that, I'm spawning many process. One process my spawn other process. So my spawned process is having many other spawns. But when I'm terminating the main spawned process, only that process is terminated, not the child processes. I want to implement Kill Process Tree function for my child processes.
Thanks,
Stanly
|
|
|
|
|
if all the process u create have window( or create a message only window), u can send the WM_CLOSE message to all the child process. When a WM_CLOSE message arrives, let it send the WM_CLOSE message to its child process and so on...
nave
|
|
|
|
|
This solution won't work for me because I won't be able to keep track of all spawned windows/applications. Spawned application say MS SQL query analyzer is not created by me. So, that application may spawn other applications. I want to implement the function of Kill Process tree just like in Process Explorer by Mark Russinovich (www.sysinternals.com).
Thanks,
Stanly
|
|
|
|
|
stanlymt wrote: This solution won't work for me because I won't be able to keep track of all spawned windows/applications. Spawned application say MS SQL query analyzer is not created by me. So, that application may spawn other applications.
You are doomed!
|
|
|
|
|
Take a look at the Process32First() /Process32Next() pair.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Terminating process, especially processes you didn't even write, is asking for trouble. Here's a quote from MSDN:
"The TerminateProcess function is used to unconditionally cause a process to exit. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used"
The fact that terminating a process is not safe is obvious if you think about it: The process may be in the middle of doing something like updating a file and suddenly it's killed without getting a chance to do any cleanup. This could quite obviously lead to data corruption for example. TerminateProcess is meant as a last resort like when like you have to kill a misbehaving and non-responsive process with task manager.
Steve
|
|
|
|
|
stanlymt wrote: How will I kill all the spawned processes of my application? I dont want to kill my main application, but only the all other processes spawned by my main application? Is there any articles related to this?
look at CreateToolhelp32Snapshot and related api
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi ,
My Applicatrion has been using great amount of bandwidth. Now, i want to change the way it works in such a way that the Application should work when there is no bandwidth utilization by other applications . I want to check within my application if the Internet is in Idle state . Can someone help me? Thanks in advance
- Ranjan
|
|
|
|
|
|
I want to run the application when no other applications in the computer are using the Internet.So I want to know when the "Internet is available" AND "other applications are not using the bandwidth".
|
|
|
|
|
sp_ranjan wrote: I want to check within my application if the Internet is in Idle state .
Are you serious?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|