|
You might want to try hooking the window and handling WM_NCPAINT .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
1) How to handle opening of a window, which belongs to another process (separate application)? The window has unique title, but not unique class. I need more intelligent way, than just calling FindWindow() from infinite loop
2) How can I monitor and handle closing/terminating of that window, after I found it?
|
|
|
|
|
Hook mechanism.
I don't know properly how to program to detect window open, but I know that is the most efficently way to detect.
Look in codeproject for hook. I think that you will have success ...
regards
Rodrigo Pinho Pereira de Souza
|
|
|
|
|
I have the following code:
typedef double* configPt;
configPt* configurations;
configurations = (configPt*)malloc(sizeof(configPt));
for(int i=0;i < max;i++)
{
configurations[i][0]=/*whatever*/
configurations[i][1]=/*whatever*/
}
/*Operations with the aid of configurations*/
free (configurations);
Well, when the program arrives to the free function, it crashes and i dont know why.
|
|
|
|
|
double** configurations;
configurations = (double**)malloc(sizeof(double*));
Here you are allocating a pointer to a pointer to double
for(int i=0;i < max;i++)
{
configurations[i][0]=/*whatever*/
configurations[i][1]=/*whatever*/
}
Here you are writing to a non allocated memory.
I would go for:
double **ppdDoubleMatrix = (double **) calloc(iRows, sizeof(double *));
if(ppdDoubleMatrix)
{
for (iRowsCounter = 0; iRowsCounter < iRows; iRowsCounter++)
{
ppdDoubleMatrix[iRowsCounter] = (double *) calloc(iColumns, sizeof(double));
}
}
Freeing it like so:
for (iRowsCounter = 0; iRowsCounter < pxThis->iRows; iRowsCounter++)
{
if (ppdDoubleMatrix[iRowsCounter])
{
free(ppdDoubleMatrix[iRowsCounter]);
ppdDoubleMatrix[iRowsCounter] = NULL;
}
}
// Free the pointer
free(ppdDoubleMatrix);
ppdDoubleMatrix = NULL;
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
for(int i=0;i < max;i++)
{
free(configurations[i][0]);
free(configurations[i][1]);
}
Enjoy it
Rodrigo Pinho Pereira de Souza
|
|
|
|
|
I'm trying to use a .dll and .lib that was created in VC++6 with a new VC.NET project. I add the .dll and .lib to the linker options and #include the cooresponding .h file to the project. I can't get the program to recongnize the function in the .dll and .lib correctly. It seems that .NET does not like the way the functions in the .h file are declared, or something?
Is there something new in VC.NET that I need to know with regards to using .lib and .dll?
Help! Thanks...
|
|
|
|
|
I have a dll port.dll .I don't know how to use them in VC++.
I use dumpbin tool but I can't use them. Help me doing this.
Please tell me in detail.
|
|
|
|
|
Hi,
Below link has a very useful tutorial related to
DLL implementation in VC++ 6.
http://www.codeproject.org/dll/XDllPt1.asp
Hope it will be useful to you.
Best Regards,
Irshad
|
|
|
|
|
Hello,
i want to develop a tool for winXP that dynamically
limits Intenet (IP) bandwith on a LAN host (LAN connected to Internet via router).
the tool should run on all LAN clients and send
information about the current IP traffic on the client to the other clients. with this information it should limit the bandwith to a predefined value, if the other clients need full bandwith, too.
for example: if three clients need full bandwith all
get limited to 1/3 of the full bandwith available.
if just one client need full bandwith it should get all.
thats the theory.
to manage this, i need to detect the current ip traffic on a client.
searching the web brought me to MS IpHlpApi.lib
but it only detects IP datagram amounts, not the real size if an ip-packet.
next solution is ip-packet sniffing, but this need
as far as i now, developing a kernel mode driver.
i know about pcap library for packet sniffing task
but it doesnt allow packet manipulation.
i dont need packet manipulation for my task, but
ive got another project in mind that does, so i want to go the straight (maybe hard) way.
i thought about using MS Visual C++ with MFC and DDK
so my question:
what would you suggest for solving my problem?
best regards
Robert
|
|
|
|
|
This sounds like any firewall code would do that. Maybe there is somethnig on Sourceforge ?
Elaine
The tigress is here
|
|
|
|
|
Have a scout about for "Packet Shapers". You may find some useful articles.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hello !
I need to check if a specified directory exists. If not, I must create it (a complete path is specified).
How is the best way to do that ?
Thanks
|
|
|
|
|
I think this will work
CFile f;
CFileStatus fs;
if(f.GetStatus(lpszDirectoryPath, fs) == FALSE)
MakeSureDirectoryPathExists(lpszDirectoryPath);
Arjan
|
|
|
|
|
Hi !
Thanks, that worked .
|
|
|
|
|
Why not just call CreateDirectory(...) and be done with it? If the directory does not exist, it will be created and if it does exist, you will get back an ERROR_EXISTS error code. Either way, you get want you want and will likely be faster than doing you own check(s) first.
But the Shell LWAPI function PathFileExists(...) was designed for checking for the existance of files/directories...
Peace!
-=- James
Tip for SUV winter driving survival: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|
|
What I am looking for is a state machine diagram showing how to decipher a regular expression. I've searched the www and have half a dozen pieces of source code that process regular expressions, plus I've read more articles on NFA's and DFA's than I care to think about. None of them give me what I am looking for. I am working on developing my own diagram, but it is far more complicated than it appears on the surface. I've written DFA's to handle kown cases (keywords,numbers,etc..), but what I want is to allow the user to enter in a regular express that my code can use to generate a (specific) DFA in memory.
INTP
|
|
|
|
|
Hello,
I am using Borland C++ 6,
I need to read and send RAW Ethernet packet,
From few weeks I am trying to use winpcap, TjesComponenet and more programms to read and send Ethernet Data on the network. Any of these is working good !!! snif
Can any one tell me how to developp a raw ethernet packet using NDIS ???
I found a exemple of NDIS on C#, but none on C++.
Can anyone help me please ???
|
|
|
|
|
What are your problems with using an existing NDIS driver i.e. winpcap?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I don't know how to use NDIS!!!
I can't find a single soucre code in C++ only using NDIS.
|
|
|
|
|
hai
Now i am using MFC ActiveX controlWizard to create TextBox Control. I want to add some Property that no provided by Microsoft form 2.0 in TextBox control. At the same time, the bacis property such as AutoSize, AutoTab, SelText,Value, Visible property in Microsoft TextBox still want to maintance plus my adding property. I no need to do agian the bacis property and i just want add the property that i want. How can i do it? where can find the microsoft form 2.0 textbox activeX control source code in mfc langauage?
Pls help help me;)
Thanks
kelvin
|
|
|
|
|
IMediaSeeking *pMS = NULL;
...
init pMS;
...
pMS->SetRate(2);
when I try to change the playback rates using this function, it fails when playing a mpeg2 file (fine with an uncompressed avi file), there wont be any change in play rate, is that due to the decoder I am using? the decoder I use is stinky mpeg2 decoder. Anybody knows why?
|
|
|
|
|
how to let text box auto return when I reach right side edge of it? in another word, there's a limitation of characters in line.
|
|
|
|
|
>code>LimitText will let you set a max number of characters. As for auto-returning, you might want to handle the EN_UPDATE notification message for the edit.
|
|
|
|
|
Wt is the Difference between Debug Build and Release build.
when i channged from Debug to release build..
there r alot of errors.
if some one wanaa send the project to user in which format it should be??
thanx
|
|
|
|