|
Most of all, thanks for your great work. It helps me take off a lot of time. Thanks a lot.
I have some 2 problems with my programming.
First, make Dialog Bar with cdxCDynamic, I can't send message..
like this, ::SendMessage(pFrame->m_wndDlgBar.m_wndDlg.m_hWnd, WM_VIEW_DLGSEARCHTEXT, 0L, 0L); // It doesn't work..T.T..
but, can use public function like this,
pFrame->m_wndDlgBar.m_wndDlg.OnViewDlgSearchText(); // It works..^^;
How can I find handle window of my dialog of cdxCDynamic?
Second, using cdxCDynamic, Dialog Bar, when Docking and, Floating window, The size is too smaller than I make. How can I keeping up default window size?
Thanks for my poor English email.^^;
I'll be longing for your reply.
Reguarding your effort,
Sangyong shin.(shinsangyong@hotmail.com)
|
|
|
|
|
Hi... just want to thank you for your great work!
It helped me to understand how MDI works!!!
Regards, Jazper
|
|
|
|
|
I have a problem.
I have a dialogbox with various controls in it.
I neet such an operation: when I disable whole dialog with CDalog::EnableWindow(FALSE) I would like all it's child controls became grayed, even if someone calls CWnd::EnableWindow(TRUE) to one of such controls.
After I call CDialog::EnableWindow(TRUE) I would like all the its controls that were enabled before dialog was disabled become non-grayed.
Is there any possibility to achieve this??
Tom
T@mi.w.pl
PLEASE HELP!
|
|
|
|
|
Hi!!
I am Prasanthi Inakollu, doing my Master's in Computer Engineering. I am new to MFC programming. I am working on creating a Dialog Based Application. I havent find any information whether we can have menu options in the Dialog Box Application. I am trying to have an Dialog Box Application with Menu Option for File opening and stuff. Can anyone help me out in this.
Thanks
Prasanthi Inakollu
|
|
|
|
|
I'm writing a UI using Tab controls in CFormView. I want to change the size of the Form under different Tabs.
However I can only change the position or size of the controls, but not the frame.
What can I do? Anyone can help me?
Thanks!
|
|
|
|
|
How does one properly update a control with new position/size information at run-time? I've tried RemSzControl with a new AddSzControl and this only kinda works. It screws up the height after this.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
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
|
|
|
|