|
You need to obtain the pointer to the dialog class to access public member variables.
You can declare some functions like this:
<code>
static CMyDialog* s_MyDialogPointer = NULL
CMyDialog* GetMYDialogPointer()
{
return s_MyDialogPointer;
}</code>
Within the dialog's constructor, set the
<code>s_MyDialogPointer = this;</code>
In the second thread, call GetMYDialogPointer() to obtain pointer to the dialog class instance to change member data.
|
|
|
|
|
Frens. . .
I have two doubts.
1)How to give tooltips for Combo boxes.
2)How to enable multiple selection by pressing Ctrl Key in Flex grid .
Thanx
|
|
|
|
|
Hi
I have developed one simple DLL in VC++ as Project->New->Win32 Dynamic Link Library->An empty DLL project......
Now there is some Memory Leak in my DLL. But I don't know how to trace it and which functions or line is making memory leak.
Is there any freely availabe software or programm which I can use to check memory leak of my DLL ? All the programm to find Memory Leak I found is for EXE only....HOw to do it for DLL ?
Or
Any system functions which can tell something about memory leak...?
Pls help me out
It's hurry....
Regards
Mahesh
|
|
|
|
|
You can download Rational Purify evaluation copy from IBM.
Good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Can i have a combobox which is populated by country names.
Learner always
|
|
|
|
|
Yes.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
( i know I should'nt laugh !!! but the answer was a bit unexpected !!! )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote:
but the answer was a bit unexpected
I suppose you were expecting me to provide an example of populating a combobox with the names of the 193 countries. I like typing but not that much!
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I was asking is there any active x or any utility which can populate combo automatically.If only to type is solution than I can type my own .
Thx
Learner always
|
|
|
|
|
Here is a list:
http://www.countrywatch.com/@school/number_countries.htm
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello,
I have 2 modless dialogs and I need to send a BOOL value from dialog1 to dialog2 how can I do that?
And please show me as you are present this to a child ! )
|
|
|
|
|
Is the value passed when dialog2 is created ?
Are the 2 dialogs modeless or modal ?
Does the child knows how to pass a pointer of dialog1 to dialog2 ?
Or Does the child knows how to create dialogs and pass the BOOL from dialog1 to dialog2 when dialog2 is created ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Dialog2 is created and thats it.
|
|
|
|
|
Derive both dialogs from a base class that owns the BOOL .
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
This would be a static BOOL
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
and how do I set up that?
|
|
|
|
|
buddy,
simply SendMessage to that Dialog.
as you have Handle of Both Modeless dialog boxes
do it as this way.
::SendMessage(Handle of Dialog box to send,WM_USER+786,0,1);
and cast the Lparam value to bool to get result
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
|
Listen,
now if you have to create Two ModelLess dialog,you have two object of dialog
like this way
Dialog1 obj1;
Dialog2 obj2;
now Introduce a m_RemoteClass of type HWND; in both of class.
now if you create a Modeless dlg(as you have to create them before showing them),the dialog data member filed with there own HAndles.
like Obj1.m_hWnd & obj2.m_hWnd (these are public member of dialog Class and it is inherited by each of it inherited class.)
now pass the value of hWnd to each other like
//after craeting
Obj1.m_RemoteClass=obj2.m_hWnd;
Obj2.m_RemoteClass=obj1.m_hWnd;
now declare ON_MESSAGE HANDLER in your class
and handle the user defined message say WM_USER+78 ok
then Message_MAp of each dialog class
enter you function
ON_MESSAGE(WM_USER+78,OnMessage)
and create a function like this
void DialogClass::OnMessage(WPARAM wParam,LPARAM lParam)
{
//Your boolean variable that you need
this->m_bBool=(BOOL)lParam;
}
/// Now how to send message from one dialog to other
if it on button click and if you sending data from
Obj1 to Obj2
void Dialog1::ONClick()
{
//If you sending TRUE
::PostMessage(this->m_RemoteClass,WM_USER+78,0,1);
//if you sending FAlsE
::PostMessage(this->m_RemoteClass,WM_USER+78,0,0);
//as you already know 0 stand for FALSE and any //postive value TRUE
}
i know i am very bad at english,if problem still persisit you can mail me you code and i will rectify that my email is alok#efextra.com
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hello,
did you see my e-main? I have send you a e-mail about the problem.
|
|
|
|
|
Hi~
How to convert the lparam into string in C++ windows message loop function(LResult CallBack WndProc (Hwnd, Msg, wParam, lParam)) if I send the message to this window which the lparam is a string?
Thanks
|
|
|
|
|
Pass pointer to string as LPARAM, and then cast lParam back to string in message loop function!
ARSALAN MALIK
|
|
|
|
|
Look Buddy Like this way.
char str[]="alok gupta"
::sendMessage(MSWINDOW,WM_USER_123,0,(LPARAM)&str);
i think i am sending message to M$
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
One solution is dynamic allocation.
Kuphryn
|
|
|
|
|
hello,
I would like to use try and catch (or __try and __except) to manage an exception which is "Unhandled Win32 Exception". Who can tell me how to proceed in an MFC environnement ?
thanks a lot for your help and a nice day to everybody !
There is no way to happiness, happiness is the way !
|
|
|
|