 |
|
 |
Could you please tell me how to slide multiple dialog in mfc. i-e let us suppose we have two dialog dialog1 and dialo2. i want when i click on left dialog1 will move to left and dialog2 will come in place on dialog1.
|
|
|
|
 |
|
 |
if you have three dialogs,it does't work ,when your have an child dialog,and the child dialog work with the Slide Dialog!
|
|
|
|
 |
|
 |
Hello u did a great job!
I got a little question,
after i open the slidedialog i cant restore my mainapplication
if it lost focus and has been sent to taskbar.
How to fix it? Or do i have to keep it "ontop" once i did slide
the dialog out?
Thanks,
SiHot
|
|
|
|
 |
|
 |
Hi... the application is very good... But if some one wants that the window slides downwards then what should be done... Using this current application we can only make the dialog to slide right way(->)... but i want to know is it possible to slide it downwards... If yes then kindly suggests me some possibilities...or some codes that i'll insert to slide it downwards...Thanks
Rajeev
|
|
|
|
 |
|
 |
what if you want the son to move from the top or the bottom?
|
|
|
|
 |
|
 |
The codes are very nicely done!
I tried setting speed to -ve, and the program hangs.. No offence!
"Ask and you shall be given, Seek and you shall find, Knock and the door shall be open unto you"
Matthew 7:7
|
|
|
|
 |
|
 |
Thanks.. Cuz of using your Classes.
R. MalboosBaf
|
|
|
|
 |
|
 |
1.Try to set sliding position to LEFT
2.Move the main dialog
3.See what happens
a solution is to update CSlideSon::RePosition()
BOOL CSlideSon::RePosition()
{
m_pDlg->GetWindowRect(&m_MyPos);
int xPos;
switch (m_SlideDirection)
{
case RIGHT:
xPos = m_MyPos.right ;
SetWindowPos(&wndTop,xPos,m_MyPos.top+4,OrigPos.Width(),m_MyPos.Height()-8,SWP_SHOWWINDOW);
break;
case LEFT:
xPos = m_MyPos.left-OrigPos.Width();
SetWindowPos(&wndTop,xPos,m_MyPos.top+4,OrigPos.Width(),m_MyPos.Height()-8,SWP_SHOWWINDOW);
break;
}
return TRUE;
}
|
|
|
|
 |
|
 |
Tested. Ya, you're right! RePosition() only cater for right movement!
Thanks for the additional codes.
"Ask and you shall be given, Seek and you shall find, Knock and the door shall be open unto you"
Matthew 7:7
|
|
|
|
 |
|
 |
Nice job!
On Win2K (and XP), AnimateWindow() can also be used to provide sliding and "unfurl" effects of various types a la the MSVC++ 6.0 splash screen.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
 |
|
 |
Very good job.. This will work great in a little app I have! I was just wondering.. Is there a way to permentaly attach the second dialog to the main window? So if you grab the second dialog it drags both?
Keep up the great coding
Rob
|
|
|
|
 |
|
 |
Could you please tell me how to slide multiple dialog. i-e let us suppose we have two dialog dialog1 and dialo2. i want when i click on left dialog1 will move to left and dialog2 will come in place on dialog1.
|
|
|
|
 |
|
 |
Could you please tell me how to slide multiple dialog in mfc. i-e let us suppose we have two dialog dialog1 and dialo2. i want when i click on left dialog1 will move to left and dialog2 will come in place on dialog1.
|
|
|
|
 |
|
 |
Let's say I want to slide out a dialog to the right. The width of the sliding window is bigger than the width of the dialog. Firstly, a part of the sliding window appears on the left side of the dialog. Can u hide that part of the sliding window somehow?
Stefan
|
|
|
|
 |
|
 |
Let's say I want to slide out a dialog to the right. The width of the sliding window is bigger than the width of the dialog. Then, there firstly appears a part of the sliding window on the left side of the dialog. Can u hide that part of the sliding window somehow?
Stefan
|
|
|
|
 |
|
 |
Nice work!
Btw, I've encountered a problem. When I close the sliding dialog for the second time (using the OK button on the sliding dialog), the application crashed. Any ideas?
Desmond
|
|
|
|
 |
|
 |
Hi Desmond,
I believe you need to do the following m_pModelles = 0; in the OnClose() function.
What is happening is when the OnDestroy() function gets called and m_pModelles hasn't been set to '0'(NULL) it tries to delete the pointer again, which throws an exception.
Hopes this helps.
Sincerely,
Newton1
|
|
|
|
 |
|
 |
Nice job! Very smooth transition.
One little problem occurs if the slider window is in the opened state and you click on OK or Cancel from the parent dialog. You will receive a small memory leak. All that is needed is to implement the following code (Override DestroyWindow) . Another thing is in your constructor initialize m_pModelles = 0; this way the following conditional if() statement will work just dandy.
BOOL CSlidingDemoDlg::DestroyWindow()
{
if(m_pModelles)
{
delete m_pModelles;
m_pModelles = 0; //safety from those danglers
}
return CDialog::DestroyWindow();
}
Once again, nice job.
Sincerely,
Newton1
|
|
|
|
 |
|
 |
If you want to delete m_pModelles, you have to use new operator before...
This is the sample code...
BOOL CSlidingDemoDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
m_pModelles = new CSlide;
return TRUE; // return TRUE unless you set the focus to a control
}
|
|
|
|
 |