|
help plzzzzzzzzzzzzz
modified on Friday, February 8, 2008 6:19 AM
|
|
|
|
|
Hi,
I am creating a dialog based application in MFC, and I am having a weird problem with one of the CWnd derived objects on my dialog.
Basically when starting the application, if it starts up such that the mouse pointer is over one particular dialog (which I created...) the hourglass doesn't go away until I move the mouse off that part of the dialog. As soon as I move it off the dialog it goes away. If it starts up such that the mouse over another part of the dialog it goes away just fine.
However, it's kind of annoying (and unprofessional) because that part of the dialog that causes the mouse the hourglass to hang is quite large.
Strange! Is there any way to programatically tell the hour glass to go away?
Thanks - @LRG
|
|
|
|
|
Ok,
Let me answer my own question - I just found that if I put EndWaitCursor() in the OnInitDialog memeber after creating the problem CWnd it works.
Wondering, is this a bit of a kluge?
Thanks - @LRG
|
|
|
|
|
@largeinsd wrote: Wondering, is this a bit of a kluge?
Sounds like it.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
@largeinsd wrote: ...the mouse pointer is over one particular dialog (which I created...)
How many dialogs are we talking about here? The first sentence in this post implies one dialog with several controls on it. Is there more to it than that?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: How many dialogs are we talking about here? The first sentence in this post implies one dialog with several controls on it. Is there more to it than that?
Yes, you're right - one dialog with several controls. One particular control is causing the problem.
@LRG
|
|
|
|
|
@largeinsd wrote: One particular control is causing the problem.
And what type of control would that be?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Wow you ask the tough questions... It's a custom (CWnd derived) class I found on this web site for doing OpenGL in an MFC Window. It's called a COpenGLControl.
Not trying to get folks to debug some random code I found on the interwebs, so that's why I was speaking in generalities.
Thanks - @LRG
|
|
|
|
|
Do you have an entry in your dialog's DoDataExchange() method for the COpenGLControl control? If so, can you temporarily comment it out and note the result.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Uh, hrrmmm, no I don't have an entry in DDX for that. I guess I thought I didn't need one, because it's a graphics control (running an openGL instance) not a regular control exchanging values from input. The only input it takes is mouse clicks to orient the view.
I guess I'll put one in (for DDX_CUSTOM(), eh?) and see what happens.
Thanks - @LRG
|
|
|
|
|
I have made Win32 project under Visual studio 2005. In this project I also included another project whose library needs to be used by my project. But the problem is that included project is written in core C and i am obviously having class based structure. So it is not allowing me to use library function of included project in my project. So how could i integrate these two projects? What configuration changes should i make under 2005?
Any help is much appreciated.
Thanks & Ragards,
Hemang
|
|
|
|
|
C++ projects can invoke C export functions, whereas C projects can not use C++ export functions and classes.
Maxwell Chen
|
|
|
|
|
Thanks for replying. I know this fact. But my problem is of some different sort. Let me more precise on the matter.
I am X.264 library for my project. This library has been generated using Msys and MinGW. I have included libx264.a in Additinal Dependencies tab. If i compile the included X.264 using C compile code in Linker/C-C++/Advanced/Compile As in project property page, then it is being compiled successfully, But if i compile as C++ then it gives me error. So what should i do? may i need to do any configuration changes for that under VS 2005?
Thanks & Regards,
Hemang
|
|
|
|
|
What are the error messages?
Maxwell Chen
|
|
|
|
|
error LNK2019: unresolved external symbol "struct x264_t * __cdecl x264_encoder_open(struct x264_param_t *)
|
|
|
|
|
Hemang Raval wrote: error LNK2019: unresolved external symbol "struct x264_t * __cdecl x264_encoder_open(struct x264_param_t *)
Because I don't have your source to view the whole relationship, I could only guess.
Check the includes and / or prototypes for:
extern "C" {
#include "some_header"
};
extern "C" {
x264_t* x264_encoder_open(x264_param_t*);
}
Maxwell Chen
|
|
|
|
|
Ok thats same as my problem.
Now i am posting my code
I am having two projects in one solution: one is Test1 and another one is Test2
Test1 having two files Test1.h and Test1.c
Test1.h
void testFunc();
Test1.c
<br />
#include "Test1.h"<br />
void testFunc()<br />
{<br />
printf("In Function testFunc()");<br />
}<br />
Now Test2 Having Two Files Test2.h and Test2.cpp
Test2.h
<br />
class Test2<br />
{<br />
Test2();<br />
}<br />
Test2.cpp
<br />
#include "Test2.h"<br />
#include "Test1.h"<br />
<br />
Test2::Test2()<br />
{<br />
testFunc();<br />
}<br />
Now i am compiling Test1 by c Compiler and Test2 by c++ compiler in "VS2005"
so it is giving me linking error as below:
error LNK2019: unresolved external symbol _testFunc referenced in function "public: __thiscall Test2::Test2(void)" (??0Test2@@QAE@XZ)
So do you have any idea regarding this??
Please Give me any idea, i am stuck on it.
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
I just created two project:
1. C:\Tmp\Test1, in C,
2. C:\Tmp\Test2, in C++.
Test2 uses Test1 functions.
Steps:
1. Compile Test1 without worrying about Test2 at all.
2. Write this way in "Test2.cpp" :
#include "test2.h"
extern "C" {
#include "../test1/test1.h"
}
3. Remember to add (to import, not file copy) "C:\Tmp\Test1\test1.c" and "C:\Tmp\Test1\test1.h" into your "test2" project.
And everything compiles happily!
Maxwell Chen
|
|
|
|
|
Thanks
Its working fine.!!!!
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
Maxwell Chen
|
|
|
|
|
Hello everyone,
On Windows Server 2003, task manager there is a term called PF (Page File) and it has a related curve. Task manager also has another term called commit charge.
1. I think PF is the same as commit charge. Previously, I think Page File only includes the paged-out pages which physical memory can not contain, and the pages are not in memory are counted as PF. Now I think I am wrong and PF includes all committed pages, including the ones in memory and the ones on disk;
2. Even if the pages are marked as COMMIT, it is not always counted as a part of PF in some situations before it is actually used (request for zero and copy-on-write scenarios);
Are my understandings of (1) and (2) correct?
thanks in advance,
George
|
|
|
|
|
Hello everyone,
It is correct to assume that all exceptions from STL are either std::exception itself or derived class from std::exception?
thanks in advance,
George
|
|
|
|
|
|
Thanks Stephen,
My question is answered.
regards,
George
|
|
|
|
|
dear all
how to solve this problem: i initialize xx[10][3][4] = (double)rand()/RAND_MAX; in main function,
and define this function, when i call this function, why it has problem?
void Centroids::createPosition(double x[10][3][4])
{
cout <<endl<<The following is positions of 10 particles ! "<<endl<<endl;
for (int i = 0; i < 10; i++)
{
cout <<endl<<" "<<"Position of particle :"<<endl;
for (int j = 0; j< 3; j++)
{
for (int k = 0; k < 4; k++)
cout<< " "<<x[i][j][0]<<" "<<x[i][j][1]<<" "<<x[i][j][2]<<" "<<x[i][j][3]<<endl;
}
}
}
coulndn't display correctly..thanks
Li Zhiyuan
5/10/2006
|
|
|
|