|
|
Is it possible to specify domain user credentials when using the IXMLHTTPRequest interface retrieved from IXMLDomDocument?
|
|
|
|
|
Hi
How to change the default Blue selected color of CListCtrl to White?
|
|
|
|
|
Have a look at this[^] thread. The second answer from the thread contains an attached archive. The code from the archive does exactly what you need.
|
|
|
|
|
|
From PEPE2207:
Hi, Somebody could help me writting a mfc piece of code that throw me the following kind of error:
"C:\PROVIS\Mypro\MyproDlg.cpp(1107) : error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int (void *)"
void CMyproDlg::OnStartone() // method controlled by a button
{
// TODO: Add your control notification handler code here
th* str1 = new th; // th is a struct with only one member: struct th { int mya; };
str1->mya = 155;
LPVOID pParam;
pParam=&str1->mya;
AfxBeginThread(MyThreadProc, pParam);
return;
}
UINT CMyproDlg::MyThreadProc(LPVOID pParam) // My controlling function thread
{
static int nXthr=0;
th* pmyintegerintothread = (th*)pParam;
nXthr += pmyintegerintothread->mya;
m_CurrentDate.Format("%d", nXthr); // m_CurrentDate is a edit box variable defined
UpdateData(FALSE);
return 0; //threat completed successfully
}
Thanks in advance.
|
|
|
|
|
Try:
j.v.r. wrote: AfxBeginThread( & MyThreadProc, pParam);
|
|
|
|
|
It's because you're passing a (non-static judging by the m_ variable in it) member to AfxBeginThread.
I'm hoping there's a bit more to your code as what you've written and appear to want to do is spin off a thread to assynchronously update an edit control with something provided from another thread. While we're on the subject are you sure the casts you've written are really going to do what you want them to? You're passing a pointer to an integer into the thread function and then casting it back to a structure, not an int.
As a quick hint - do all your UI programming on one thread. By all means spin off other threads to do work BUT don't try and update the UI state from these other threads. Most programmers (including/especially me) aren't clever enough to pull that one off properly. Over 50% of the bugs I've had to sort out since 1995 have been related to threading.
Cheers,
Ash
|
|
|
|
|
0) The thread function should be declared as static in the dialog class
1) You could cast the first parameter by (AFX_THREADPROC)
2) You should delete the passed pointer (pParam=str1 and not pParam=&str1->mya)
at the end of its usage in the thread function
virtual void BeHappy() = 0;
|
|
|
|
|
j.v.r. wrote: error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int (void *)"
Read the "Creating the Secondary Thread" section of this article.
"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
|
|
|
|
|
How much memory can be consumed for a process that is running in
a) 32 bit environment
b) 64 bit environment
Is it 2G( less than ) per process? If so, is there any reason for such a limitation?
Suppose process is running with 2GB RAM. And if I am upgrading the RAM to 4GB, will there be any change in max memory?
|
|
|
|
|
|
Google India directs all progamming questions here.
Once you agree to clans, tribes, governments...you've opted for socialism. The rest is just details.
|
|
|
|
|
Tim Craig wrote: Google India directs all progamming questions here
HeHeHe
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Ah, but the C# people didn't answer quickly enough, so he came to the clever people. He just didn't want to disturb us at first...
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Sorry to say but you got it all wrong. C# forum is where the good answers where given, and they appeared there sooner than here.
|
|
|
|
|
Well, that's called efficiency. You C# wallahs needed a 3 minutes head start.
Our answers used lazy instanstiation - so were not needed.
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
|
In a tree control I' like to replace the collapse/expand icons. Is this even possible?
|
|
|
|
|
You can change the icons alongside the + ans - signs with the TreeView_SetImageList[^] command.
It's time for a new signature.
|
|
|
|
|
|
I'm not sure on this as I have only used the TVSIL_NORMAL image list. I would suggest you give it a try and see what happens.
It's time for a new signature.
|
|
|
|
|
|
hello guys...I know what is bool but what is the difference between BOOL and bool. Some other examples are TRUE and true, FALSE and false, LONG and long. Why do we need such key words in capitals.
|
|
|
|