|
Hi,
I'm looking for a tutorial about Unit testing integrated in Visual studio.
I know that Visual Studio 2008 Team suite has the ability to write unit test(the problem is that
The unit test is written in managed C++ while my code is written in unmanaged c++).
Is there any tutorial?
How about another tools(for unmanaged code)?
With best regards,
Eli
|
|
|
|
|
|
|
I use
WideCharToMultiByte(CP_ACP,0,pBuf,len,pBuf_MBCS,n,NULL,NULL);
to convert.
\n sometimes is converted to 0D 0A , and sometimes to 0A .
Who knows what's the problem?
system
|
|
|
|
|
How do you know that? What is your input string and what about the output one?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
One string is very long, it compose a .txt file, about 50 lines, use \n as line break,
another is much shorter, less than 10 lines, also use \n as line break.
After converting, \n in the long one became \r\n , the other is sitll \n .
system
|
|
|
|
|
You may check, possibly with a hex editor (or the debugger), what are the actual linebreaks (i.e what are the UNICODE characters) of the two different strings.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Nice to know.
It has been a while since I saw one of his posts at C++ forum.
BTW: THHB goes on without troubles!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hi pallini,
BTW, THHB?
|
|
|
|
|
Rajkumar R wrote: BTW, THHB?
T hread H ijacking H appy B rigate, and you're live contributing to.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
And you should be ranked in top 10 on the THHB category right?
it seems there was a discussion on THHB on the board, can you link me to that.
|
|
|
|
|
Rajkumar R wrote: And you should be ranked in top 10 on the THHB category right?
Possibly.
Rajkumar R wrote:
it seems there was a discussion on THHB on the board, can you link me to that
Believe me, I don't know about.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
How to generate beep sound or audio from a system not having speakers in VC++.Net?
I used Beep(freq,mili_secs) to generate a beep from motherboard.Will it work without sound card installed on system?
And how to know diffrent frequencies?
Regards,
Aniket A. Salunkhe
modified on Sunday, July 20, 2008 1:55 AM
|
|
|
|
|
Hi Aniket,
I think you should try using the MessageBeep[^] function.
Best regards,
Mihai Moga
|
|
|
|
|
Aniket Salunkhe wrote: I used Beep(freq,mili_secs) to generate a beep from motherboard.Will it work without sound card installed on system?
Yes, provided your system satisfy function requirements [^].
Aniket Salunkhe wrote: And how to know diffrent frequencies?
Documentation states that frequency maybe genrated in the "37 through 32,767" Hz range.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have a problem with MDI forms. An MDI form in my application sets focus to a control on it(also scrolls to its location) when the form is clicked/activated/focused. I'm looking a way to prevent it. This is actually a C# application and I have no C++/WinApi knowledge. I tried Spy++ and checked messages it recieves when the mdi form is activated and when this problem occurs. I saw several messages like WM_FOCUS and such. I checked the message number, e.g 0022, and overriden WndProc function of the mdi form and tried to handle it like "if(m.Msg == 0022 || m.Msg == 22)return" for all of the messages includes word "focus" but this didn't do any good. I don't know what else I can do.
This is actually a .NET question I posted here but I thought maybe someone with C++/WinApi knowledge could help me with this. It's driving me insane and I appreciate any help.
|
|
|
|
|
Hi,
Preview works,
Capture does not work at
//
Problem: RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pBuild, NULL, pMux)
Please help.
void CWebCamDlg::OnStart()
{
// TODO: Add your command handler code here
UpdateData();
IGraphBuilder *pGraph2;
IMediaControl *pControl2;
IVideoWindow *pVidWin3;
ICaptureGraphBuilder2 *pBuild2;
hr =CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,IID_IGraphBuilder, (void**)&pGraph2);
pGraph2->QueryInterface(IID_IMediaControl, (void **)&pControl2);
///////////////////////////////////////////////////////////////////////////////////////////////
hr =CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC_SERVER,IID_ICaptureGraphBuilder2,(void**)&pBuild2);
pGraph2->QueryInterface(IID_IVideoWindow, (void **)&pVidWin3);
hr = pBuild2->SetFiltergraph(pGraph2);
//hr = pGraph2->AddFilter(pBase, L"Capture Filter");
IBaseFilter *pMux;
//CoCreateInstance(CLSID_AviDest, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void **)&pMux);
//pGraph2->AddFilter(pMux, L"AVI MUX");
IBaseFilter *pWriter;
CoCreateInstance(CLSID_FileWriter, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void **)&pWriter);
hr =pBuild2->SetOutputFileName(&MEDIASUBTYPE_Avi,L"c:\\dwk.avi",&pMux,0);
////////////////////////////////////////////////////////////////////////
//prolbem
//pBase from preview
hr = pBuild2->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pBase, NULL, pMux);
//////////////////////////////////////////////////////////////////////////
pControl2->Run();
pVidWin3->put_Owner((OAHWND)m_hWnd);
pVidWin3->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS);
CRect rc;
GetWindowRect(rc);
ScreenToClient(rc);
pVidWin3->SetWindowPosition(0, 0, rc.Width(), rc.Height());
// Release the mux filter.
pMux->Release();
IConfigAviMux *pConfigMux = NULL;
pMux->QueryInterface(IID_IConfigAviMux, (void**)&pConfigMux);
pConfigMux->SetMasterStream(1);
pConfigMux->Release();
IConfigInterleaving *pInterleave = NULL;
pMux->QueryInterface(IID_IConfigInterleaving, (void**)&pInterleave);
pInterleave->put_Mode(INTERLEAVE_CAPTURE);
pInterleave->Release();
}
Please Help!
Thanks
|
|
|
|
|
Hi,
I am using two differnt applications within one project in vc++.
For these I want to load two different application icons. However i dont want to another icon id. I want to use this same icon id. The reason is because i have all my menus,etc with this id. So i want to have this id but pointing to two differnt resource files, which would be decided in the compile time.
How to use/point a icon id to two different files programatically?
Priya Sundar
|
|
|
|
|
I don't understand the problem. Just make sure you assign the same values in the resource.h file.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi for eg assume we have 5 nodes
and need to travel from 1 to 2 we will get total 16 paths i need all those paths
i have writtn for that but that is time consuming if u have any good logic plz suggest
|
|
|
|
|
Looks similar to Travelling Salesman Problem [^]. An amusing algo maybe the Simulated Annealing [^] one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All,
I have this global variable declared as in the below statement:
const LONG MYITEMID = MAKELONG(MAKEWORD('m','i'),MAKEWORD('d','0'));
Here when i try to build this i am getting the warning displayed 3 TIMES:
W8084 Suggest parentheses to clarify precedence
Can anyone tell me how to resolve this?
I have tried all types of typecasting.. but it didnt work.
Kindly help!
Priya Sundar
|
|
|
|
|
Hi Priya,
this is a Borland C++ warning, and it works well under Visual C++ (no error). If you would like to skip this please put # pragma warn -8084 .
Best regards,
Mihai Moga
|
|
|
|
|
Hi Moga,
You are right. it is a Borland c++ warning message.
But do you know why is this message coming for this sort of statement?
Thanks for the help. After putting that statement now it is working fine.
Priya Sundar
|
|
|
|
|