|
actually in the include folder there is one time.h but when we copy it to the sys folder of include it gives an error as:-
tv_sec and tv_usec should be of struct or unoin type...
and the sys folder has timeb.h and timeu.h
on renaming dem it gives the same error...
PLEASE also read the reply of mine above i gave the complete response of set command that u suggestd to perform.
|
|
|
|
|
create a regular dll(static link) in MFC. Add a dialog and export this dialog rom dll in below dll function function
__declspec(dllexport) void ExportDialog()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
dialogclass obj;
obj.DoModal();
}
When i call this dll function in a MFC exe(dialog base application) it displays the dialog.
But if i insert an activex control on dialog say calender,web browser etc and call dll function ExportDialog() in mfc exe then dialog box does not display.
I have used AfxEnableControlContainer in initinstance of application class in regular dll but still dialog is not display
what should i do to display dialog
My mfc exe is statically link. if i build extension dll and call its function which export dialog box then program is crash
please suggest
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|