|
The WindowFromPoint() function will return the HWND of a window given a point that is in the window.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
and from the HWND, you could call GetWindowThreadProcessId to get the process ID and then call TerminateProcess.
onwards and upwards...
|
|
|
|
|
Great, I'll look into those tips - thank you for the help
~will
|
|
|
|
|
One of the Best Software Consulting Company in New Jersey looking for IT Professionals to join the company on H1B and sponsor Green card immediately with labor is 3-4 months timeframe, and we have Offices in different locations.
We offer Best Billing rates to the consultants, if you have project in your hand you will get maximum portion of the Billing Rate completely negotiable. You will get Bonus when you refer a friend or associate to the company.
No Rejection/Query in the entire company history for H1/Greencard sponsorship.
We are direct vendors to IBM, Pearson Education, and Verizon etc.
We are also looking for consultants who have skilled in Data Warehousing, .NET & J2EE Technologies, SAP and Oracle Apps etc. We are ready to sponsor H1s and Green Cards.
YOU CAN CONTACT ME AT keith_002@hotmail.com.
|
|
|
|
|
This is just spam. First you have only posted this message, but you have posted it in 5 forums, all unrelated to your spam. Work Issues forum would have been much more appropriate.
Matt Newman
If you chose to continue this discussion, I am fully prepared to make you my bitch. I invite you to ask around, and you'll find out that I'm quite capable of doing so - John Simmons on Trolls
|
|
|
|
|
Anyone have any experience with integrating custom help collections into the new help that comes with VS.NET? I have been able to do this with the older version of MSDN that came with VS6, but I am totally confused by the new system.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Dear All!
i am doing my final CS project on Voice Masking system. I am trying to implement Fast Fourier Transform to do the masking on a voice input from mic..all i want right now is the idea that can masking be done through FFT or is there any other option ..or if anyone can provide me with the algorithm for masking(changing) voice
just for info : its not analysis its simple changing voice so that original voice cant be recognised. TAPI is also involved in it.
regards
jenny
|
|
|
|
|
Is there an API function where I can call the Windows Authentication Dialog Box in my application. The same Dialog box used when accessing a password protected web page on the internet.
Thanks.
|
|
|
|
|
CredUIPromptForCredentials .
Only works for Windows XP and Server 2003.
|
|
|
|
|
How would one go about getting at the version information from the project's version resource (VS_VERSION_INFO) at runtime? I'm familiar with how to get the version information from an external file (an exe or dll on disk for example) but what about from the currently running executable? I'm interested in loading this info so it can be displayed on the about box, etc. Then updating the version info in the resource editor and re-building will automatically update the info on the about box, etc.
Any ideas? Thanks!
Ed
--
Edward Livingston
(aka ExtraLean)
--
"I still maintain that seeing a nipple is far less disturbing than seeing someone get their brains blown out." -- Chris Maunder
|
|
|
|
|
I suppose GetFileVersionInfo() could be of interest for you.
--
C'est normal!
|
|
|
|
|
You obtain it the same way as you would for an external file, except you just use the module handle of your existing executable or DLL handle from the load library call you made.
I used one of the file version information classes from this web site and then used AfxGetInstanceHandle() to obtain the EXE module handle.
|
|
|
|
|
With a little work I found this "CFileVersionInfo" at codeproject, it should help.
Seeing as how you always know where the .exe of your program is I would probubly have used the functions for retrieving external file version information.
Good luck!
INTP
|
|
|
|
|
Thanks all!
I'm not sure why I didn't think to use the same method (reading the info from the file iteself) I guess I was too caught up in looking for a Load* function similar to LoadString, etc.
Thanks again, it's gonna work like a charm
--
Edward Livingston
(aka ExtraLean)
--
"I still maintain that seeing a nipple is far less disturbing than seeing someone get their brains blown out." -- Chris Maunder
|
|
|
|
|
Alright, I'm still pretty new to c++, and well my final project in programming is due tomorrow, i'm doign alright so far, but I cant get the values of my "right" and "wrong" variables to write to a file. I'll post my whole code so that you can see exactly what I'm doing here, its just a program that takes questions from a text file, puts them out to the screen and keeps track of what the user answers right and wrong, i need to put the users score into a text file and thats what screwing me up, thanks.
#include<iostream.h>
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
void main()
{
FILE *fp, *fb;
char line[100],ans,name[20],qfile[20];
char extension[5]= ".txt",entadmin;
int x=0,flag=0,y=0;
int right=0, wrong=0;
cout<<"Enter your name \n";
cin>>name;
strcat(name,extension);
fb=fopen(name,"w");
cout<<"What library of questions do you want to open (eg. quest.txt) ? \n";
cin>>qfile;
if((fp=fopen(qfile,"r"))==0){
cout<<"This file does not exist";
exit(0);
}
while(fgets(line,100,fp)!=NULL){
x++;
if(x!=6)
puts(line);
if(((x%6)==0)&&(x>0)){
fflush(stdin);
ans=getch();
if(ans==line[0])
{
cout<<"Right\n";
right++;
x=0;
}
else
{
cout<<"Wrong\n";
y=0;
wrong++;
}
}
}
cout<<",you got "<<right<<" correct, and "<<wrong<<" wrong";
fcloseall();
}
|
|
|
|
|
Take a look at the stdio.h header file and look up file io in your help system or any book on C. The reason I say C is because the on C++ specific code in this file is cin and cout, the rest is C code.
Specificaly look for the function fprintf(), if you know how to use prinf() and sprintf() then you will know how to use fprintf().
INTP
|
|
|
|
|
This is annoying code for an experienced c++ programer to read... You are mixing couts with fopens which is generally bad practice. As for the answer to your question how about an fprintf(fb,<insert what you want to go to the file here>);
John
|
|
|
|
|
In my SDI application, I have a menu option that brings up a typical "Options" dialog. The dialog is actually a property sheet with several property pages. The menu handler is in the document. The document owns the configuration data as it is needed at various other places, including the view. At this point, what is your take on how to get the document's configuration data to the individual property pages (and back)?
Thanks,
DC
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I am now in the middle of working on various property pages/sheets and these are the methods I am using:
First, I store the configuration data in a structure. I copy this data to an instance in the function call that creates the property sheet and pages. If the user clicks OK (or Apply, though I rarely use Apply) the data is stored in the registry (or wherever such things are saved) and in the original instance. Often, I don't to a binary copy, but use functions to save since other things, such as font changes, have to be done with the new settings.
BTW, to share the temporary options I pass a reference to the constructors of the property pages.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
In MFC the OnSetActive and OnKillActive will invoke the dynamic data exchange member function. You can load data from a data structure ahead of the control loading, and save it after the controls write the data to the member variables back to the data structure. This works out well, because you can validate the data and fail the data exchange to disallow the property page from being changed.
I make a class or data structure to hold the data, it is usually owned by the app, but in your case the document, so in the first call to OnInitDialog, when the page is first constructed, you could obtain and perhaps store the pointer to the configuration data structure or class. Or else obtain it dynamically from the document each time you need a load or a save of the data.
|
|
|
|
|
Does anyone know if there is an easy way of taking a device context and exporting it as an image?
I have an application which uses a home-grown class for displaying graphs, and I need to be able to export the charts as images for inclusion in MSWord/HTML reports.
Thanks!
|
|
|
|
|
You need to create a bitmap (CreateBitmap()), get a memory DC for that bitmap, then bit-blt from your source DC into the bitmap DC. There are several articles on this site that describe how to save the bitmap in different formats; here's one: http://www.codeproject.com/bitmap/jscdibdata.asp
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2003 Microsoft Corporation. All rights reserved.
|
|
|
|
|
Thanks! I thought it was something like that, but I just wanted to make sure before I reinvented the wheel
|
|
|
|
|
I have the following string '00001762'. Sometimes it can be '00000562'. How do I remove all unwanted 0 before the actual number?
|
|
|
|
|
If you are using MFC, try CString::TrimLeft() .
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|