|
I have never tried with sending messages, which may be the problem. However, I used the member variables of the second dialog directly:
Here, m_Second is the second dialog.
CMainDlg* p = (CMainDlg*)dwUser;<br />
p->m_Second.m_List2.InsertItem(0,"Some text");<br />
p->m_Second.m_List2.RedrawWindow();
Still I am confused. I do suspect the PostMessage() etc to be the problem. Maybe.
this is this.
|
|
|
|
|
Well, it seems there is no solution to this problem. At least I can get my communication tread working in background. But not the interface!!
Thank you all!
and
Have a good time!
KEMI
|
|
|
|
|
Hi,
The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions post this message only when no other higher-priority messages are in the thread's message queue.
I think high priority messages are generated when the user press and hold mouse buttons on control box or title bar(as in your case).
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions post this message only when no other higher-priority messages are in the thread's message queue.
I read this from MSDN already.;)
Have a good time!
KEMI
|
|
|
|
|
VisuallC wrote: do you create timer in the monitor dialog and (if necessary post event timer dialog monitor to main dialog)
No! I created timer in the main dialog and post message to monitor dialog.
Have a good time!
KEMI
|
|
|
|
|
I am facing a problem i.e
"LNK4017: DESCRIPTION statement not supported for the target platform; ignored"
what is the cause of this warning and how best can we overcome this problem.
Can anyone suggest pls.
Thanks,
---Arun.
|
|
|
|
|
|
I want my program to know the network connection is alive or not, but I dont want to check this periodically.Is there any way to inform my program when the network goes down. ie when the network connection goes down it is informed to my code.
|
|
|
|
|
I call CreateProcess() to Start another exe,but it fail,
I use GetLastError() ,the ErrorCode is 299;
my code is:
CString strUninstallProc = "c:\\1.exe";
char buffer[20];
CString strCommandLine = " /n ";
strCommandLine += " /p 873w ";
strCommandLine += strPartCmdLine;
PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;
ZeroMemory(&piProcInfo, sizeof(PROCESS_INFORMATION));
ZeroMemory(&siStartInfo, sizeof(STARTUPINFO) );
siStartInfo.cb = sizeof(STARTUPINFO);
BOOL bCreation = CreateProcess(strUninstallProc,
strCommandLine.GetBuffer(strCommandLine.GetLength()),
NULL,
NULL,
TRUE,
0,
NULL,
NULL,
&siStartInfo,
&piProcInfo);
strCommandLine.ReleaseBuffer();
if (bCreation)
{}
else
{}
thanks
|
|
|
|
|
My problem is that I want to export a MFC class inside a DLL. Normally, We only export a function of a DLL. Now, I want to export a class, but I don't know. Would you tell me this technique or point me to the specific websites.
|
|
|
|
|
class __declspec(dllexport) CYourMFC_Class:public CMFCObject
{
public:
};
You have to change the above to the following in your header file where you are using it... i.e the place where you are using the dll .
class __declspec(dllimport) CYourMFC_Class:public CMFCObject
{
public:
};
Owner drawn
Jesus Loves
|
|
|
|
|
Hi,
I'm having an odd problem with a separate window I'm popping up in my application using a richedit;
When the richedit control is fully scrolled to the bottom, and the window is minimized, and text is added to the richedit, when the window is maximized, it will be blank. It appears that it has arbitrarily scrolled down an extra 'page' so put all the text out of view. However, once the scrollbar is clicked on, everything immediately displays properly. I've searched around for what might cause the problem but can't find the culprit, so I was thinking I could simply simulate sending a 'clicked on scrollbar' message to the window as soon as focus was set to it.
However I haven't been able to find the windows message that is sent when a scrollbar is clicked on (not necessarily moved, just clicked on).
Which message is this?
Or any other thoughts as to how to fix the problem?
Thanks!!
Kelly Ryan
|
|
|
|
|
Found a way to fix it, nevermind.
Kelly Ryan
|
|
|
|
|
How?
Owner drawn
Jesus Loves
|
|
|
|
|
Does a static data member come into existence in memory before, at the same time as, or after any instances of its class?
|
|
|
|
|
It would exist independently of the class, I'd imagine that as it has to exist prior to the first time it is accessed, it's probably created when your program starts.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello,
I'm writing an applicaion and I'd like to display nice pictures instead of usual text tabs. Is there a way to do that simply ?
Thanks,
Allad
----
Navigator - Your best alternative to Windows Explorer
|
|
|
|
|
You have to owner draw the tabs.
Owner drawn
Jesus Loves
|
|
|
|
|
Thanks replying.
But I don't know how to owner draw property sheet tabs.
I'm using CPropertySheet MFC Class. Can you help me?
Cheers,
Allad
----
Navigator - Your best alternative to Windows Explorer
|
|
|
|
|
Hi all:
When I am writing programs, I always have the problem that the compiler complains that a variable is already defined in some files. I need some global variables to be used in several files, is there any good way to avoid this kind of problems please???
Thanks in advance!!!
Asura
|
|
|
|
|
A classic problem. Follow this patten.
Declare the global in a .H file.
extern int g_MyGlobal;
And define it in a .C or .CPP file:
int g_MyGlobal;
Now include the .H file anywhere you need to access the global.
Steve
|
|
|
|
|
Hi all:
I am going to build a particle system which the system contains a set of particles where every particle is a struct contains some other arrays. The code is like following:
typedef struct{
float m; /* mass */
float c; /* charge */
float *x; /* position vector */
float *v; /* velocity vector */
float *f; /* force accumulator */
std::set<int> neigh; /* neighbour index array */
} *Particle;
typedef struct{
Particle *p; /* array of pointers to particles */
int n; /* number of particles */
float t; /* simulation clock */
} *ParticleSystem;
When I use this, do I need to allocate memory for every float array in every particle??? Or should I just add new elements to the arrays without explicitly declare the array sizes???
Thanks in advance!!!
Asura
|
|
|
|
|
So the x , y and f members are vectors (in the mathematical sense)? If that is the case I'd use something like this:
struct Vector
{
double x;
double j;
double z;
};
struct Particle
{
double m;
double c;
Vector x;
Vector v;
Vector f;
std::set neigh;
};
typedef Particle *PParticle;
I have made some changes:
- I hate K&R style brace placement.
- As a rule of thumb use double.
Steve
|
|
|
|
|
yeah, it's vector I wanted, it's really a good solution, thanks alot.
Asura
|
|
|
|
|
This code:
CString foostr ("This is a string.");
cout << foostr << endl;
produces this output:
0035C3B8
What's going on?
|
|
|
|