|
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 !
|
|
|
|
|
You can use try-catch blocks in MFC to catch unhandled exceptions. Remember, all MFC exceptions are inherited from base class CException
ARSALAN MALIK
|
|
|
|
|
Hi thank you for your answer !
The problem is that I want to manage a Win32 Exception and not a MFC exception ...
Do you know how to do that ?
Thanks a lot for your help and have a nice day !
There is no way to happiness, happiness is the way !
|
|
|
|
|
Hi everyone!!
I want to read a table of a .xls (Excel2003) file from my Vc++6 application, how can I do it? It´s not necessary to open Excel, just read the file. If you know solutions for my problem, please tell me.
Thanks a lot!!!
Today could be a great day!
|
|
|
|
|
if you know the layout of your table you can use FILE/fscanf, fopen etc....
if it's all a bit complicated you're off for some more difficult stuff like automation.
You can probably use CFile (and functions) instead of FILE/fscanf etc.
Search MSDN for more info.
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
|
|
|
|
|
thanks for your answer
what I didn´t know is that I can read a .xls file as a .txt (e.g) with CFile functions. Is data processed in the same way?... Would it be better if I export the table as a XML file?
Now I´m trying to do it using automation, and collecting information from MSDN.
thanks
|
|
|
|
|
aliole wrote:
Now I´m trying to do it using automation, and collecting information from MSDN.
Then you've no doubt seen MSDN article Q178749.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Check the database section on CP, it has some usefull classes or code snippets that does read from EXCEL.
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
hallo
i want make an special combobox control (like windows make when
we open a file with editbox )
in fact i have trying with a normal combobox:
//void CXcomboDlg::OnEditupdateCombo1()
//{
//CListCtrl *m_List = new CListCtrl;
//m_List->Create(WS_VISIBLE | WS_BORDER , //CRect(118,110,283,300),this,IDC_LIST_TABLE);
//m_List->SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT);
//MessageBox("DDDDDDD");
//delete m_List;
//}
1) i have problem with dynamically using CListCtrl
2) and i dont know is it an ready control that make that or not
thanks
mlabidi
|
|
|
|
|
Hi,
I'm trying to implement bulk insert using CRecordset derived class.
I'm now in a position that I can bulk update and delete exists records, but can't add new. The strange thing is that I can add #x records where x is the number of exists records in that table. It means that the Open method of the CRecordset (actually the Move method) 'mark' something that make the allocated bulk buffer valid for add/update/delete operations, but when the table is empty no buffer records has this 'mark' and the add fails. The problem is that I can't find the way to do this 'mark' myself. I tried to change the status array values to SQL_ROW_PROCEED but it didn't work.
Can anyone please help ? code will be appreciated...
|
|
|
|
|
How can I send a pm from yahoo messenger? Anybody can help me?
|
|
|
|
|
IS Yahoo PM related with VC++
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Ofcourse yes! I've a project and I need 2 send some data to someone's yahoo IM ID, using Yahoo! IM online.
Is this ok?;)
|
|
|
|
|
Yeah,you are right.
as far i know yahoo doesnot provide any open source support for developer.i think you have to this by hacking into process space of yahoo messenger.
yeah yahoo provide sending of Datafiles from one computer to other using messenger may be you find some hack there.
good luck
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|