|
Pass it before calling DoModal (you can for example pass it in the constructor, or in a separate setter function).
|
|
|
|
|
How to post a message from MainFrm to the dialog , psl adv
|
|
|
|
|
And why do you need to send a message to modal dialog?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
I want to close the Dialog, after getting trigger from main window,
Some theread are running in the Dialog, Once after getting message from MainFrm, I want to End the threads and then close the dialog
Thanks
|
|
|
|
|
Do you know a modal dialog call is a blocking one?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
yes ..But that is my requiremt, is there any work around for this
|
|
|
|
|
Why don't you make the dialog modeless?
See, for instance, here [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What do you mean ? You would like to be able to still interact with your main window when your modal dialog is shown ? That's not possible, unless you use a non-modal dialog.
|
|
|
|
|
If the dialog is modal, it closes itself (i.e., the main window's message pump is blocked until the dialog is closed). Otherwise, you'll need to make the dialog modeless.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
error C2065: 'iPrgBarMaxVal' : undeclared identifier,
But it is already declared
.h
public:
int iPrgBarMaxVal;
int iPrgBarStepVal;
CPrgpopup(CWnd* pParent = NULL);
CPrgpopup(CWnd* pParent = NULL, int iPrgMaxVal=60,int iPrgStepVal=2);
.cpp
CPrgpopup(CWnd* pParent = NULL,int iPrgMaxVal=60,int iPrgStpVal=2)
{
iPrgBarMaxVal = iPrgMaxVal;
iPrgBarStepVal = iPrgStpVal;
}
|
|
|
|
|
Did you try to re-build the solution?
Can you post the whole error message (i.e. include the reference to the line the error occurred)?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
MainFrm.cpp
MainFrm::OnStart()
{
....
popupDlg= new CPrgpopup(NULL, iProgressBarMaxVal,iProgressBarStepVal);
hwnd=AfxGetApp()->GetMainWnd()->GetSafeHwnd();
THREADSTRUCT5 *_param = new THREADSTRUCT5;
_param->_this = this;
thMPrgBar=AfxBeginThread (StartProgressBarThread, _param);
.....
}
UINT MainFrame::StartProgressBarThread (LPVOID param)
{
THREADSTRUCT5* ts = (THREADSTRUCT5*)param;
ts->_this->popupDlg->Create(IDD_PROGRESS_BAR_DIALOG,NULL);
ts->_this->popupDlg->ShowWindow(TRUE);
}
Prgpopup.cpp
CPrgpopup::CPrgpopup(CWnd* pParent, int iPrgMaxVal,int iPrgStpVal)
{
iPrgBarMaxVal = iPrgMaxVal;
iPrgBarStepVal = iPrgStpVal;
}
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!
Program: .....\DebugMDd\navigat.exe
File: strcore.cpp
Line: 512
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
---------------------------
navigator.exe - Application Error
---------------------------
The exception Breakpoint
A breakpoint has been reached.
(0x80000003) occurred in the application at location 0x77f9193c.
Click on OK to terminate the program
Click on CANCEL to debug the program
---------------------------
OK Cancel
---------------------------
---------------------------
navigator.exe - Application Error
---------------------------
The exception Breakpoint
A breakpoint has been reached.
(0x80000003) occurred in the application at location 0x77f9193c.
Click on OK to terminate the program
---------------------------
OK
---------------------------
|
|
|
|
|
The above has nothing to do with your former post's error.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
|
Make a public member and fill it before showing the dialog.
Greetings from Germany
|
|
|
|
|
Hi all
I am geting error like this [code]mt.exe : general error c101008a: Failed to save the updated manifest to the file ".\Debug\Abc.exe.embed.manifest". The parameter is incorrect.[/code].
Plz help me
|
|
|
|
|
something (a parameter ) with your manifest isnt correct.
Check it against others which are fine.
Greetings from Germany
|
|
|
|
|
NewVC++ wrote: Plz help me
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi all,
Please help me to over come this problem ,
I want to open Pop-up Blocker Settings window of Internet Explorer through VC++ coding.
Please provide some solution for this ?
|
|
|
|
|
No ideas of what you want to do after opening the settings window. however this won't be possible unless you are developing some Plug-In for IE. On the other hand if you want to add allow (pop up setting)some website you can create an entry in the registry at the following location. HKCU\Software\Microsoft\Internet Explorer\New Windows\Allow
I hope I understood uj correctly...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanks for reply,
Yes , actually i am developing a toolbar for IE.
I have some requirement like on click of my toolbar button i need to open that "Pop-up Blocker Settings window".
Is it possible to open this window programmatically?
|
|
|
|
|
Rahul Vaishnav wrote: Please provide some solution for this ?
I just find out that, the DisplayPopupWindowManagementDialog in the "C:\WINDOWS\system32\inetcpl.cpl" can be used to show the popup blocker dialog. Here is the code to display the dialog.
typedef BOOL (WINAPI *DisplayPopupWindowManagementDialogP)( HANDLE hWnd, LPCTSTR lpCaption );
void TestFunc( HANDLE hParentWnd )
{
HMODULE hModule = LoadLibrary( _T("inetcpl.cpl") );
DisplayPopupWindowManagementDialogP DisplayPopupWindowManagementDialog =
(DisplayPopupWindowManagementDialogP)GetProcAddress(hModule,
"DisplayPopupWindowManagementDialog" );
if( !DisplayPopupWindowManagementDialog )
{
return;
}
DisplayPopupWindowManagementDialog( hParentWnd, _T("www.Sitetounblock.com"));
}
|
|
|
|
|
Why is it down voted?? Am I wrong? If so please correct.
I found this function from the call stack of the IE. So I am sure that, IE is also calling this function.
|
|
|
|
|
Thank you very much...
Sorry by mistaken it was down voted..
It is working ....
Thank you very much..
|
|
|
|