|
How can I remove Size Grip ?
Thanks in advance
XCorra
|
|
|
|
|
|
That was a big help. I had the same problem. PropertySheet that had a resizing grip on it, despite my changing the style bits. I had to modify the cdxCDynamicPropSheet constructor as follows:
...
BOOL cdxCDynamicPropSheet::OnInitDialog()
{
// initialize window & dynamic manager
BOOL b = CPropertySheet::OnInitDialog();
// Don't know how else to turn the "grip" resizer off...
//
cdxCDynamicWnd::m_nFlags &= ~flSizeIcon; // *** This line added ***
DoInitWindow(*this);
...
HTH...
BadBlue - easy free file sharing for Windows.
|
|
|
|
|
Hello everyone,
I've been using this codex for a while now, and it has been working wonderfully . Now, i only have 1 question regarding the Layout() function in the cdxCDynamicWnd class. I was wondering why there was a check to the rectangle coordinates returned by GetWindowPlacement():
ASSERT(rectNew.left >= 0);
In my setup, this assert fails when i have a scrollbar and a half hidden window in my form (I'm using the cdxCDynamicFormView version of the codex). GetWindowPlacement() returns a rectangle with negative values, which is right... Commenting out the line seems to work fine, but i was wondering why it was there in the first place ...
Thanks in advance!
--
Christian Pare
Software Engineer
www.octasic.com
|
|
|
|
|
<Update>
I seem to have narrowed this down to something with a CListCtrl in Report view on a property page (in Windows XP). To duplicate it, open the dialog IDD_MODALPROP_2 for editing (in the sample project included with the source) and add a List Control in the middle. Set the list control's "View" property (on the Styles tab of the properties window) to "Report". Now add the entry:
DYNAMIC_MAP_ENTRY(IDC_LIST1, mdRepos, mdRepos)
to the dynamic map for the CMyPropertyPage2 class. Run the program and choose "Modal Sheet". Click on tab 2 to see the problem---none of the controls are there! Change the list control back to any other view (icon, list) and everything works fine. This might indicate something to do with the header control?
In my "real" app, just the list control disappears--I see it flicker at startup, and I can click it so I know it's there, it just isn't being drawn.
Any help would be greatly appreciated
Thanks!
<original msg>
Hello,
Has anyone gotten this to work with Windows XP? I'm using the resizable property sheet/page classes, and the application works great in NT/2K (excellent work, btw), but in XP all I see is a border with some pieces of background windows drawn inside the main window.
The program is also not responding. I tried modifying the constructor flags (to disable the AntiFlicker and CopyBits) and they have little or no effect.
Has anyone had this same problem? Have you gotten it to work? Any help is greatly appreciated.
Thanks
"Do, or do not. There is no try"
--Yoda
|
|
|
|
|
i just removed the line
ModifyStyleEx(0,WS_CLIPCHILDREN);
from the function
int cdxCDynamicPropSheet::OnCreate(LPCREATESTRUCT lpCreateStruct)
and now it works!!!
|
|
|
|
|
Thank God for the post I'm replying to.
You just saved my release date!
Thank you ever so much!
S.
|
|
|
|
|
Thanks very much - that was a life-saver...
Cheers
dir - at - badblue dot com
|
|
|
|
|
I download the source, and I add a button to the dockable dialog, then compile and run, the button just becomes as if it has been disabled (I did not set it to be disabled ).
Other controls such as CheckBox do not have this problem.
Anyone can tell me why?
My system:
Win2000 professional
VC6 sp5
Thanks a lot!
|
|
|
|
|
It seems that the dialog is a ToolBar. So you need to overwrite OnUpdateCmdUI and tell your button should be enabled.
Here is the default overwrite to get all your buttons enabled:
void MyDerivedClass::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
{
cdxCDynamicBarDlg::OnUpdateCmdUI(pTarget,FALSE);
}
Hope it will help many people.
Eric
|
|
|
|
|
Hello,
Can your code be compiled into a program that would be able to reposition the child windows of other applications based on positions captured and saved, sort of like ZMover by Basta Computing, http://www.basta.com/ProdZMover.htm, that controls only parent windows?
Joe F
|
|
|
|
|
I am using your GREAT classes and it works very fine with control, but i have a problem with an ATL object: when it receives the focus, from mouse or tab key, it resize to the original size.
if you have any suggestion please let me know.
|
|
|
|
|
I reply to my message because i found a workaround:
The problem arise from the resize of the activation af the ATL object.
The ATL library on activateinplace resize the control, previous resize of the window unaffect the oleCtrlObject in the original CWnd that owned the window handle.
I added a Position property CWnd*, modified the Apply method as below
.....
// OLE ctrl
if (m_pWnd)
{
// No redraw
m_pWnd->MoveWindow(rectNewPos.left,rectNewPos.top,
rectNewPos.right-rectNewPos.left,
rectNewPos.bottom-rectNewPos.top,FALSE);
}
and added method AddSzCtrl(CWnd* ......) to cdxDynamicWnd.
If anybody is interested mail me at
corra@rosenet.it
|
|
|
|
|
Could you send me the modifications you mention to iburguer AT hotmail DOT com, please? Or post them here.
Thanks a lot!
Greetings
Ignacio
|
|
|
|
|
What if I need to create controls dynamicly?
I have tried to do this in a cdxCDynamicBarDlg derived class with an empty dialog template but I haven't been able to make the control visible.
BOOL CMyBarDlg::OnInitDialog()
{
if (!m_TreeCtrl.Create(WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESAROOT, CRect(0, 0, 0, 0), this, 100))
{
TRACE0("Failed to create instant bar child\n");
return -1; // fail to create
}
cdxCDynamicBarDlg::OnInitDialog();
return TRUE; // return TRUE unless you set the focus to a control
}
|
|
|
|
|
Just looking at the code, this should work except that you need to set the size and position of the control other than 0,0,0,0.
m_TreeCtrl.SetWindowPos(NULL, 0, 0, 100, 200, SWP_SHOWWINDOW);
|
|
|
|
|
m_TreeCtrl.Create(WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESAROOT, CRect(0, 0, 0, 0), this, 100))
Save time and change CRect(0, 0, 0, 0) to CRect(0, 0, 100, 200)
Real World Coding:
POP& BuyAPop(Money ADollar){...};
|
|
|
|
|
I am using your GREAT classes and have enjoyed the sophistication they lend to the app. There is one spot I thought I would relay to you as it appears to be a bug (at least in the source version I have).
File = cdxCDyanmicWnd.h
function = inline bool cdxCDynamicLayoutInfo::operator=(cdxCDynamicWnd *pWnd)
code: The '=' looks like it should be '==':
if(m_bUseScrollPos = pWnd->m_bUseScrollPos)
{
m_pntScrollPos.x = pWnd->Window()->GetScrollPos(SB_HORZ);
m_pntScrollPos.y = pWnd->Window()->GetScrollPos(SB_VERT);
}
Also, will need to initialize the m_bUseScrollPos in the constructor of class cdxCDynamicLayoutInfo:
cdxCDynamicLayoutInfo(cdxCDynamicWnd *pWnd) { m_bUseScrollPos=false; operator=(pWnd); }
Thanks again for the great classes!
|
|
|
|
|
Looking over this code I am wondering if you are reading it right.
I guess that the author is assigning the local variable based on the window's setting. That's why you found no initial assignment in the constructor.
The code might be more clear if you saw it like this:
m_bUseScrollPos = pWnd->m_bUseScrollPos;
if( m_bUseScrollPos )
.
.
.
That's what the compiler actually translates that code to.
That's my $0.02 anyway
Scott Burkhalter
Principal Consultant
SoulTech Solutions
w: www.soulsolu.com e: softeng@soulsolu.com
|
|
|
|
|
I have two group box controls line in a row. I want resize them both in both horizonally and vertically. The right edge of the first one will overlap the left eadg of the second one. How can I do it
|
|
|
|
|
Use something like
AddSzControl( IDC_CTRL1, 0, 0, 100, 20 );
AddSzControl( IDC_CTRL2, 0, 20, 100, 40 );
AddSzControl( IDC_CTRL3, 0, 40, 100, 60 );
AddSzControl( IDC_CTRL4, 0, 60, 100, 80 );
AddSzControl( IDC_CTRL5, 0, 80, 100, 100 );
Uwe Keim
See me: http://www.zeta-software.de/~uwe
|
|
|
|
|
Thanks for submitting these great classes, they are very well done and have saved me SO MUCH TIME
|
|
|
|
|
Do you know how to avoid painting grips on
maximized mdi children ?
It appears to me that mdi children don't show up
as maximized with ::IsZoomed or in the
nType flag of WM_SIZE
?
|
|
|
|
|
Oh, never mind, - just check the zoomed state of the
frame....
|
|
|
|
|
Hey Perry:
How did you resolve this problem? How did you check the zoomed state of the frame?
Thanks in advance.
|
|
|
|
|