|
|
Comments and Discussions
|
|
 |

|
怎么在Dialog Based application 实现这样的效果呢?有没有人实现过?
|
|
|
|

|
Hi to all,
how I can catch a click or double Click into Treeview on baseCMyBar ?
tanks
Mirko
|
|
|
|

|
I have solved it whit a notification:
ON_NOTIFY(NM_DBLCLK, ID_TREELIBADD, OnNMRclickTreeAdd)
where ID_TREELIBADD is my treeview
Mirko
|
|
|
|

|
Hi anybody there!!!
I have solved the problem last time I encountered!I'd like to share my experience and the way I solved my problem!
The way is as follows:
For " 'static_cast' : cannot convert from 'UINT ...", I find that function and change UINT THAT_FUNCTION(...) to LRESULT THAT_FUNCTION(...).
For " 'afxChNil' : undeclared identifier", find "afxChNil" and put it NULL, it worked just ok for me.
By the way ,I use the compiler VS2005~~~
|
|
|
|

|
I'm trying to add the CSizingControlBar class to my project,but before I compile the demo project downloaded from the site http://www.codeproject.com/KB/toolbars/sizecbar.aspx there are some errors,like:
error C2065: 'afxChNil' : undeclared identifier h:\课程设计\sizecbar_src\src\sizecbar.cpp 1297
error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CSizingControlBar::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)' h:\课程设计\sizecbar_src\src\sizecbar.cpp 108
I'm so confused!so I really appreciate it if anyone can give me a hand!
My email:258347328@qq.com
|
|
|
|

|
I have a program that create by MDI. It need a CSizingContralBar show the CListView, and show image in the CChilfFrame.
I have implement a CMyListView class inherit from CListView , and how I show it on the CSizingContralBar. Thanks!
|
|
|
|

|
Has anyone experienced any GDI resource leaks using CSizingControlBar?
Specifically, when using it with MFC's CTreeCtrl?
I may be getting some strange font leaks related to the Font Tahoma (size 8) ?
It happens randomly, so I can't reproduce it. I don't know what causes it.
The controls are always docked when this happens.
I'm using a free tool called GDIUsage:
http://msdn.microsoft.com/en-us/magazine/cc188782.aspx
|
|
|
|

|
Hi,
Thank you for an excellent article. Sizing controlbar is awesome but...
I have a problem with the docked state of the sizing controlbar. I have derived a class from CSizingControlBarG, but I can't get it working right when it is in docked state. 1. I cant resize the bar. 2. I cant grab the bar from the gripper. 3. I cant close the bar from the x. I can do all this when the bar is floating, but I want the bar to be docked all the time.
Thank you already
|
|
|
|

|
Hi,
When I try to compile this library using Microsoft Visual Studio 2005, with Unicode char set, the gripper bar
for docked controls are painted white.
I don't think this problem is related to whether platform is 32-bit or 64-bit. It only appears when project
is compiled for Unicode.
How to fix?
|
|
|
|

|
Has anyone compiled this library for a 64-bit platform? I've successfully compiled it (only had to change GCL_HBRBACKGROUND to GCLP_HBRBACKGROUND),
however, the gripper for docked controls are white! How to fix this problem?
In CSizingControlBar::OnNcPaint(),
I had to change GetClassLong to GetClassLongPtr and also added UlongToPtr.
mdc.FillRect(rcDraw, CBrush::FromHandle( (HBRUSH)UlongToPtr(::GetClassLongPtr(m_hWnd, GCLP_HBRBACKGROUND))));
However, the gripper is still painted white. Any suggestions?
I also have some other warnings. Not sure if they're related to painting:
Compiling...
sizecbar.cpp
.\lib\sizecbar.cpp(267) : warning C4244: 'argument' : conversion from 'INT_PTR' to 'int', possible loss of data
.\lib\sizecbar.cpp(775) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'int', possible loss of data
.\lib\sizecbar.cpp(884) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'int', possible loss of data
.\lib\sizecbar.cpp(920) : warning C4244: '=' : conversion from 'INT_PTR' to 'int', possible loss of data
.\lib\sizecbar.cpp(1001) : warning C4244: 'initializing' : conversion from 'INT_PTR' to 'int', possible loss of data
modified on Sunday, May 24, 2009 1:34 AM
|
|
|
|

|
can add resourceo of dialog to CSizingControlBar ? I want have a style like the property Bar of VS2005 !
My english is bad, so....Maybe I can not experss my question >..sorry! But I want your helps!
|
|
|
|

|
Hi, all,
Here I want to create two tabs in one SDI application, I wish the frame look like below:
000000000
000000000
000000000
000000000111111111111111
000000000111111111111111
000000000111111111111111
But using csizingcontrolbar, two tabs are created, but looke like below and can not changed:
000000000
000000000
000000000
111111111111111111111111
111111111111111111111111
111111111111111111111111
Does anyone tell me how to modify??
Regards
-yufeng
Email: logicbean@hotmail.com, yufenghao@gmail.com
|
|
|
|

|
I am also asking the same question.
But I try a method, modefy fuc: CalcFixedLayout, But did not succeed.
|
|
|
|

|
you can try modify funciton NegotiateSpace
|
|
|
|

|
It depends upon the sequence of the calls to EnableDocking(); probably in your CMainFrame class.
To get the first example (illustrated in the question) call:
EnableDocking(CBRS_ALIGN_TOP);
EnableDocking(CBRS_ALIGN_LEFT);
EnableDocking(CBRS_ALIGN_BOTTOM);
EnableDocking(CBRS_ALIGN_RIGHT);
To get the second example change the order as follows:
EnableDocking(CBRS_ALIGN_TOP);
EnableDocking(CBRS_ALIGN_BOTTOM);
EnableDocking(CBRS_ALIGN_LEFT);
EnableDocking(CBRS_ALIGN_RIGHT);
|
|
|
|

|
Hi
Any one experienced that while Floating it captures the mouse messages and make the Main Window disabled.
Where as it releases if we dock it back to main window.
Any help?
VC++,COM ,C#
|
|
|
|

|
Hi, all
I'm a newbie of MFC world.
Here goes my first meaningful reply on CP:
After digging in the code and MSDN( at the very first, in the replies of cource), AND messing up with OnSize() , OnMouseMove() , OnTrackUpdateSize() ... I can't find a acceptable way to accomplish the goal. cos Windows don't send mouse messages the way I thought. And I can't get a WM_GETMINMAXINFO notify of the controlbar, maybe the message pump in the base class just ignored it. A explanation is appreciated!!!
finally I got CalcDynamicLayout() , which I thought is the key. But I can't quite understand the usage of the function, after reading MSDN and the source code I got even more confused
But, hey, the the CalcDynamicLayout() in our base class did the whole mess right? Then, Why just use the value it returned and Only check for the limitation? Here goes:
CSize CNicoSBar::CalcDynamicLayout(int nLength, DWORD dwMode)
{
CSize szRet = myBase::CalcDynamicLayout(nLength, dwMode);
CRect rcClient;
GetDockingFrame()->GetClientRect(rcClient);
if( szRet.cx > rcClient.Width() / 2 )
{
szRet.cx = rcClient.Width() / 2;
}
.
.
.
return szRet;
}
Done!
NOTE: this affects only the docking mode, I still can't find a perfect way to limit the size of it when it is in floating mode. But maybe we hardly needed that feature(hopefully).
modified on Saturday, June 21, 2008 10:29 AM
modified on Saturday, June 21, 2008 10:30 AM
|
|
|
|

|
Really thank you for your information..^^
|
|
|
|

|
I'm glad it helped.
I want to make more friends all over the world.
I love StarCraft and some ACT video games.
MSN: c.nicos@hotmail.com
Welcome to China, Welcome to Beijing!
And don't forget to bring your XBOX 360
pad
|
|
|
|

|
Another thanks for this one. You really saved me alot of time.
|
|
|
|

|
Glad it helped.
After years, a simple message can still help others, that's the beauty of the internet!
BTW, MFC is dead. Why not give .Net a try.
I want to make more friends all over the world.
I love StarCraft and some ACT video games.
MSN: c.nicos@hotmail.com
Welcome to China, Welcome to Beijing!
And don't forget to bring your XBOX 360
pad
|
|
|
|

|
I have created a toolbar derived from CToolBar class.
by default i kept caption of toolbar as some "abc".
i made the toolbar to floating state. then caption shows as abc. thats fine
but when i select any of the menu option i want to change the caption of floating toolbar dynamically.
when the toolbar is docked & brought to floating position caption is changing. But i dont want to dock the toolbar, it should be always be floating. and the title should change when toolbar is in floating.
plz can any one help on this.
|
|
|
|

|
Is there a way Ctrl+A (Select All), Ctrl+C (Copy), Ctrl+V (Paste) ... to start working in a sizebar edit box control (Demo1) when its on focus?
??????????????????????????????
|
|
|
|
|

|
Hello everyone
I have used the CSizingControlBar in my MDI Program;but a Gray Rectange was find in the bar! I don't why it is.
Who can help me!
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
DevStudio-like docking window
| Type | Article |
| Licence | |
| First Posted | 16 Nov 1999 |
| Views | 816,754 |
| Bookmarked | 334 times |
|
|