|
When I add a control that is just static text but multi-lined initially, and I make it resize in only the x direction, then it doesn't erase the old text before redrawing. This produces funny visual artifacts. Any ideas?
|
|
|
|
|
This class solved my problem very quickly.
Thanks!
|
|
|
|
|
Hi,
I have implemented this class.
everything is working fine but the problem is with button.
when i try to implement it on Button using AddControl, The color of button gets bleck color.
I am using VS 2008.
??????
Please help.
Gurmeet Singh Janjua
|
|
|
|
|
I have the same problem! The Group box ctrl's background colour was changed!
|
|
|
|
|
Very helpful, easy and not overkill at all (in contrast to other solutions)
|
|
|
|
|
I just spent 2 hours trying to move 1 Item in my app when resizing, knowing I have 6 others to do the same to and i still did not get it right.
Then i decided to look here and found your Class. 30 min later i have all 7 items moving just as i wanted.
Just wanted to say GREAT class.
CanopenR
|
|
|
|
|
hi
I have two list controls and some buttons in my dialog. I have added handlers in the OnInitDialog as shown below.
//CList Controls ->m_bFlickerFree is set to 1
AddControl(IDC_LIST1, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 1, 0.0, 0.5,0);
AddControl(IDC_LIST2, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 1, 0.5, 0.5,0);
//CButton Controls ->m_bFlickerFree is set to 1
AddControl(IDC_BTN1, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 1, 0.0, 0.5,0);
AddControl(IDC_BTN2, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 1, 0.5, 0.5,0);
AddControl(IDC_BTN3, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 1, 0.0, 0.5,0);
AddControl(IDC_BTN4, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 1, 0.5, 0.5,0);
//CEdit Controls ->m_bFlickerFree is set to 1
AddControl(IDC_EDIT1, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 1, 0.0, 0.5,0);
AddControl(IDC_EDIT2, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 1, 0.5, 0.5,0);
//Group Box Controls ->m_bFlickerFree is set to 0
AddControl(IDC_STATIC1, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 0, 0.0, 0.5,0);
AddControl(IDC_STATIC2, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 0, 0.5, 0.5,0);
AddControl(IDC_STATIC3, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 0, 0.0, 0.5,0);
AddControl(IDC_STATIC4, CST_DELTA_ZOOM, CST_DELTA_ZOOM, CST_NONE, CST_NONE, 0, 0.5, 0.5,0);
I still get the flickering problem i.e the dialog controls flicker as you resize the dialog. Can any one give me some idea to stop the flickering.
Thanks
|
|
|
|
|
Hi,
I think I have done everything correct when setting up the project.
It compiles and links just fine.
The only problem is that I cannot resize the dialog
When I try to grab the resize icon with my mouse nothing happens...
I am using VC++ 2005
It is easily reproduced, just create a new MFC-Dialog-based app and add this Resize-stuff to get the not-so-very-resizable-dialog...
Ideas?
|
|
|
|
|
The problem is solved!
The thing that had to be done was to set the Dialog's Border Appearance to Resizing instead of the default.
|
|
|
|
|
What do you mean set the Dialog's Border Appearance to Resizing instead of the default? What do you do extra to make it resize? I had try to change AddControl(..) parameters but it still doesn't resize. can you help me?
|
|
|
|
|
I got it. Change at Dialog Properties, Style, Border for that perticular dialog.
|
|
|
|
|
hi..i have done all the above(i.e.: Change the BORDER property to Resize and added all the code for controls) stuff but still not able to Resize the items in the DialogBox.Plz help me i'm stuck from few days on it...Thanks in advance..
|
|
|
|
|
error LNK2001: unresolved external symbol "public: virtual __thiscall CResizeDlg::~CResizeDlg(void)" (??1CResizeDlg@@UAE@XZ)
SlideEffectDlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CResizeDlg::~CResizeDlg(void)" (??1CResizeDlg@@UAE@XZ)
SlideEffectDlg.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const CResizeDlg::messageMap" (?messageMap@CResizeDlg@@1UAFX_MSGMAP@@B)
SlideEffectDlg.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CResizeDlg::OnInitDialog(void)" (?OnInitDialog@CResizeDlg@@MAEHXZ)
SlideEffectDlg.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CResizeDlg::GetRuntimeClass(void)const " (?GetRuntimeClass@CResizeDlg@@UBEPAUCRuntimeClass@@XZ)
SlideEffectDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CResizeDlg::CResizeDlg(unsigned int,class CWnd *)" (??0CResizeDlg@@QAE@IPAVCWnd@@@Z)
Debug/SlideEffect.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
|
|
|
|
|
The border is non displayed in refresh tree-view control, any suggestion ?
|
|
|
|
|
The vertical resizing is not working properly when CST_RELATIVE flag is used.
In CItemCtrl::OnSize function, I replaced:
ctrlRect.top = (int)((double)m_yRatio * 1.0 * pnRect->Width() - newCy / 2.0);
with:
ctrlRect.top = (int)((double)m_yRatio * 1.0 * pnRect->Height() - newCy / 2.0);
This helped a bit, but ratios are still calculated wrong.
Anyone solved this problem?
Peter L
|
|
|
|
|
How do you ensure that the dialog Gripper bar appears on resizeable dialogs?
gjr
|
|
|
|
|
I found a little bug in constructor.
CResizeDlg::CResizeDlg(const UINT resID,CWnd *pParent)
: CDialog(resID,pParent)
{
m_xSt = CST_RESIZE;
m_xSt = CST_RESIZE;
m_xMin = 32;
m_yMin = 32;
m_nDelaySide = 0;
}
I guess should be
m_xSt = CST_RESIZE;
m_ySt = CST_RESIZE;
|
|
|
|
|
This bug may cause random block of vertical resize in my project on VS2005.
So I made the same change and then all work OK.
|
|
|
|
|
thanks - saved me some debugging...
|
|
|
|
|
Hi,
Thanks for the wonderful code i was searching for.suited my application very well.Everything works out well except the bitmaps which are not resized while i resize the CBitmapbutton in the dialog.What should i do?.Do i have to load the bitmaps for different sizes depending upon the button size?
|
|
|
|
|
Hi,
After looking at several solutions, I fortunately now discovered your code here.
Thanks a lot, this was just what I needed, and all without being way to complex (for a beginner as I am *g*)!
greetings,
knilch2000
|
|
|
|