|
Hi,
I was wondering if anyone knows of a simple way to force a console to close - even if it's running an application. I have no problem finding the consoles (with EnumWindows, using GetClassName etc.), but of course I can't close them if they are currently running an application (which I also want terminated). Is there anyway to automatically do this, or at least to easily find the associated application that I can then kill first? Thanks.
GraemeS
|
|
|
|
|
erm, wouldn't ctrl-break solve the problem? it'll terminate the program, if that's all that u're looking for.
|
|
|
|
|
I don't think I spelt the problem out clearly enough. I'm trying to close consoles that were not launched by my program (it's actually a complex simulation - and when I want to stop it I have to work through the taskbar manually closing up to 10 console apps). In other words, calls like GenerateConsoleCtrlEvent(..) won't help, since the console I'm trying to close isn't shared by my calling program. I could do something a little more cumbersome (e.g. build a list of running processes and manually select those that need to be killed), but I was looking for a single "click" shortcut that would kill all the consoles (and their apps) for me. Any suggestions would thus be most appreciated.
GraemeS
|
|
|
|
|
Hi,
I need to use the 2Complement form in my application,for negative numbers.
the problem is that i need to do it for 10bits only.
this is what i'm doing:
int num;
if(num < 0)
{
num = ~(abs(num));
num++;
}
but this is the way for 32bit and i need to do this for 10bits.
someone?????
With best regards,
Eli
|
|
|
|
|
Is this a homework problem because num is stored in twos compliment automatically by the cpu.
How about the right shift operator and then masking the output to 10 bits.
John
|
|
|
|
|
Hi,
Why do you think this is homework problem???
Actuclly this is WORK problem.
I just saw that num is stored automatically in two compliment by the cpu,
and masking it to 10bit is all i have to do.
anyway,
thanks for your help,
Eli
|
|
|
|
|
In most cases problems like these are excercises for a low level programming class. We are not allowed to solve anyones homework here so I was being a little bit cautious. When I think of it I guess you are correct there is no shifting involved. Sorry for that bad advice, I have not delt with this in at least 10 years...
John
|
|
|
|
|
Hello All,
I am porting a old NT Driver to 64-bit driver for AMD machine. I am new to this Drivers completely. Somehow I went throught the documentation and was able to build the graphics DLLs required. But I need information about the DLL generated.
Are there any tools to know the information of a DLL, like,
1. What is the mode in which this DLL will run.
2. Whether it is a 64-bit DLL or 32-bit DLL.
3. Whether it is build for Windows 2003 Server/Windows XP or not
4. Whether the driver is for a AMD machine or any other machine etc.
Please suggest me any tool which can answer me these questions and more.
(OR) suggest me a way to get these details.
regards,
Sarma
Sarma M.B.K.N
|
|
|
|
|
hi everyone:
i m looking for a function named Dijkstra for c language, i m using dos,not vc++. Thank u very much.
cage
|
|
|
|
|
|
search for the shortest path between 2 point
|
|
|
|
|
ahhhhhhhhh
this one !!!!!!!
sorry, for me, i don't know more...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
thank u , i m having a looking
|
|
|
|
|
i've recently programmed dijkstra in vc++. if u like i could send it to you. however i can only send u the dijkstra class as the rest of the classes are classified, so it won't compile. but u can get an idea of how dijkstra can be implemented. pm me if u like.
|
|
|
|
|
The following artical: http://www.codeproject.com/cpp/msnchattext.asp#xxxx
gives instructions on how to get data from another program.
It uses commands such as: HWND
I understand program messages such as: WM_COPY
but I need mor help. Can eny one refer me to a web site?
|
|
|
|
|
|
|
|
Where in VC++ 6.0 can I find routines for controlling text and graphics output in console applications, like it was possible in C/C++ versions up to 1.5 using GRAPH.LIB? For example: set cursor position on text screen. Is it an element of Win SDK now?
|
|
|
|
|
|
Hi all.
I'm trying to disable a specified item in a CListCtrl.
I read about a flag called "LVIS_DISABLED", but I couldn't found it in any header file.
Where can I find it. And if it doesn't exist; how can I solve my problem ?
Thanks for everyone...
M.N
|
|
|
|
|
Oh man, this sounds like a tough one. I can't find LVIS_DISABLED in the MSDN. The only thing I can think of is tagging your invalid data yourself and making it custom drawn so that you can gray out the items with the "disabled" tag. None of the lists have that functionality built in.
|
|
|
|
|
Have a look at the custom list control by Hans Dietrich on this site. The item of interest is the OnCustomDraw() method. When items are added to the control, they are internally marked as enabled or disabled. When each item is drawn, a different color is used depending on whether the item is enabled or diabled.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
:(hi all
i used hook CBT :
LRESULT CALLBACK CBTProc(
int nCode, // hook code
WPARAM wParam, // depends on hook code
LPARAM lParam // depends on hook code
)
if (ncode==HCBT_SETFOCUS)
{
HWND hedit;
hedit=(HWND)wParam;
POINT cpoint;
GetCaret(cpoint);
DWORD psend=((cpoint.x<<4)&cpoint.y);
SendMessage(hedit,WM_MBUTTONDBLCLK,MK_LBUTTON,psend);
}
but when program run,for example:
i run my program,then run notepad,and press 1 key but there are anything occured.i want to hightlight character when user type in notepad,so i sent WM_MBUTTONDBLCLK to notepad but it didn't work hic hic...after hightlighting character i want to send WM_COPY to copy word or character into clipboard and i can get that words though clipboard...but i didn't really know how to code...
please help me
|
|
|
|