|
sorry for my bad english :P
in my 'AppA' ,i want launch another 'AppB' to do some thing, and i want get the notify when the 'AppB' and all of process which launch by 'AppB' or 'AppB'`s child process was terminate
I love programming
|
|
|
|
|
if i understand u right. U need to take a look on the following function:
CWnd::Onclose or CWnd::OnDestroy
/\|-||\/|/\|)
|
|
|
|
|
See this search.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
HI All
I want to know that how to use WMI Classes using VC++,I want to extract some system information from there, but I do not know how to use that,
Better if please do provide some sample code.
Thanks & Regards.
Edit/Delete Message
|
|
|
|
|
Try Using WMI in VisualC[^]
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I downloaded the mentioned project and tried to run the project but could not succeed.
Although I included all needed .lib files and header files yet I am getting two errors
1)error C2065: 'CoInitializeSecurity' : undeclared identifier
2)error C2065: 'EOAC_NONE' : undeclared identifier
However the function CoInitializeSecurity( ) is declared in "objbase.h" and I have included this file too.
So Please tell me how to remove this problem.
Please reply .
Thanks & Regards.
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi all,
I have dll(mfc) which displays dialog with list control with some file [with path] ( .doc,.msg, ... )
When user double clicks my code opens file in maximize mode useing ShellExecuteEx. It returns me HANDLE hProcess. All works fine.
But some file like msg file are not opening in MAXIMIZE state. After looking deep into that i conclude that it is handled by MS Outlook.( means if last msg file is opend in normal window (not maximized) then my code will not open msg file maximized!!.)
So what i want is HWND from hProcess. so that i can send message to that window for maximize!!!
I have searched a lot and also applied a code. but i think my dll handles this so i m not getting required results.
//////////////////////////////////// hProcess is returned by ShellExecuteEx
WaitForInputIdle(hProcess,1000);
FILETIME lpCreationTime, lpCreationTime2;
FILETIME d1,d2,d3;
DWORD dwProcessId;
HANDLE hProc;
GetProcessTimes( hProcess, &lpCreationTime, &d1, &d2, &d3 );
HWND hTemp = ::FindWindow(NULL,NULL);
while ( hTemp != NULL )
{
if ( ::GetParent(hTemp) == NULL )
{
::GetWindowThreadProcessId(hTemp,&dwProcessId);
hProc = OpenProcess(PROCESS_QUERY_INFORMATION, 0, dwProcessId);
GetProcessTimes( hProc, &lpCreationTime2, &d1, &d2, &d3 );
CloseHandle(hProc);
if ( lpCreationTime.dwHighDateTime == lpCreationTime2.dwHighDateTime &&
lpCreationTime.dwLowDateTime == lpCreationTime2.dwLowDateTime )
{
//("Sending Message"); // Never came here
::PostMessage(hTemp,WM_SYSCOMMAND,SC_MAXIMIZE,0);
break;
}
}
hTemp = ::GetWindow(hTemp, GW_HWNDNEXT) ;
//"looping");
}
// i have also tried with EnumWindows and its proc.
Can anyone help me in getting solved my problem.
Thank in advance.
Regards
Jetli
Constant Thing In World Is Change.
|
|
|
|
|
if you have several projects in a solution that all compile to individual EXE's what do you do with version numbers?... keep them all in line with each other or have each EXE with its own independent version number?
|
|
|
|
|
I'd say that's up to the conscience of the individual church-goer. But it makes sense to me to have all different ones - why would the version number change on one part of the project, just because you updated another.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Two version numbers are within each module : File Version and Product Version.
We tend to let the File Version float depending upon the particular module.
The product versions typically are all the same for all modules of a particular product release.
This way, you can look at a DLL, for eexample, and know which version of the DLL you have and also which version of the product it was intended to work with.
|
|
|
|
|
thats a very good idea, thanks! I have always just automatically given them both the same version numbers, without actually thinking about why there are two different fields.
|
|
|
|
|
Can any body tell me how can i get client area dimensions(width & height) in millimeters?
|
|
|
|
|
mm relative to what ? The screen you're running on ? To do that, you need to know the screen resolution ( easy ) AND the screen size ( not so easy ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Two quick queries:
1. I have programmed a little network performance monitor. It monitors a set of remote hosts over a network. It gets the CPU statistics and all gets collected at one of the remote hosts (say primary remote host, holding procValues[n][4], 4 CPU floating numbers per n remote hosts).
Now, I want to transfer this data set (double procValues[n][4]) over a TCP or UDP network connection to a local host for graphing and storing in a database tool.
I've read Beej's Networking Guide http://www.ecst.csuchico.edu/~beej/guide/net/ and going to follow his code.
However I don't know how am going to send a double[n][4] over the network efficiently without hogging the network. Is the most efficient way just converting double[n][4] into a string?
Am using a sleep(1) function to set the frequency of 1 second to read the cpu statistics.
If a sending function takes more than the frequency of "cpu statistic collecting" then am going to get lots of missed out data... no wait it wouldn't be perfectly synchronized to the exact second, it will be lagged behind. Maybe thread the network transfer so that the frequency of "cpu collecting" remains precisely every second?
What are your views?
2. How does one create/use threads in C, AND C++? Do threads differ in usage in C and C++?
|
|
|
|
|
kevingpo wrote:
Am using a sleep(1) function to set the frequency of 1 second to read the cpu statistics.
Sleep(1) = 1 ms wait time. Quite difficult/impossible to reach in a Win9i/2000/XP environment without any other kernel-patch.
kevingpo wrote:
Is the most efficient way just converting double[n][4] into a string?
From my point of view it's the way, you have to pass a parameter telling the type of data you are sending or preassumed that all the data are from a certain type.
kevingpo wrote:
Maybe thread the network transfer so that the frequency of "cpu collecting" remains precisely every second?
You'll have to separate in different threads the data treatment from the data transfer and try different thread priorities to accomplish it.
kevingpo wrote:
2. How does one create/use threads in C, AND C++? Do threads differ in usage in C and C++?
Depends on the implementation of C/C++ you use, but:
In C++: HANDLE CreateThread(LPSECURITY_ATTRIBUTES secAttr,
SIZE_T stackSize,
LPTHREAD_START_ROUTINE threadFunc,
LPVOID param,
DWORD flags,
LPDWORD threadID);
In C using libpthread:
int pthread_create(pthread\_t *tid, const pthread\_attr\_t *tattr,
void*(*start_routine)(void *), void *arg);
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1
1 9 36 84 126 126 84 36 9 1
1 10 45 120 210 252 210 120 45 10 1
1 11 55 165 330 462 462 330 165 55 11 1
1 12 66 220 495 792 924 792 495 220 66 12 1
<note: the="" figure="" is="" x'mas="" tree="" shape="">
Write a function tat obtains the product of two matices. The matrix product of two matrices {aij} and {bij} is the matrix {cij} whose ijth elements cij (ie, the element in row i and column j) is defined by the formula.
cij = ai0b0j + ai1b1j +ai2 b2j +...(ai,n-1)(bn-1
with regards
sunny
|
|
|
|
|
This is called homework. The idea of homework is to solidify the things the teacher was showing you in class, no doubt while you were browsing the web for pr0n. It's also a chance for you to show that you know how to do your own research.
We don't do homework here. Try to write this code yourself ( it's really pretty easy, hint: look up 'nested loops' in your C++ book ), and if you get stuck, post CODE, rather than the homework question, and SPECIFIC questions about where you are stuck. Then I'll be the first to try and help you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
int n,i,j;
int a[i][j];
int b[i][j];
int c[i][j];
for(i=0;i
|
|
|
|
|
And what's the question ?????
|
|
|
|
|
sunnymoe wrote:
c[i][j]=c[i][j]+(a[i][j]*b[i][j])
All these arrays are uninitialised, they have nothing in them. And unless the c[i][j] array is initialised to be all 0, this line will add the product to garbage that is there already. Given that i and j will both have their value only once, I think you need to change it to:
c[i][j]=(a[i][j]*b[i][j])
and also, if you have < in your code, there's a check box below the text window that you need to check so they don't get regarded as HTML. That's why your code is not all visible.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
Then I'll be the first to try and help you.
Are you sure that you'll be the first who sees his post? You have a lot of competitors here
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
Are you sure that you'll be the first who sees his post? You have a lot of competitors here
Have you seen the sheer number of posts Christian makes? Much less posts in EVERY board? I think he has a direct line to the SQL servers. I have often wondered if Christian isn’t bob in disguise.
[I hope he doesn't get offended by this]
-------------------------------
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
sfdougl wrote:
Have you seen the sheer number of posts Christian makes?
I've seen him answer to MANY posts, but sometimes the mass of other posters here are a little bit faster.
sfdougl wrote:
I have often wondered if Christian isn’t bob in disguise.
I think that even our little green alien has to sleep. Talking about bubble head bob, don't they sell plush toys of him around here?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
I've seen him answer to MANY posts, but sometimes the mass of other posters here are a little bit faster.
Touché
Bob Stanneveld wrote:
don't they sell plush toys of him around here?
I have not seen plush toys but there is a coffe cup and other misc items availible.
Code Project stuff[^]
-------------------------------
DEBUGGING : Removing the needles from the haystack.
|
|
|
|