|
It's not practical to post the code. It's a long, complicated program. My next move will be to try to reproduce it in a test program. Maybe that will help.
I was hoping someone here would have an idea of what could even cause this kind of selection problem in a combo box. I have no idea.
|
|
|
|
|
I found the answer in an article on Newcomer's site:
http://www.flounder.com/updatedata.htm
I went through my program and commented out all instances of UpdateData(). Voila – problem gone. I may need to clean up a few problems using the control variables, but the problem that’s been driving me insane is solved. The cursor is unstuck.
|
|
|
|
|
In the application wizard, next to the last screen there is an option to have a Properties window added to your MFC Doc/View app. It is static, what does it take to make it functional?
Old dog learning new tricks!
|
|
|
|
|
Roger65 wrote: what does it take to make it functional?
Ehum, some programming?
I recommend you implement some type of publish/subscribe pattern[^] where anyone who thinks he's got the focus, can publish a set of properties. The properties window will be a subscriber.
|
|
|
|
|
Hi!
I got the following linker error:
Error 1 error LNK2001: unresolved external symbol "public: void __thiscall player::writeNameOnTexture(void)" (?writeNameOnTexture@player@@QAEXXZ) battingTeam.obj
How do I resolve this error?
|
|
|
|
|
It means the linker didn't find a body for the function. Did you forget to write the function body ?
|
|
|
|
|
It means that the public method void writeNameOnTexture(void) of the class player could not been found. Probably you forgot to write down the body of it.
|
|
|
|
|
T.RATHA KRISHNAN wrote: How do I resolve this error?
Did you try here?
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I want to create a sidebar for windows xp using vc++. Sidebar is similar to vista sidebar.
I tried google to get idea, but everybody giving details about gadgets not side bar.
Anybody have any details about how to create a sidebar ?
|
|
|
|
|
|
|
Hi all,
i have written a code to download a webpage using WinInet api's. My code is as follows
InternetCanonicalizeUrl(site,sCompareURL.GetBufferSetLength(MAX_BUFFER_SIZE),&dwLen,ICU_BROWSER_MODE);
HINTERNET Ihandle = InternetOpen("Internet Explorer6.0.2900.2180", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, NULL);
HINTERNET hFile = InternetOpenUrl(Ihandle,site,NULL,0,0,0);
BOOL bRet = InternetReadFile(hFile, szBuffer, MAX_BUFFER_SIZE, &nSize);
if(!bRet || nSize <= 0)
break;
szBuffer[nSize] = '\0';
m_sHtml += szBuffer;
This code is working fine, but i want to implement time out in this, i.e i the specified page is not download in specified time then time out shold be displayed. How can i implement this?
Thanks in advance
|
|
|
|
|
You may try to set an option via InternetSetOption[^]
(the INTERNET_OPTION_RECEIVE_TIMEOUT flag looks promising, but I never made a test).
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 know that if use the SMTP protocol, I should use the socket to create link with server.
And then
HELO SERVER
USER
PASS
but if I donot use the socket and I want to achieve the SMTP protocol , how should I do ?
Can someone give me suggestion?
|
|
|
|
|
Translate in to metaphor:
I know that to send a mail I have to plug to the network and then send it.
But if I don't use any network and I want to achieve the sending on the mail how should I do?
Frankly ... Or you use an SMTP service library (that use the socket internally, so it is not proper to say you're "not using socket") or ... try concentrate a lot, may be telepathy will work!
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Pigeons are quite effective.
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'll try an answer: Write a socket client that implements at least RFC 5321 and RFC 4954, both protocols are typically needed to be able to send emails.
Alternatively use a networking library that offers an SMTP client/example (e.g. libcurl, PichatCore, QT), the code to send an email could look like this:
CClientSmtp client;
client.SetRequestServer("mail.example.com", 25, "example.com");
client.SetRequestEnvelope("sender@example.com", "receipient@example.com");
client.SetRequestData("Subject:Test email\n\nHi! I am hungry, please send some pizza.");
client.Request();
You need to decide if you want to implement everything yourself or take an existing C++ library. First will teach you a lot about networking protocols, later gives you the result right away. Hope this helps!
/M
|
|
|
|
|
Hi,
If I have today date. How can I get date before 7 or 10 days?
My means to say Using number of days, how to calculate preoius date from the current date?
|
|
|
|
|
Take a look at the documentation of COleDateTime and COleDateTimeSpan.
|
|
|
|
|
what is the format of time you are having? If in MFC its easy to use CTime and CTimeSpan classes.
psuedo code:
CTime curTime(...);
CTimeSpan span(7, 0,...);
Ctime newTime = curTime - span;
|
|
|
|
|
Plz tell me how to do that?
If I want to get date before 7 days from current date?
How to do that?
|
|
|
|
|
Wow, you really need glasses because he even provided a code snippet showing exactly how to do it...
|
|
|
|
|
Bijo Pulikkottil wrote: If I have today date.
Based on what? Is it a CTime object? Is it a time_t variable? If you have the number of seconds since some epoch, can't you just subtract 86400 * 7 seconds?
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi all,
i m using to Excel automation to read and write excel files.
i write excel file like this.
CoInitialize(NULL);
{
Excel::_ApplicationPtr XL;
HRESULT hr;
try
{
XL.CreateInstance(L"Excel.Application");
_variant_t var((long)DISP_E_PARAMNOTFOUND,VT_ERROR);
XL->Workbooks->Add(Excel::xlWorksheet);
Excel::_WorksheetPtr pSheet = XL->ActiveSheet;
Excel::RangePtr pRange = pSheet->Cells;
Excel::RangePtr pBeginRange = pRange->Item[1][1];
Excel::RangePtr pEndRange = pRange->Item[1][1];
Excel::RangePtr pTotalRange = pSheet->Range[(Excel::Range*)pBeginRange][(Excel::Range*)pEndRange];
wchar_t wsz1[] = L"C";
wchar_t wsz2[] = L"D";
BSTR bstr1;
bstr1 = SysAllocString(wsz1);
BSTR bstr2;
bstr2 = SysAllocString(wsz2);
SAFEARRAYBOUND rgsabound[2] = { 0 };
rgsabound[0].cElements = 1;
rgsabound[0].lLbound = 0;
rgsabound[1].cElements = 1;
rgsabound[1].lLbound = 0;
VARIANT arr;
arr.vt = VT_ARRAY | VT_BSTR;
arr.parray = SafeArrayCreate(VT_BSTR,2,rgsabound);
long index[2];
index[0] = 0;
index[1] = 0;
hr = SafeArrayPutElement(arr.parray,index,bstr1);
pTotalRange->PutValue2(&arr);
VariantClear(&arr);
SysFreeString(bstr1);
SysFreeString(bstr2);
XL->Visible = true;
}
catch(_com_error &error)
{
cout << "COM error " << endl;
}
}
CoUninitialize();
when i write excel file i received this error
0x800706F7
"the stub received bad data"
please tell me how can i solve it.
thanks in advance.
|
|
|
|
|
if you have #imported the correct dlls and olbs for the installed version of Excel, everything seems fine.
|
|
|
|