|
I am getting a crash inside InternetConnect and I can't for the life of me figure out why. It seems only to happen when I pass INTERNET_SERVICE_FTP -- I have a test program which does nothing but create a CInternetSession, then call GetHttpConnection, then call GetFtpConnection, passing valid IP addresses to both functions. GetHttpConnection returns successfully. GetFtpConnection crashes with an illegal memory access (and an overwritten stack) after the CFtpConnection constructor calls InternetConnect. Is there anything I can do to repair this short of reinstalling Windows? (The install is Windows 2000 sp 4.)
|
|
|
|
|
Hi,
I want write small a application which draw`s a graph,taking x-axis values from 300 to 900 and y-axis values from 0 to 100.I want to graph to smooth and linear.If any one already written any article on this issue please let me know.
Thank in before
James
|
|
|
|
|
All linear graphs of the form ax + by = 1 are smooth because they are differentiable at each point.
If you just want something approximate, be it a polynomial of degree 1 or higher, you might look into the Mathworld's Article on Least Suares Fitting[^].
Now, if you are talking about polynomial curve fitting, then you want to learn some numerical analysis. MIT's Open Courseware[^] has some good information on it.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi All,
How to select a column in CRichEditCtrl.
i have read a word file in CRichEditControl.Please Suggest me about the coloumn selection in this.
Bye
Thanks in Advance
Vikas
Vikas Tayal
|
|
|
|
|
do you mean programmatically, or as a user? I know in Word you can select any column by holding ALT while dragging your selection with the mouse
My articles
BlackDice
|
|
|
|
|
Hi
i am reading a word file in MFC application.i am storing this into CRichEditCtrl. i want to select a column in this file programatically.
is there any wat for this.
bye
|
|
|
|
|
tayal122436 wrote: i want to select a column in this file programatically.
CRichEditCtrl::SetSel
"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
|
|
|
|
|
Hi all,
I wrote client-server applicaion communicating via socket. I met a big problem that I did not know which function can be use to indicate the buffer size will be received before calling function recv() or WSARecv().
I want to know this information to allocate the buffer enough to receive the message coming.
For example:
int bufSize;
/*Do which thing here to indicate buffer size bufSize = ???*/
char*buffer = new char[bufSize];
recv(hSOCKET,buffer,bufSize,0);
If we dont know this information before calling receiving function, the problem is we won't know how big the buffer size should is.
Although, we can do: char buffer[100000]; but the size of coming message can be bigger or the coming message is too smaller than that.
Any boddy know this problem, Can you help me?
Thanks very much & best regards,
Tin Le
|
|
|
|
|
Send the buffer size first, then send the actual data.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
You do not need to know the buffer size before recieving the data, although it would help. C++ solves many problems like this by providing [classes like] the vector template class. What I am trying to say is that you can declare a vector to recieve the data, and just keep calling push_back(...) to stuff the bytes into the buffer. If you have a good idea of how many bytes of data you expect to recieve, then set the initial size to that many bytes (as an added safety measure you might double the number, but why waste memory). The reason you want to set a minimum (or maximum) for expected bytes of data, is that you want to avoid forcing the code to reallocate a new memory block that is large enough to hold all the data.
You can do the same thing in C, but C does not provide nice little pieces of code to do it for you.
INTP
Every thing is relative...
|
|
|
|
|
how can i read a text file which is in client's system and print it at client's default printer.
|
|
|
|
|
Your question is a bit vague, so this is the best I can come up with:
ShellExecute(NULL, "print", "file.txt", ...);
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Hello again.
This is Matthias form germany. I've a problem with my printer. For a few letters i've to get another tray on my printer but i've no idea how to do.
I post you my actually print initialisation:
[Code]
CPrintDialog dlgPrint(FALSE,PD_ALLPAGES,this);
if (dlgPrint.DoModal() == IDOK)
{
CDC pDC_print;
pDC_print.Attach(dlgPrint.GetPrinterDC());
DOCINFO myPrintJob;
myPrintJob.cbSize = sizeof(myPrintJob);
myPrintJob.lpszDocName = "test";
myPrintJob.lpszOutput = NULL;
myPrintJob.lpszDatatype = NULL;
myPrintJob.fwType = NULL;
......
}
but how can I set the tray, that the user hasn't to choose it in the printDialog?
|
|
|
|
|
Did you try changing the dmDefaultSource in the DEVMODE and then try?
Vipin - MVP
|
|
|
|
|
yes, of course.
the problem is, that the initialisation is before i set the new flag to DEVMODE structure.
CPrintDialog prtDlg(FALS......)
if ( prtDlg.DoModal() == IDOK )
{
prtDlg.m_pd.dmDeviceSource = 2;
......
}
the flag in the structure was set but he takes the normal default paperSource
|
|
|
|
|
You got to set the DEVMODE in CPrintDialog before you call DoModal(...) making a call afterwards will not work.
|
|
|
|
|
How can I draw some arrows and some lines in the ClistView?
When I click one item in the ClistView, the item's color turns red, how can I do?
help me,thank you very much!
|
|
|
|
|
A wonderful article by Michael Dunn..
http://www.codeproject.com/listctrl/lvcustomdraw.asp[^]
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
thank you very much.It is very helpful for me.
|
|
|
|
|
Dear Owner drawn,I want to ask you if it is the best method when I draw some arrows and some lines in the ClistView?how to do it effectively?thank you very much!
|
|
|
|
|
Anyone familiar with the TB_CUSTOMIZE message?
I'm looking for an example in Win32 C++ code.
Thanks in advance,
Ward
|
|
|
|
|
LRESULT MsgNotify(HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM lparam)
{
static UINT i=0;
LPNMHDR lpnmhdr;
lpnmhdr = (LPNMHDR)lparam;
if (lpnmhdr->code == TBN_QUERYINSERT || lpnmhdr->code ==
TBN_QUERYDELETE)
{
return TRUE;
}
if (lpnmhdr->code == TBN_GETBUTTONINFO)
{
LPTBNOTIFY lpTbNotify = (LPTBNOTIFY)lparam;
char szBuffer [20];
if (lpTbNotify->iItem < 12)
{
lpTbNotify->tbButton = tbButtonNew[lpTbNotify->iItem];
LoadString(hInst,
4000+ lpTbNotify->iItem,
szBuffer, sizeof(szBuffer)/sizeof(szBuffer[0]));
hr = StringCchCopy
(lpTbNotify->pszText,
sizeof(lpTbNotify->pszText)
/sizeof(lpTbNotify->pszText[0]),
szBuffer );
if(SUCEEDED(hr))
{
lpTbNotify->cchText =
sizeof(szBuffer)/sizeof(szBuffer[0]);
}
else
{
TODO: Write error handler.
}
return TRUE;
}
else
return 0;
}
return 0;
}
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
This was what I already found myself on the msdn site. But it is not a very complete example, is it?
It is somewhat the only example I was able to find on the Internet.
But thanks anyway,
Ward
|
|
|
|
|
Yeah it is complete with the one that I didn't paste. Search in MSDN documentation for the other one.
The search is titled "Using toolbar controls".
It has got a comprehensive coverage of what you want. I just pasted the interesting(for me) part.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Ok, I will give it an in depth look
Ward
|
|
|
|