|
thank you and thanx to all those posting my Question
its solved ..
|
|
|
|
|
Hi,
I am using Googletest(gtest-1.6.0) for Unit testing activity for C++\VC++ code. Here i'm using microsoft Visual studio 2010. There is inbuild Codecoverage facility in MSVisualStudio 2010. I didn't find a way yo configure gtest framwork in visual studio to generate Codecoverage report. I mean any project setting required for the same.
Please guide me soon.Thanks
|
|
|
|
|
|
Hi All,
I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it?
The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program.
I am talking about an MFC GUI application.
Thanks!
modified 30-Sep-13 2:03am.
|
|
|
|
|
See here before you get too far into this.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Thanks David for the prompt reply.
Unfortunately my question was not clear nor complete...
What I meant was that I need to verify that memory is cleaned after app is closed.
So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.
|
|
|
|
|
dushkin wrote: What I meant was that I need to verify that memory is cleaned after app is closed. It is, whether you want it to be or not.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
dushkin wrote: What I meant was that I need to verify that memory is cleaned after app is
closed. So I'd like to check the system free memory before I started the app
and after I closed it, and this way to know if all the allocated memory was
cleared.
Emphasizing the previous response - that is always true regardless of what your application does.
When the application stops, except for some exotic resources, all resources are cleaned up. Memory (all of it) is released, files are closed, sockets are closed, UI specific resources are closed, etc, etc, etc.
|
|
|
|
|
|
|
I have a single document frame window with multiple views and I'm trying to add a view that contains a splitter window.
For this new view I have created a base CView that contains a CSplitterWnd . The splitter has one row, and two columns. The left column is a CTreeView derivative, and the right column is a CView derivative that contains a CMFCPropertyGridCtrl .
When the program switches to this new view, it is totally blank with no splitter bar or child views. What have I failed to do to get the splitter view to display correctly? Is it valid for a CSplitterWnd to be hosted inside a CView ?
This is the code inside the base CView that creates the splitter:
int CGSFeaturesView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
Splitter.CreateStatic(this, 1, 2);
CCreateContext Context;
Context.m_pCurrentDoc = GetDocument();
Splitter.CreateView(0, 0, RUNTIME_CLASS(CGSFeatureTreeView), CSize(0,0), &Context);
Splitter.CreateView(0, 1, RUNTIME_CLASS(CGSFeaturePropertyView), CSize(0,0), &Context);
Splitter.SetColumnInfo(0, 300, 200);
Splitter.SetColumnInfo(1, 300, 200);
Splitter.SetRowInfo(0, 1000, 200);
return 0;
}
This is the code inside the CWinApp that switches views: (Taken from the MSDN example that shows how to create multiple views for a single document)
void CGSApp::SwitchToView(CView* pNewView)
{
CView* pActiveView = ((CFrameWnd*) m_pMainWnd)->GetActiveView();
UINT temp = ::GetWindowLong(pActiveView->m_hWnd, GWL_ID);
UINT temp1 = ::GetWindowLong(pNewView->m_hWnd, GWL_ID);
::SetWindowLong(pActiveView->m_hWnd, GWL_ID, temp1);
::SetWindowLong(pNewView->m_hWnd, GWL_ID, temp);
pActiveView->ShowWindow(SW_HIDE);
pNewView->ShowWindow(SW_SHOW);
((CFrameWnd*) m_pMainWnd)->SetActiveView(pNewView);
((CFrameWnd*) m_pMainWnd)->RecalcLayout();
pNewView->Invalidate();
}
Thank you for reading my question.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
The CSplitterWnd should be the main client of your frame window, and the views are then placed in the panes of the splitter, as far as I recall - it's a few years since I used MFC.
Veni, vidi, abiit domum
|
|
|
|
|
Richard MacCutchan is right.
Splitters and Views need to be created in the frame class.
Place the code in the OnCreateClient method of the frame class and it should work.
A context object pointer is also available as a parameter to OnCreateClient that you can use in the call to CreateView .
|
|
|
|
|
«_Superman_» wrote: Place the code in the OnCreateClient method of the frame class and
it should work.
Can I still switch among multiple views if I create the splitter inside OnCreateClient ?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yes but your views need to be shown inside a pane of the splitter.
Veni, vidi, abiit domum
|
|
|
|
|
I see what you mean. I created a test application with the MFC application wizard just to see how they use the CSplitterWnd .
And what they do is they put the splitter window as a member of the main form, NOT the view. This implies that the splitter does its thing over every view that gets displayed.
Apparently you can't just put the splitter on certain views.
Thanks for your input!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Well you could, but it's a bit more complicated, because of the way that splitter windows work. And, I suspect, the CSplitterWnd class's design does not easily lend itself to doing that.
Veni, vidi, abiit domum
|
|
|
|
|
I often use TV in my room to watch some stuff from PC
Using Control Panel I can switch between default audio devices to hear sound from PC or from TV
Doing this too often using Control Panel is annoying
I need utility that can change default audio device, can anyone help with code?
|
|
|
|
|
You could try using RegMon to see what changes Control Panel is making to the registry.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Is there any API to get outdated driver list?
|
|
|
|
|
john5632 wrote: ...outdated driver list? Your question is vague at best. Provide some context, please.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hi,
I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing the sine function as input, I am not sure how I should convert an audio-signal (e.g.: song) into a form that can be taken as input by the KissFFT C code.
Thank you.
|
|
|
|
|
As you say 'real time' then I guess you'll need some electronics to convert audio to a form suitable for input into your FFT system. I once built the circuitry to utilize an Analog To Digital (A/D) chip to take an external electrical signal, buffer and interface it to a PCs data-bus and then had to write a simple device driver to enable my C++ program to acquire the sampled data and plot it in real time. With a microphone on the front that's the very basics I suppose. I guess if you really mean real time you'll need the equivalent of a sound card or A/D card, i.e. some Audio interface device that you can use to convert the real time audio to your required format so that you can grab it.
|
|
|
|
|
Try "waveIn FFT audio" posted here, sorry cannot copy the link.
With little patience it is workable, but also buggy.
Cheers Vaclav
Here is the link
<a href="http://www.codeproject.com/Articles/6855/FFT-of-waveIn-audio-signals">FFT of waveIn audio signals</a>[<a href="http://www.codeproject.com/Articles/6855/FFT-of-waveIn-audio-signals" target="_blank" title="New Window">^</a>]
|
|
|
|
|
I need to create a view for my document that contains a tree control and a property grid, with a splitter between them.
What do you think would be the best CView class to use as a base?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|