|
|
Delicously evil
|
|
|
|
|
You are SO mean, dude...
Windows Calculator told me I will die at 28.
|
|
|
|
|
toxcct wrote: XML pretty Print
toxcct wrote: This[^] is not a regular way to ask for something.
he he he
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And You
|
|
|
|
|
Dear All,
I am not sure whether I should post this question in this forum.
If not please let me know the correct forum to post the question.
I am using CPPUnit::XmlOutputter to write the unit test results to an XML file.
The program works as expected and I can see the test results in the xml file.
But I also want to add intermediate results and user defined messages in the same xml result file.
How do I do that?
Thanks a ton,
Arti gujare
|
|
|
|
|
Well I won't say that it's the wrong forum but you might have better luck asking in the CPPUnit forums on sourceforge. Not that you won't get an answer here but you are more likely to get a correct answer there.
|
|
|
|
|
Thank you Wes Aday. I will post it there too.
|
|
|
|
|
Can someone give me a simple example of accessing and sending a image to a picture box control at run time??
Jerry
|
|
|
|
|
Try the .Net Framework[^] board.
There's an example in the PictureBox class overview in the docs.
Mark
|
|
|
|
|
Actually I want to use a Picture Control.
Jerry
|
|
|
|
|
Picture Box? what do you need?
|
|
|
|
|
What the function use for get handle of child windows.
|
|
|
|
|
You could use either:
EnumChildWindows()
or
HWND hChildWindow = GetWindow(hThisHWnd, GW_CHILD);
Darka [ Xanya]
"I am not a slave to a god that doesn't exist."
|
|
|
|
|
If you know the ID of the child you can use GetDlgItem . It works for any window, not just dialogs.
Steve
|
|
|
|
|
Hi,
void C1View::OnViewIncomeview()
{
AfxGetMainWnd()->SendMessage(WM_COMMAND, ID_FILE_NEW);
CMDIFrameWnd *pFrame =
(CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild =
(CMDIChildWnd *) pFrame->GetActiveFrame();
CView *pView = (CView *) pChild->GetActiveView();
CEdit *r1 = new CEdit;
r1->Create(WS_CHILD|WS_VISIBLE|ES_AUTOVSCROLL,
CRect(x1,y1,x2,y2), pView, 1);
CEdit *r2 = new CEdit;
r2->Create(WS_CHILD|WS_VISIBLE|ES_AUTOVSCROLL,
CRect(x3,y3,x4,y4), pView, 1);
r1->SetFocus();
}
I have this piece of code in a function of a called by the application when an icon is clicked on the toolbar.
Now if I go to some other function of the same class and that function moves the caret from one edit box to another
What has to be done?
Thanks
Prithaa
|
|
|
|
|
Hi all,
Could someone please help me with the following problem:
How can I wait for a acknowledgement from another device when I have sent it a piece of data throught the serial port. (before sending the next piece of data).
I'm using VS2K5, and I have done the following:
<br />
..... looping .....<br />
array<String^>^ Text = gcnew array<String^>(10000);<br />
<br />
if (!serialPort1->IsOpen){ <br />
serialPort1->PortName = portNum; <br />
serialPort1->BaudRate = 9600;<br />
serialPort1->Open();<br />
}<br />
<br />
serialPort1->Write(Text[x]);<br />
<br />
:confused: ..... wait for ack ..... :confused:<br />
<br />
array<wchar_t>^ buffer = gcnew array<wchar_t>(10000);<br />
serialPort1->Read(buffer,x,sizeof(buffer));<br />
Thank you in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
You can set a timeout for the reading: you'll wait until either all the data arrived or the timeout expired.
Check out the SetCommTimeout[^] function and the COMMTIMEOUT[^] structure.
|
|
|
|
|
Thanx Cedric ... I'll have a look
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
hi all,
I am having non-blocking TCP socket, trying to receive in a loop for requried bytes.
I am disconnectiing server by removing n/w cable from m/c running server application.
every time recv() fails with WSAWOULDBLOCK, why?
How can i detect that server died abnormally at client end?
recv() also not returning 0?
following is code
iMode = 1; // non-zero = non-blocking mode
iResult = ioctlsocket(sockMain,FIONBIO,(u_long FAR*)&iMode);
iDataGot=0;
while ( iData2Recv >= iDataGot )
{
// recv single byte at a time
iResult = recv(sockMain,&chData,1,0);
// if zero byte got or any other error
if ( iResult == 0 )
{
//never reach here
break;
}
/* timeout scheme
// check timeout period
DWORD dwCur = GetTickCount();
if ( dwCur > dwTimeout )
{
// timeout occured, so we failed
break;
}
*/
if ( iResult == SOCKET_ERROR )
{
if ( WSAGetLastError() != WSAEWOULDBLOCK )
{
// never reaches here
break;
}
else
{
// always executed.
continue;
}
}
// we got something add into output string
if ( iResult == 1 )
{
// add data,update counter into string and break if all datalen is received.
}
client application calls receive() after 10sec and it timeouts after 10sec if no data arrived. I want eliminate later 10sec. and detect server has died.
Thanks in advance.
Jetli
Constant Thing In World Is Change.
|
|
|
|
|
Hi,
Can VC++ work with Linux or Unix?
Or VC++ works only with Winodws?
Prithaa
|
|
|
|
|
prithaa wrote: Can VC++ work with Linux or Unix?
no.
prithaa wrote: Or VC++ works only with Winodws?
yes.
|
|
|
|
|
Hi,
What are the other alternatives of C++ with Unix or Linux
other than Java to handle Visual side of an application
Prithaa
|
|
|
|
|
prithaa wrote: What are the other alternatives of C++ with Unix or Linux
You asked about VC++ not C++. C++ is totaly cross-platform. VC++ is not. The difference is that VC++ contains library that can only target windows operating system (basically).
If you want to have a cross-platform GUI, take a look at wxWidgets[^], it is 'similar' to MFC.
|
|
|
|
|
prithaa wrote: What are the other alternatives of C++ with Unix or Linux
other than Java to handle Visual side of an application
Pick your weapon.[^]
|
|
|
|
|
vi, ÔÔÔÔÔ vi... (say vee-ay)
what, weren't we talking about powerful GUIs ?
|
|
|
|