|
Hello Prakash,
It works the window pops up and stays. But it does not receive any key events. what could be the problem?
Regards
|
|
|
|
|
Can you dump the code in the thread funtion here?
Probably the keyboard events are not translated.
-Prakash
|
|
|
|
|
Hello Prakash,
Here is the code snippet.
m_chatWindow = new CChatWindow(this);
m_chatWindow->Create(IDD_DIALOG1,GetDesktopWindow());
m_chatWindow->ShowWindow(SW_SHOW);
MSG msg;
HACCEL haccel;
LoadAccelerators(AfxGetInstanceHandle(),AfxGetAppName());
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(m_hWnd, haccel, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
Regards
|
|
|
|
|
Hello Prakash,
Here is the code snippet.
m_chatWindow = new CChatWindow(this);
m_chatWindow->Create(IDD_DIALOG1,GetDesktopWindow());
m_chatWindow->ShowWindow(SW_SHOW);
MSG msg;
HACCEL haccel;
haccel =
LoadAccelerators(AfxGetInstanceHandle(),AfxGetAppName());
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(m_hWnd, haccel, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
Regards
|
|
|
|
|
vyjesh wrote: if (!TranslateAccelerator(m_hWnd, haccel, &msg))
The problem is with the m_hWnd, i guess i overlooked that.
replace m_hWnd with m_chatWindow->m_hWnd
and let me know if it worked.
-Prakash
|
|
|
|
|
Hello prakash,
It did not work. But I got the problem solved by this way
m_chatWindow = new CChatWindow(this); m_chatWindow->Create(IDD_DIALOG1,GetDesktopWindow());
m_chatWindow->ShowWindow(SW_SHOW);
m_chatWindow->RunModalLoop(); //this solved problem.
Regards
|
|
|
|
|
oh cool, I am kinda more conversant with win32. Good that you solved it.
RunModalLoop() kinda does what we were doing before but maybe in a correct way.
-Prakash
|
|
|
|
|
Hello,
I've just installed Visual Studio 2005 and eagerly I converted the C++ project I'm working on, from Studio 2003 project format to Studio 2005 one.
But I can't get the project to compile. Visual Studio 2005 compiler has been made more ISO compliant so it no longer accepts implicit int declaration.
Thus, I need to convert my project back to Studio 2003 format. But I don't know how.
Can someone help?
Thanks
|
|
|
|
|
Your 2003 sln file should still be in your directory. I think all you need to do is load that instead of the converted 2005 sln file (and delete it altogether if you don't want to eventually upgrade) and you should be go to go.
|
|
|
|
|
In the updrade log generated by VC 2005 it is said there is a backup sln file in the project directory.
It is called myproject.sln.old but I can't find it even in the hidden files.
Do you have any idea?
|
|
|
|
|
|
Thanks for your reply.
I wish I had read that article before upgrading.
Now I just cant compile my project.
|
|
|
|
|
Allad wrote: Visual Studio 2005 compiler has been made more ISO compliant so it no longer accepts implicit int declaration.
So why don't you go ahead and fix it? Why leave bad code in your source?
|
|
|
|
|
Nishant Sivakumar wrote: So why don't you go ahead and fix it? Why leave bad code in your source?
In my project I'm using a library with thousands of code lines. And the real problem is that library. I don't dare mess with such a huge amount of code I've not written myself.
Anyway thanks for replying.
|
|
|
|
|
Hello,
Did you make a backup? VS 2005 asks this before it converts the file.
Anyway, as Nishant already said it: fix the errors and use the better compiler. The standard conformance is far better than any previous compiler written by Microsoft.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote: Did you make a backup? VS 2005 asks this before it converts the file.
In the updrade log generated by VC 2005 it is said there is a backup sln file in the project directory.
It is called myproject.sln.old but I can't find it even in the hidden files.
Do you have any idea?
|
|
|
|
|
Hello,
Did you save the converted solution to another directory? Otherwise I don't know where the file might be.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hi, i am using WM_QUERYENDSESSION to check that system is shutting down. But i am unable to differentiate whether system is shutting down or restarting. Is there any way to find this out.
Thanks.
|
|
|
|
|
i am pretty sure that there is no clean way to do it, and i remember a discussion where some of MS guys agreed with that.
now, ExitWindowsEx API takes a flag which specified the type of shutdown, so maybe you could dissasemble the function and see what it really does.
|
|
|
|
|
Probably there is no way to find out the difference
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hi everybody!
I need to write a program that will differentiate expressions. The input to this program will be a series, each representing an infix expression to be differentiated.
First the program will have to scan the infix expression, building up an appropriate binary tree representation of it. Once the binary expression tree is built, traverse it, building up an other binary expression tree, which represents the derivative of the original expression.
Finally, once the binary expression tree for the derivative has been built, print the expression...
|
|
|
|
|
homework, huh?
first, you will need to parse the expressions. you can find some implementations here:
http://www.codeproject.com/cpp/rwformulaparser.asp
http://www.codeproject.com/cpp/FastMathParser.asp
http://www.codeproject.com/cpp/MathieuMathParser.asp
second part should be easier, but you can find a Java implementation here:
http://cs.jsu.edu/mcis/faculty/leathrum/Mathlets/src/ (look for 'Derivative Calculator' near the bottom of the page)
also, have a look here:
http://fermitools.fnal.gov/abstracts/mxyzptlk/abstract.html
|
|
|
|
|
Hi ,
I have a VB active X control which has a few buttons on it. I have added the Tab order for these buttons.
I am using this ActiveX on a VC++ dialog. It is a simple dialog application.
and the Active X control is the only control on the VC++ dialog.
When I launch the application the focus does not go to the First button on the VB ActiveX.
I have found that the User control(Active X) gets the focus and not the First control on the User Control.
Can anyone help me out with this(Do I need to set any property??)
Thanks,
Gayathri
|
|
|
|
|
eg.
IXRect *pRect
IXRect *p;
mDoc->get_Rect(&p);
pRect = p;
pls see above the code. whenever i change the member value of p, mDoc.Rect values are changed. also how to avoid it.
i want to copy values only from mDoc.Rect Object to p . how to do
shadrach
|
|
|
|
|
It all depends how mDoc->get_Rect is implemented, it seems like it is returning the address of existing "rect" hence both the objects are pointing to the same content and hence you are having the problem.
-Prakash
|
|
|
|