|
Hi,
Im having a web application.It has a edit control.Using a service, i will continuously watch a file for some content, then i will post that content into the edit control. How can i get the handle of edit control in the web application? Is it possible?
Thanks,
|
|
|
|
|
Controls in a webpage do not have window handle.
A webpage can have java script functions to update the controls in it. See javaScript calls from C++.
http://www.codeguru.com/cpp/i-n/ieprogram/article.php/c4399
Also, if you want to write some files to system from the webpage, you need to host an activex control with required functionality in webpage.
|
|
|
|
|
sorry not in a web page... in oracle forms...
|
|
|
|
|
examine your oracle forms with Spy++ that comes with 'Visual Studio Tools' to check whether they have any window handle or not ![Frown | :(](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_frown.gif)
|
|
|
|
|
yes.it is showing window handle. If i open the form in another machine,Will the window handle get change?
|
|
|
|
|
Karthika85 wrote: If i open the form in another machine,Will the window handle get change?
it will get changed. Handles are kernal tokens, and its OS who assigns handles in response to our API calls .
Use Spy++ to find out the ClassName/Caption of the window. You may try with FindWindow Function to get top level parent window handle, then FindWindowEx Function to get its child windows.
|
|
|
|
|
|
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. ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
|
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!
|
|
|
|
|