|
@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
|
|
|
|
|
li zhiyuan wrote: 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;
You are using k to iterate, but there is no k in the [] .
Maxwell Chen
|
|
|
|
|
Hi, I'm currently learning MFC, and I have a question about serialization.
If I have an application, and I use it to serialize a file, can I use a second application to open the same file (of course, both applications having the same attributes in their documents)? Every time I try to call the Serialize method of a CTypedPtrList with the corresponding CArchive I get an "Unexpected File Format" error. Both applications are using the same DLLs, which contain the polymorphic classes being used in the list. I am using Visual Studio 2008.
Thanks.
|
|
|
|
|
Perrin01 wrote: If I have an application, and I use it to serialize a file, can I use a second application to open the same file (of course, both applications having the same attributes in their documents)?
AFAIK, yes
[added]
I made a little test: it confims you can do it.
[/added]
Perrin01 wrote: Every time I try to call the Serialize method of a CTypedPtrList with the corresponding CArchive I get an "Unexpected File Format" error. Both applications are using the same DLLs, which contain the polymorphic classes being used in the list. I am using Visual Studio 2008.
I think you have to proceed with little steps, for instance.
(1) Make sure that both applications use the same version number inside IMPLEMENT_SERIAL macro.
(2) Make sure the application that created file is able itself to load it.
(3) Try to store and load very simple files first.
(4) ...
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.
[my articles]
modified on Wednesday, January 30, 2008 4:24:19 AM
|
|
|
|