|
hemlat wrote: Can you suggest any link which will show how to create worker thread
Did you even bother to read the article that Rajesh provided? If you had, you would have noticied a link to this.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
hemlat wrote: UINT CTestcycleDlg::pfnThreadProc(LPVOID pParam )
i think you forget to make function static
"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
|
|
|
|
|
Hello,
I am dealing with a problem and I would need your help.
I have two top most windows, and i want to always have one of the windows in front of the other. The solution that makes one of the windows a child of the other cannot be applied in my case.
Thank you for your help.
|
|
|
|
|
You could use the topmost style (See SetWindowPos) for the Upper window, but it's not a very scalable solution (2 works, 3 would not)
I'd have another look to see why making one a child of the other would not work first before you kludge it.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Thank you Iain for your answer. The solution with one child of the other works perfectly, but the reason why i was searching for another solution was that the number of windows involved isn't in fact 2, it could be bigger, so i will need to change dinamically the parent of my "upper" window. You said to use the topmost style, both of the windows are made TopMost using the SetWindowPos method. You mean maybe the WS_TOPMOST style.
|
|
|
|
|
I meant ::SetWindowPos (hWnd, HWND_TOPMOST, ...), but was being sloppy about it.
If it's N, then you'll have to get over your aversion to windows being children of other windows...
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
OK, thank you, i guess i will have to try to solve it this way
|
|
|
|
|
Hi,
I have some powerpoint addins which are to be added to powerpoint programmatically.The problem in the below code is it always says power application object cannot be created while running the program. but powerpoint application object will create during debugging the program.
hence I am not able to figure out the problem. Could any one help me please?
void InstallPptAddins(LPCTSTR strAddinPath)
{
CFileFind m_fileFind;
CString strAddin;
PowerPoint::_Application Ppt;
PowerPoint::AddIns m_pptAddIns;
PowerPoint::AddIn m_pptAddIn;
if(!Ppt.CreateDispatch("PowerPoint.Application"))
{
Log("Error:fn::InstallPptAddins() Couldn't open Powerpoint Application\n");
return;
}
try
{
if(Ppt.GetVersion()=="12.0")
{
PowerPoint::Presentations m_Sets(Ppt.GetPresentations());
PowerPoint::_Presentation m_Set(m_Sets.Add(TRUE));
strAddin = strAddinPath;
strAddin += "DSAFO5PP.ppa";
if(m_fileFind.FindFile(strAddin))
{
m_pptAddIns = Ppt.GetAddIns();
m_pptAddIn = m_pptAddIns.Add(strAddin);
m_pptAddIn.SetLoaded(FALSE);
m_pptAddIn.SetAutoLoad(FALSE);
m_pptAddIn.SetRegistered(FALSE);
m_pptAddIn.SetLoaded(TRUE);
m_pptAddIn.SetAutoLoad(TRUE);
m_pptAddIn.SetRegistered(TRUE);
Log("AFO Powerpoint add-in is added.\n");
}
else
Log("Couldn't find Powerpoint add-in %s\n",strAddin);
}
catch(...)
{
Log("Error::Couldn't install Powerpoint add-ins.Please add it manually\n\n");
}
Ppt.Quit();
}
|
|
|
|
|
missing closing curly braces for
if(Ppt.GetVersion()=="12.0")
{
|
|
|
|
|
may be missed out during caopying the code.It is proper on my machine.But that is not the reason.It is compiling with no error.
|
|
|
|
|
I have a MFC application in which I need to create a temporary editbox on the view. But that editbox does not accept ctrl+C & ctrl+V commands from keyboard. It should support copy & paste by default. I create it with WS_CHILD | WS_VISIBLE styles.
I have entered the Copy paste shortcuts into accelerator table for use in the view.
Does anyone know the reason why it does not paste in editbox? Instead it pastes in the view.
How to correct it?
TIA.
|
|
|
|
|
This is an excellent article explaining all the nuts and bolts of MFC's command routing.
http://www.microsoft.com/msj/0795/dilascia/dilascia.aspx[^]
There will be an exam to make sure you've read it before you're allowed to have any more biscuits. Ever.
Once you've read it, the following will make sense:
I think you need to add an OnCmdMsg handler to your View class, to give the temporary edit box a quick bite at the cherry. Alternatively, use the CMyView::OnEditCopy handler to send a WM_COPY message to your edit box, if it exists. (and same for paste, cut...)
Good luck,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Hi All,
Can anybody help me to get External USB Hard Disk Drive Temperature.
Thank You
|
|
|
|
|
Do you have a temperature probe?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
As far as I know you can only get the drive temperature via SMART and this won't work over the USB interface.
|
|
|
|
|
Dear Maichael,
Thanks for your reply.Its possible because it is implemented in hdsentinel software.You can find it in www.hdsentinel.com .
Thank you
|
|
|
|
|
Hi all,
Is it just me or the "Add member variable wizard" takes FOREVER to add a control variable (something like 5 to 8 seconds to add one variable)? I wonder what is the 'magic' that it is doing while freezing the entire VS IDE for so long. If I add this same control variable by typing with my hands, I'll probably take the same time (or less may be). I'm really pissed with this "wizard" and would like to know if at all there's a solution to it.
When I go about Googling, I realize that this issue exists for quite sometime (since VS 2002 .NET days ) and a hotfix is available for VS 2002. But I'm using VS 2008 with MFC.
Thanks for any help!
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Please repost your query to Visual Studio Forum[^]. It is more likely to get an answer over there.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
As a matter of fact, I'm talking about something that occurs only while using MFC, and I'm sure the regulars here should have faced the problem too. Therefore, my post.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: As a matter of fact, I'm talking about something that occurs only while using MFC...
But it has nothing to do with coding.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I agree, but last time (a year ago?) I posted something on the VS forum, there were absolutely no replies. I was hoping that here, in the C++ forum, the regulars will have a solution for me or at least they would share their experience with me.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I may be a control freak, but I can't remember the last time I used class wizard. Once I realised it was rubbish at anything non trivial, I stoppused using it even for trivial members.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Given what the wizard is expected to do, it must do it in no time. I wonder what the hell does it do taking so long. Perhaps I must stop using it as well.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
The wizard is slowing thinking what is the best way for polluting your neat code, like, for instance writing for each and every function added a crappy-C# -style access specifier.
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 think you don't feed your IDE properly. Do feed it with regular bugs. It'll become healthy and do things faster.
Hope this helps.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|