|
|
Thanks, but I've seen that one already. The tool tips I'm displaying for the list are specific to the row and column that the pointer is over. I need the tooltips to be specific to the list control, as they are now when it's used outside a dialog. Remember, this works fine (like the demo) when I use the list on a regular frame window.
|
|
|
|
|
Hello,
could it be possible to get a notification message when user presses Enter with the Editbox selected. If user hits Enter, it should get the editbox's text and write it into a Textbox..
All suggestions are welcome,
Thank You..
|
|
|
|
|
<br />
CWnd* pWnd = GetFocus(); <br />
<br />
if(pWnd->GetDlgCtrlID() != IDOK) <br />
{<br />
if (pWnd->GetDlgCtrlID() == IDC_MYEDITBOX)<br />
}<br />
<br />
CDialog::OnOK();<br />
|
|
|
|
|
Thank You..
Seems that i posted it into a wrong discussion board..
Win32 API without MFC would be a bit more helpful for me as i'm using DevC++ and i don't know what equals to CDialog::OnOK();
All suggestions are welcome,
Thank You..
|
|
|
|
|
here is Shay Harel code converted.
case IDOK:
HWND hWndChild = GetFocus();
if( hWndChild != GetDlgItem(hWnd, IDOK) )
{
if( hWndChild == GetDlgItem(hWnd, IDC_MYEDITBOX) )
// do something;
}
|
|
|
|
|
and with message WM_COMMAND and switch (LOWORD(wParam)) ?
Why could if( hWndChild != GetDlgItem(hWnd, IDOK) ) be needed if the second one checks for a window in focus?
With this switch i get a notification even if user clicks on the editbox.
Is it possible to check HIWORD(wParam) for a mouseclick when the control is an editbox?
Do i have to use ES_MULTILINE | ES_WANTRETURN flags when creating the editbox in order to make the control even receive a notification about Enter?
Unfortunately i see no changes after adding these flags..
WinInf.EditBox = CreateWindow ("edit", "", WS_CHILD | WS_VISIBLE | <br />
ES_LEFT | ES_NOHIDESEL | ES_MULTILINE | ES_WANTRETURN,<br />
WinInf.ClientRect.left + 2,<br />
WinInf.ClientRect.bottom - 20,<br />
WinInf.ClientRect.right - 4, <br />
20,<br />
hwnd, (HMENU) 1, WinInf.hInst,<br />
NULL);
All suggestions are welcome,
Thank You..
|
|
|
|
|
You are making this much harder than it needs to be. This is a very easy thing to code. The following code does exactly what you need. All you have to do is copy it into your code and it will work. You don't need to mess around with the create options. The reason it works is because the IDOK button will be a default button, and will be called when the return is pressed.
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case IDOK:
{
HWND hWndChild = GetFocus();
if( hWndChild != GetDlgItem(hDlg, IDOK) )
{
if( hWndChild == GetDlgItem(hDlg, IDC_EDIT1) )
{
char szText[128];
GetWindowText(hWndChild, szText, sizeof(szText));
SetWindowText(GetDlgItem(hDlg, IDCS_TEXT), szText);
return TRUE;
}
}
EndDialog(hDlg, LOWORD(wParam));
}
return TRUE;
|
|
|
|
|
SHALOM
Hello everybody
does somebody know how can I put together 2 files
one .Wav file, and one .Avi file
I have the Video in one and the sound in other
and I need to create a .Avi file with sound
does somebody know how to do it in MVisual C++
or there is some similar project to see ???
thanx for your help,
its a little bit urgent
Thanx
GOD BLESS YA
Reu
|
|
|
|
|
|
Are you looking to just do the operation, and not write any software?
If so, check out VirtualDub. You'll open the .avi file with it, under the Video menu, select "Direct Stream Copy". Under Audio, select "WAV audio...", select your file. Optionally, to compress the audio, select "Full Processing Mode" under Audio, then select "Compression..." and select a codec and quality. Click File->Save as AVI and you're done.
|
|
|
|
|
Hi,
As far as I remember, all the articles I have seen for detecting memory leaks were associated with adding some code to your program.
What if I am running someone else's code and I want to check for memory leaks, is that doable ?
Thanks,
Shay
|
|
|
|
|
Shay Harel wrote: What if I am running someone else's code and I want to check for memory leaks, is that doable ?
While it may be possible to detect if it has or hasn't, you'd have no way of determining where.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I'll go with the first option.
If I can prove an application is leaking memory, I can get the developer to fix it. All I need to do is to prove it does it.
|
|
|
|
|
it looks like a chief behavior, who don't bother at all the guys of his team
even if you find some memory leaks, how will the developper find the lack ?
did you ever coded in your life dude ?!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
To start with, I wrote tons of code and still does.
However, I am using someone else's application and I need to prove it's causing memory leaks.
Since this application runs for days, the leaks are finally halting the system. The problem is we have multiple applications running on the background and we need to find the culprit.
Sounds better ?
|
|
|
|
|
Shay Harel wrote: Sounds better ?
few...
as the program is not running alone on its machine, there could be leaks at several places.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Which was my original question...
Is there any application out there that somehow monitors memory usage per application so I can see if any of the applications just consume more and more memory.
|
|
|
|
|
|
Configure the application for 'constant' behavior. That is some well-defined repeatable behavior that should USE memory but not LEAK memory.
Set up performance monitor to watch this application's working set size and private bytes. Chart over a day or two, or until application halts.
Then see if that application has a constantly growing use of the working set size and private bytes. You can probably assume it has a memory leak.
|
|
|
|
|
|
To find memory leaks using just Visual stidio,-
is unappropriate complex task.
visual studio does only small chek and nothing more,
so slightly complex errors remains hardly found.
Best and easy way to use specialized program like
BoundsChecker,
or something like this.
|
|
|
|
|
I like to drop in MMGR. Add it to your project, then read the comments in mmgr.cpp to use it. It will record every allocation without adding the header file to your project files, but it won't record the file and line number of the allocation unless the mmgr.h is included. It can record every memory allocation or only mem leaks in a text file that's easy to read. It helped me spot places where I allocated an array of characters, eg. I used
delete item; on an array called item instead of
delete[] item; and things like that. There are plenty of asserts in there with comments that tell you what you did wrong to cause the assertion.
|
|
|
|
|
FWIW, I do not think that kind of error causes a memory leak directly (only indirectly). Missing the [] operator causes only the first object in the array to have its destructor called, but the memory block itself is still freed.
For example, if you missed the brackets on an array of simple types, there should be no memory leaks. However, if the array was an array of complex objects that themselves allocate memory, then that might indirectly cause leaks because the destructors will not be called on objects 2-n in the array.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
This may be a dumb question, but why can you not just use Task Manager, and look at the memory consumption of the process in question?
Over time, if leaks do exist, you should be able to see an increase in total memory usage over time.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|