|
Subject |
Author |
Date |
|
|
Bart Kampers
|
Aug 17, 2009 - 8:41 AM
|
Hello, I want the cells in my CExtGridWnd to have widths so that they exactly fit in the grid’s area. I tried to use GetClientRect to find out the area width but this does not give the correct size. It seems that I alway have to distract 64 from this size whether the scrollbars are show or not. What is the proper way to retrieve the grid area? Thanks, Bart.
|
|
|
Technical Support
|
Aug 17, 2009 - 1:46 PM
|
The Prof-UIS grids controls support the proportional resizing feature for both columns and rows. We will explain you how to use this feature for columns of the CExtGridWnd control. First of all, you should disable horizontal scrolling in your grid control. This means you should use the __ESIS_STH_NONE style in invocation of the SiwModifyStyle() method - not an any other __ESIS_STH_*** style. Second, you should apply the __EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS style with invocation of the method. The proportional column widths are stored in the top header cells. You should invoke the CExtGridCell::ExtentPercentSet() method of header cells at top to specify how the cells should be resized proportionally. The columns still support minimal/current/maximal widths in pixels. These widths can be set using the CExtGridCell::ExtentSet() method. So, you can set some initial widths in pixels. If all the minimal/current/maximal widths are equal, then column is not resized proportionally and it cannot be resized by user.
|
|
|
Bart Kampers
|
Aug 18, 2009 - 9:33 AM
|
Thanks for your response. This already works very nice but I’d like it to be a little bit nicer ;) I would like to resize colums as the data in the grid changes. All columns have to be as wide so the contents fit. The last column must stretch the free space. I made an "UpdateColumnWidths" method which is called as soon as the data in the grid is updated. I messed around a bit with "BestFitColumn" but I did not manage to get it right. So, what can I do to get this done? Also, I noticed that "BestFitColumn" sometimes goes wrong when all rows in a column contains one character.
|
|
|
Technical Support
|
Aug 18, 2009 - 12:42 PM
|
It’s possible to use best fitting and proportional resizing at the same time. But we do not recommend you to do this. Both features will constantly try to resize columns in their own manner. Best fitting is better without proportional resizing. The CExtGridWnd::BestFitColumn() method can change widths of a data column, header column at left or at right depending on the nColType parameter. One invocation of the CExtGridWnd::BestFitColumn() method changes widths of one column only. The column number is specified int the nColNo parameter. This method measures widths of the column’s grid cells before change column widths. The bDoBestFitByOuterCells, bDoBestFitByInnerCells and bDoBestFitByVisibleRowRangeOnly flag parameters determine which grid cells should be measured. The bDoBestFitByOuterCells flag specifies whether header cells at top/bottom should be measured in the nColNo column. The bDoBestFitByInnerCells flag specifies whether data cells should be measured and if this flag is true, then the bDoBestFitByVisibleRowRangeOnly flag determines whether only displayed on the screen data cells should be measured. If you want to make your grid automatically changing column widths after applying any editing results, then you should override the CExtGridWnd::OnGridCellInputComplete() virtual method, invoke parent class method from it and finally invoke the CExtGridWnd::BestFitColumn() method. If your code handles editing of some column’s cells and changes data in other columns, then you may need to invoke the CExtGridWnd::BestFitColumn() method for other columns too.
|
|
|
Chris G.
|
Aug 17, 2009 - 7:42 AM
|
Hello Prof-UIS, i created a grid (instance of CExtPPVW<CExtGridWnd>) with a vertical scrollbar by adding a CExtScrollBar member to the grid class and overriding the GetScrollBarCtrl(int nBar) method. Everything works fine so far. If the rows need more space than visible then the scrollbar appears. But now i would like to have the scrollbar always visible, even if there are less rows visible than required. In that case the scrollbar should be disabled. How can this be achieved? Thanks in advance & regards,
Chris
|
|
|
Chris G.
|
Aug 17, 2009 - 5:01 PM
|
Thank you again for the good support! Regards,
Chris
|
|
|
Technical Support
|
Aug 17, 2009 - 11:48 AM
|
First of all, you can use the CExtNSB template class to add themed scroll bars to any CExtScrollWnd-based scrollable control such as CExtGridWnd. You can simply use the CExtPPVW < CExtNSB < CExtGridWnd > > template based type. Please invoke the CExtScrollItemWnd::SiwAutohideScrollBarSet() method to disable scroll bar auto hiding.
|
|
|
Chris G.
|
Aug 17, 2009 - 7:28 AM
|
Hello Prof-UIS, is there a way to limit the minimum width and height of a CExtControlBar instance? I would like to prevent the user resizing some of my control bars to dimensions smaller than their content. Regards,
Chris
|
|
|
Chris G.
|
Aug 17, 2009 - 4:59 PM
|
Thank you, that was exactly what i needed. Regards,
Chris
|
|
|
Technical Support
|
Aug 17, 2009 - 11:48 AM
|
The minimal width is computed by the CExtControlBar::_CalcDesiredMinHW() virtual method, minimal height is computed by the CExtControlBar::_CalcDesiredMinVH() virtual method:
virtual INT _CalcDesiredMinHW() const;
virtual INT _CalcDesiredMinVH() const;
|
|
|
Anil Siddhpura
|
Aug 17, 2009 - 1:44 AM
|
Hi,
I have a dialog, inherited from CExtResizableDialog, and have some controls on that dialog.
I have some dockable bar, created with CExtControlBar. Now these dockable bar docked on that dialog. Whenever this docked the controls, which are on a CExtResizableDialog are comes up. I mean those controls are highlighted when a Dockable bar docks.
What to do, so those controls are not comes up?
|
|
|
Technical Support
|
Aug 19, 2009 - 2:28 PM
|
You can send us e-mail to the support mail box at this web site.
|
|
|
Technical Support
|
Aug 17, 2009 - 11:47 AM
|
You wrote: "Now these dockable bar docked on that dialog" We suppose you mean you created a resizable dialog as a child of a control bar because control bars cannot be created inside dialogs.
You wrote: "I mean those controls are highlighted when a Dockable bar docks" The control bar does not highlight a dialog nor dialog controls. Could you provide us with a screenshot demonstrating how your dialog’s controls become highlighted?
|
|
|
Anil Siddhpura
|
Aug 19, 2009 - 4:10 AM
|
Hi,
Can i have your e-mail id? So that i can send you word document with screenshot.
|
|
|
Chris G.
|
Aug 13, 2009 - 1:16 PM
|
Hello Prof-UIS, the only method i found to set the text alignment of a field in a CExtStatusControlBar object is the SetPaneDrawTextFlags() method. But unfortunately it only supports the flags DT_LEFT, DT_RIGHT and DT_CENTER. What about vertical alignment? If i increase the height of the status bar the text gets aligned at the top. Espacially when using CExtZoomScrollBar we have to increase the height to avoid cutting of edges of that control. How can the vertical text alignment be added? Regards, Chris
|
|
|
Chris G.
|
Aug 17, 2009 - 7:05 AM
|
Hello Prof-UIS, thank you for your help. I didn’t use the flag DT_SINGLELINE. Now it works. Regards,
Chris
|
|
|
Technical Support
|
Aug 15, 2009 - 10:37 AM
|
Please find the following line in the CMainFrame::OnCreate() method in the ZoomScrollBar sample application: m_wndStatusBar.GetStatusBarCtrl().SetMinHeight( 25 );
Then please comment it: //m_wndStatusBar.GetStatusBarCtrl().SetMinHeight( 25 );
And insert the following code after it: m_wndStatusBar.GetStatusBarCtrl().SetMinHeight( 45 );
int nTestPaneIndex = 0;
m_wndStatusBar.SetPaneDrawTextFlags(
nTestPaneIndex,
( m_wndStatusBar.GetPaneDrawTextFlags( nTestPaneIndex ) & (~(DT_TOP|DT_VCENTER|DT_BOTTOM)) )
| DT_BOTTOM | DT_SINGLELINE
);
Now please compile and run the ZoomScrollBar sample application. The status bar uses enough big height (at least 45 pixels). All the status panes display the middle aligned text. This alignment is used by default. But the first status pane (which is also called as message pane) is bottom aligned: http://www.prof-uis.com/download/forums/tmp/BottomAlignedTestInStatusPane.PNG
|
|
|
Bart Kampers
|
Aug 13, 2009 - 8:27 AM
|
Hello, I want to create a table where the next row is selected when the down-arrow key is pressed during editing a cell. So I overrode the OnInplaceControlPreTranslateMessage method on my own cell derived from. CExtGridCellString. Now when I hit the down-arrow editing is stoped but the editing cell stays selected. What goes wrong?
bool CQuickLeaveCellString::OnInplaceControlPreTranslateMessage(
MSG * pMsg,
HWND hWndInplaceControl,
CExtGridWnd & wndGrid,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType,
const RECT & rcCellExtra,
const RECT & rcCell,
const RECT & rcInplaceControl)
{
CExtGridInplaceEdit * pEdit = static_cast <CExtGridInplaceEdit*> (CWnd::FromHandle(hWndInplaceControl));
ASSERT(pEdit != NULL);
ASSERT_VALID(pEdit);
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == VK_DOWN)
{
pEdit->DoEndEdit(true, VK_RETURN);
CRect rect;
wndGrid.GridCellRectsGet(nColNo, nRowNo + 1, nColType, nRowType, rect);
wndGrid.SelectionSet(rect, true, true, true);
return true;
}
}
return __super::OnInplaceControlPreTranslateMessage(
pMsg,
hWndInplaceControl,
wndGrid,
nVisibleColNo,
nVisibleRowNo,
nColNo,
nRowNo,
nColType,
nRowType,
rcCellExtra,
rcCell,
rcInplaceControl);
}
|
|
|
Technical Support
|
Aug 13, 2009 - 12:57 PM
|
You don’t need to code this feature. Please apply the __EGWS_BSE_WALK_VERT style or the __EGWS_BSE_WALK_VERT|__EGWS_BSE_WALK_VERT_NO_EDIT style set using the BseModifyStyle() method.
|
|
|
Bart Kampers
|
Aug 14, 2009 - 1:48 AM
|
|
|
|
|
JinWoo Jeong
|
Aug 12, 2009 - 12:50 AM
|
I changed my VC6 Src --> VC9 sp1 Src
In my .h:
class TestView : public CExtWS < CExtWA < CExtAFV < CFormView > > >, public InterfaceXXXX
{
TestView( UINT nResourceID = 0 );
...
}
In my .cpp
TestView::TestView ()
: CExtWS < CExtWA < CExtAFV < CFormView > > >( nResourceID, (CWnd *)NULL ), InterfaceXXXX( (CObject *)this )
{
}
I get the following compile error:
1>d:\Prof-UIS\283\Include\ExtTempl.h(1349) : error C2664: ’CExtAFV<CExtAFVBase>::CExtAFV(__EXT_MFC_SAFE_LPCTSTR,CWnd *)’ : 매개 변수 1을(를) ’UINT’에서 ’__EXT_MFC_SAFE_LPCTSTR’(으)로 변환할 수 없습니다.
1> with
1> [
1> CExtAFVBase=CFormView
1> ]
1> 정수 계열 형식에서 포인터 형식으로 변환하려면 reinterpret_cast, C 스타일 캐스트 또는 함수 스타일 캐스트가 필요합니다.
1> d:\Prof-UIS\283\Include\ExtTempl.h(1336) : 클래스 템플릿 멤버 함수 ’CExtWA<CExtWABase>::CExtWA(UINT,UINT)’을(를) 컴파일하고 있습니다.
1> with
1> [
1> CExtWABase=CExtAFV<CFormView>
1> ]
1> d:\Prof-UIS\283\Include\ExtTempl.h(238) : 컴파일 중인 클래스 템플릿 인스턴스화 ’CExtWA<CExtWABase>’에 대한 참조를 확인하십시오.
1> with
1> [
1> CExtWABase=CExtAFV<CFormView>
1> ]
1> d:\test\TestView.h(13) : 컴파일 중인 클래스 템플릿 인스턴스화 ’CExtWS<CExtWSBase>’에 대한 참조를 확인하십시오.
1> with
1> [
1> CExtWSBase=CExtWA<CExtAFV<CFormView>>
1> ] I am using 2.83 on VS2008 SP1
plz kill error.....
|
|
|
Technical Support
|
Aug 12, 2009 - 6:36 AM
|
The CChildView class in the HelpNotes sample application is also derived from the CExtWS < CExtWA < CExtAFV < CFormView > > > template based class and it’s compiled OK by any Visual C++ version and for any platform: class CChildView : public CExtWS < CExtWA < CExtAFV < CFormView > > >
{
. . .
};
CChildView::CChildView()
: CExtWS < CExtWA < CExtAFV < CFormView > > > ( CChildView::IDD, (CWnd*) NULL )
{
}
So, we need to know at least the following 3 things: 1) What is the InterfaceXXXX interface? Did you implemented all the abstract virtual methods of it? 2) The exact Visual Studio version you are using. You can send us a screen shot of you Visual Studio’s About dialog box to the support mail box at this web site or you can insert this screen shot into forum message. 3) Which version of Prof-UIS 2.83 is used in your project? Freeware or Full/Trial?
|
|
|
JinWoo Jeong
|
Aug 12, 2009 - 7:10 PM
|
In my .h:
class TestView : public CExtWS < CExtWA < CExtAFV < CFormView > > >, public InterfaceXXXX
{
TestView( UINT nResourceID = 0 );
...
}
In my .cpp
TestView::TestView ( UINT nResourceID /* = 0 */ )
: CExtWS < CExtWA < CExtAFV < CFormView > > >( nResourceID, (CWnd *)NULL ), InterfaceXXXX( (CObject *)this )
{
}
TestView::TestView( UINT nResourceID /* = 0 */ ) <-- Missing ˆˆ;; (In my.cpp)
1. No abstract virtual methods , InterfaceXXXX is normal class
2. Visual Studio 2008 9.0.30729.1 SP


3. No Freeware version. my company buy prof-uis 2.83
|
|
|
Technical Support
|
Aug 13, 2009 - 12:56 PM
|
The CChildView class in the HelpNotes sample application is derived from the same CExtWS < CExtWA < CExtAFV < CFormView > > > template based class. This sample application compiles ok with Prof-UIS 2.83 on the same Visual Studio 2008 with the same SP1 and our Visual Studio 2008 shows exactly the same about box information. We modified the HelpNotes sample application. We made it derived from the new InterfaceXXXX class and it also compiles OK. Here is the modified version of the HelpNotes sample application:
http://www.prof-uis.com/download/forums/tmp/HelpNotes-for-JinWoo-Jeong.zip
|
|
|
Anil Siddhpura
|
Aug 11, 2009 - 1:08 AM
|
Hi, How can I set an Image(Bitmap Image) as the background of a dialog? I tried with Picture Control, but with this other controls on dialog goes behind the Image. I also write a function to set background image, but it works only with CDialog. As i inherit my dialog class from CExtResizableDlg, it does not working. So, is there any other method to set background image when dialog class is inherit from CExtResizableDig?
|
|
|
Technical Support
|
Aug 24, 2009 - 11:25 AM
|
How do you paint your bitmap image? If you are using the CExtBitmap class, please switch to the CExtBitmapCache class. Do not load bitmap from resources each time when it should be painted. Add some CExtBitmapCache property into your dialog class and load your bitmap only once when the dialog is initialized.
|
|
|
Anil Siddhpura
|
Aug 25, 2009 - 3:07 AM
|
Hi,
No i am not loading bitmap image from resource each time, i am loading it only for once.
Also, as you told i switched to CExtBitMapCache, but there is no difference. I am still facing the problem.
For painting image i am using ::Draw() function.
|
|
|
Technical Support
|
Aug 26, 2009 - 5:12 AM
|
Please try to compare your application with the TabbedBars sample. This sample application also draws bitmap based backgrounds inside resizable bars.
|
|
|
Technical Support
|
Aug 22, 2009 - 11:42 AM
|
The image painting is a quite fast operation. Did you try to create a version of your dockable dialog without background image painting? Is it really faster?
|
|
|
Anil Siddhpura
|
Aug 23, 2009 - 11:59 PM
|
Hi, Yes, i tried it without background image and it is quite faster. But when i implement it for background image, the docking of dialog become too slow because of that background image painting.
|
|
|
Technical Support
|
Aug 11, 2009 - 5:45 AM
|
|
|
|
|
Anil Siddhpura
|
Aug 21, 2009 - 11:28 PM
|
Hi,
Thanks for the reply. Now, I am able to draw background image on dialog. I have implemented same as in "Replacebackground" sample.
But now i am facing another problem. I have implemented this on a dockable bar dialog. Whenever the dockable bar comes out, it’s too much slow because of that background image drawing. Anything we can do, so it’s not become slow?
|
|
|
Nam Huy
|
Aug 10, 2009 - 1:08 PM
|
Hi, I’m trying to create a virtual grid with the virtual scrolling mode enable where: - a cell background color will flash when its contents displayed a specific string value; OR/AND - the cell string value is replaced with a bitmap The data that drive these is dynamic. I looked at the AdoRecorsetView project. But it does not give examples when the virtual scrolling mode is enable for the following: - edition of cells that are visible on the virtual grid - refresh specific cells when its data from the data provider changed - programmatically navigate through the visible cell to change its contents (ie getRow, get Column in virtual scrolling mode) Your help would be greatly appreciated! Thanks!
|
|
|
Technical Support
|
Aug 11, 2009 - 3:06 AM
|
Here is the editable version of the AdoRecordsetView sample application:
http://www.prof-uis.com/download/forums/AdoRecordsetEdit.zip
But you may need to code a specific version of the end-of-edit handling for particular editing tasks.
The CExtGridWnd::GridCellRectsGet() method computes grid cell rectangles for displayed grid cells. The computed rectangles are based on the client coordinate system of the grid window. You can simply invalidate modified grid cells. That’s how you should update the externally changed data. Of course you may need to re-load externally modified grid cells. The virtually cached grids allow to access only displayed grid cells via the CExtGridWnd::GridCellGet() method invocation. The CExtScrollItemWnd::OnSiwGetVisibleRange() virtual method returns a CRect object which contains indices of top and bottom displayed/cached rows in the CRect::top and CRect::bottom properties.
The grid cell flashing can be implemented using timers running in your CExtGridWnd-based window. The timer handler should simply change grid cell text/background color and invalidate changed grid cells.
|
|
|
ali reza
|
Aug 10, 2009 - 7:35 AM
|
Hi,
I am new to profiUIs285freeware;
1) I have been trying to handle any changes made in edit control (m_wndDockedCtrlEdit) of the SDIDOCVIEW sample. In MFC for an edit box which is placed on a form view I would simply handle the EN_CHANGE message by using the class wizard to generate the handler function, but I couldn’t do the same thing here.
2) Besides, where can I find documentation on the methods of the e.g. CExtEdit class. To change its conent I used the "SetWindowText" function which was called from CMainframe::OnCreate. But what about the other methods.
Pls help me on the issues.
Regards,
|
|
|
Technical Support
|
Aug 15, 2009 - 10:39 AM
|
|
|
|
|
Technical Support
|
Aug 10, 2009 - 1:42 PM
|
The CExtEdit control is an extended version of the CEdit control from MFC. The CExtEdit control supports a themed context menu and a themed window border displayed on mouse hover. The CExtEdit control does not have any other special features. So, its documentation is short. If the edit control is created inside a CExtControlBar control bar window, then you should use message reflection for handling the EN_CHANGE notification in your CExtEdit-derived class. You should insert an entry into the message map of your CExtEdit-derived class:
ON_CONTROL_REFLECT( EN_CHANGE, OnChange )
The handler method looks like void CYourEditClassNameHere::OnChange()
{
. . .
}
|
|
|
ali reza
|
Aug 14, 2009 - 9:58 PM
|
Hi,
Thanks for your prompt response,
1) I am currently working on the SDIDOCVIEW sample, so I have not derived any classes of my own from CExtEdit, and just an instance of the CExtEdit is created already (m_wndDockedCtrlEdit).
2) The point is that I should handle the MSG from a control that has been created during runtime. Namely I want to handle EN_CHANGE and call e.g. the AfxMessageBox in its handler.
Could you pls advise me on how this should be done.
Regards,
|
|
|
GT Michael
|
Aug 9, 2009 - 4:11 AM
|
Hi all. I have a CExtContolbar that is floating in the application. Now if I click on the "X" button to close/hide the control bar, the application will not respond any more, the control bar also keep floating, not hidden. Then if click on the application item in the task bar with the right mousebutton, the application will respond again and the control bar will dissappear. The other similar case is to start the WinVNC.exe on the test machine, then start the application on the test machine and open the control bar, then connect via a remote appnection(vncviewer) to this test machine and try to close the control bar by clicking on the "X" button, then the application will always freeze, after changing to another running task and back to our application, the controlbar is not closed but the application is responding again. Does anyone encounter these two problems? What is the reason? How to solve this problem? Waiting for your advise. (Here the application is the software we develop) Thanks. Best regards
|
|
|
Technical Support
|
Aug 11, 2009 - 12:32 PM
|
We are still unable to reproduce this issue with VNC, but we reproduced it with HardCopy. We have a preliminary fix for this issue. It works, but we need some additional time for testing it. This fix is very simple. Please open the ...\Prof-UIS\Src\ExtMiniDockFrameWnd.cpp file and replace all SendMessage( WM_NCPAINT ); lines of code with PostMessage( WM_NCPAINT );.
|
|
|
GT Michael
|
Aug 11, 2009 - 10:36 AM
|
This problem also coocur with Prof-UIS samples which include controlbar. And we found out the reason is that, when we use VNC to connect a test computer, then if we click on the title of floating controlbar in the test computer, the application VNC will send the endless message which will be received by Prof-UIS, Only when we switch to other application or close the VNC, then the profuis will received the message LBUTTONDOWN and handle it. It seems that VNC has a hook which will get the mouse message and do not send the message out, that is why the prof-uis could not received the LBUTTONDOWN message and it reveived the endless message which is sent by VNC. And this problem may also happen without VNC, if we start some application which has hook, then the floating CExtControlBar may also not be moved. Such as the software HardCopy.exe, if we open this software , then the floating CExtControlBar could not be moved. Environment: Prof-uis version: 270 Application : 32 bit System : Windows XP Visual Studio : 2003
|
|
|
Technical Support
|
Aug 10, 2009 - 7:40 AM
|
We downloaded and installed VNC 4.1.3. We tested the control bars from the MDI sample application and found no problem. Would you tell us more about the problem?
- Does the problem occur with Prof-UIS samples running on your test computer?
- Which Windows versions were used on VNC client and server computers? Whether they 32 or 64 bit?
- Whether your application 32 or 64 bit?
- Which Visual Studio version was used for compiling your app and Prof-UIS? Which Prof-UIS configuration uses your app? Whether the release or debug version of your app was used in your remote tests?
|
|
|
L Freddi
|
Aug 7, 2009 - 2:31 AM
|
Hi. I have five CExtContolbar that can be dock/undock/drag&drop in the application.
Sometimes CExtControlbar moving is not smooth or not moveing when i drag the Controlbar. CPU occupied rate is very low. wait your advice. thanks.
|
|
|
Technical Support
|
Aug 10, 2009 - 7:43 AM
|
Please provide us with the step by step instructions about how to reproduce this problem with a Prof-UIS sample.
|
|
|
Bart Kampers
|
Aug 6, 2009 - 5:57 AM
|
Hello, Which method should I override if I want a notification when the selection of a CExtGridCellComboBox has changed? There must be something like On...Complete, right? Thank you, Bart.
|
|
|
Bart Kampers
|
Aug 14, 2009 - 9:24 AM
|
The code was correct after all, even using DECLARE_DYNCREATE. The problem was that Visual Studio decided not to break on the breakpoint :(
|
|
|
Bart Kampers
|
Aug 13, 2009 - 2:49 AM
|
Here is my code. I put a breakpoint in OnPopupListBoxSelEndOK but it is never hit. class CPackageCell : public CExtGridCellComboBox
{
public: CPackageCell(CExtGridDataProvider* pDataProvider = NULL)
: CExtGridCellComboBox(pDataProvider)
{} DECLARE_DYNCREATE(CPackageCell)
IMPLEMENT_ExtGridCell_Clone(CPackageCell, CExtGridCellComboBox); virtual bool OnPopupListBoxSelEndOK(CExtPopupInplaceListBox & wndListBox, CExtGridCell::TrackCellStateInfo_t & _tcsi) {
return
__super::OnPopupListBoxSelEndOK(wndListBox, _tcsi); }
};
|
|
|
Technical Support
|
Aug 14, 2009 - 1:01 PM
|
Did you try to rebuild your project?
|
|
|
Bart Kampers
|
Aug 17, 2009 - 1:31 AM
|
> Did you try to rebuild your project? No, but it works OK now.
|
|
|
Technical Support
|
Aug 13, 2009 - 12:52 PM
|
Please use DECLARE_SERIAL instead of DECLARE_DYNCREATE.
|
|
|
Technical Support
|
Aug 6, 2009 - 10:33 AM
|
The CExtGridCell::OnPopupListBoxSelEndOK() virtual method is similar to the CBN_SELENDOK notification of combo box common control.
|
|
|
chen ping
|
Aug 4, 2009 - 4:20 AM
|
hi.every one : I have a program using profuis.dll . today ,i change profuis.dll from version 2.7.* to 2.8.4 ,the UI(just a dialog with some controls ) speed slows down too much. Please give me some advice! thanks !
|
|
|
Technical Support
|
Aug 4, 2009 - 8:26 AM
|
We don’t have similar reports yet. The compilation speed can be a bit slower in each new version. But not the run-time speed. Could you send us a test dialog project with some controls which shows the performance difference and which we can check using both Prof-UIS versions?
|
|
|
Anil Siddhpura
|
Aug 3, 2009 - 5:23 AM
|
Hi, Is it possible to create Round(Circular) shape button? I would like to create acircular shape button just like as in Media player’s "Play" button
|
|
|
Technical Support
|
Aug 4, 2009 - 1:52 AM
|
If you have skin images for normal/hovered/pressed/disabled states (a least one image for normal state is required, others are optional), you can simply assign them to the CExtIconButton control. The CExtButton::m_icon property is the CExtCmdIcon object and it’s public. The CExtCmdIcon class has the following public properties:
CExtBitmap m_bmpNormal, m_bmpDisabled, m_bmpHover, m_bmpPressed;
You should load your round button bitmaps into these properties of the CExtCmdIcon class. The CExtShellDialogFile dialog uses the CExtCmdIcon buttons at the top of the dialog near shell combo box control.
|
|
|
Simp S
|
Jul 31, 2009 - 3:05 AM
|
Hi, I am using the following code for inserting ’Button’ cell on Grid Control. ************************************************************************** CExtGridCellButton * pCellButton =
STATIC_DOWNCAST(
CExtGridCellButton,
m_wndGrid.GridCellGet( nColNo, 0L )
);
pCellButton->TextSet( _T("Details") );
pCellButton->ModifyStyle( __EGCS_TA_HORZ_CENTER );
pCellButton->IconIndexSet(0 ); ************************************************************************** How can I get the event on button click?
|
|
|
Technical Support
|
Aug 2, 2009 - 1:15 PM
|
|
|
|
|
Chris G.
|
Jul 30, 2009 - 7:01 PM
|
Hello Prof-UIS, i have problems creating a CExtShellComboBox and a CExtNCSB<CExtShellListCtrl> instance in my CExtWA<CExtControlBar> derived control bar. The following three problems occured: - Clicking inside the shell combobox leads to an assertion at extcombobox.cpp (line 234).
- The shell combobox control ignores the rectangle specified in the create method.
- Invoking the create method for the CExtNCSB<CExtShellListCtrl> instance leads to an assertion at wincore.cpp (line 329)
I’m stuck with this problems because the Prof-UIS Controls sample doesn’t seem to have them and there doesn’t seem to be a generall difference in how the sample creates the controls except for creating them in a resizable dialog. Here is the source: // Header file: class CFileBrowser : public CExtWA<CExtControlBar>
{
DECLARE_DYNAMIC(CFileBrowser)
public:
CExtShellComboBox m_wndShellCombo;
CExtNCSB<CExtShellListCtrl> m_wndShellList;
public:
CFileBrowser();
virtual ~CFileBrowser();
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
};
// Source file: IMPLEMENT_DYNAMIC(CFileBrowser, CExtWA<CExtControlBar>)
CFileBrowser::CFileBrowser()
{
}
CFileBrowser::~CFileBrowser()
{
}
BEGIN_MESSAGE_MAP(CFileBrowser, CExtWA<CExtControlBar>)
ON_WM_CREATE()
END_MESSAGE_MAP()
void CFileBrowser::OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL /*bDisableIfNoHndler*/)
{
}
int CFileBrowser::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if( CExtWA<CExtControlBar>::OnCreate(lpCreateStruct) == -1 )
return -1;
m_wndShellCombo.Create(WS_VISIBLE|CBS_DROPDOWNLIST |
CBS_OWNERDRAWFIXED | CBS_HASSTRINGS |
CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP, CRect(10,10,100,100), this, IDC_SHELL_COMBO);
m_wndShellCombo.FocusPath(_T("C:\\"));
m_wndShellList.Create(LVS_REPORT | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, CRect(10, 110, 100, 200), this, IDC_SHELL_LIST);
m_wndShellList.SetExtendedStyle( LVS_EX_UNDERLINEHOT|LVS_EX_UNDERLINECOLD );
m_wndShellList.ModifyStyle( 0, LVS_EDITLABELS );
return 0;
}
Regards, Chris
|
|
|
Chris G.
|
Aug 1, 2009 - 6:59 PM
|
Hello Prof-UIS, thanks for the help. Now that i have created a shell combo and a shell list control i would like to configure them to suit my needs but i do not know how. This is what i would like to achieve: Shell combo:
The tree inside the combo should show lines and enable expansion and colapsing of nodes Shell list:
I would like to choose which columns to show (e.g. only the filenames) How can this be achieved? Thank you & regards,
Chris
|
|
|
Technical Support
|
Aug 2, 2009 - 1:17 PM
|
You can use the source code of the CExtShellDialogFile class as the sample. This dialog has 4 shell controls:
CExtNCSB < CExtShellListCtrl > m_wndShellList;
CExtNCSB < CExtShellTreeCtrl > m_wndShellTree;
CExtNCSB < CExtShellComboBox > m_comboLookIn;
CExtShellExtensionsComboBox m_comboFileTypes;
It initializes these controls in the CExtShellDialogFile::OnInitDialog() virtual method and handles notification from the shell controls for synchronizing them with each other: ON_REGISTERED_MESSAGE( CExtShellListCtrl::g_nMsgShellLocationChanged, OnShellListLocationChanged )
ON_REGISTERED_MESSAGE( CExtShellComboBox::g_nMsgShellLocationChanged, OnShellComboLocationChanged )
ON_REGISTERED_MESSAGE( CExtTreeCtrl::g_nMsgTreeItemDelayedFocus, OnShellTreeDelayedItemFocus )
ON_REGISTERED_MESSAGE( CExtShellBase::g_nMsgShellItemExecute, OnShellItemExecute )
Now we will use code lines from the method to show you how to initialize shell tree and shell list controls. The shell tree control initialization is mostly performed by one line of code: m_wndShellTree.RefreshShellRoot();
Then you can focus some tree item: m_wndShellTree.FocusItem( m_wndShellTree.GetChildItem( TVI_ROOT ), true, false, true );
Then you can display content of the corresponding shell folder in the shell list control: HTREEITEM htiSelect = m_wndShellTree.GetFocusedItem();
if( htiSelect != NULL )
{
CExtTreeCtrl::TREEITEMINFO_t & _TII = m_wndShellTree.TreeItemInfoGet( htiSelect );
CExtShellItemData * pData = (CExtShellItemData*)_TII.m_lParam;
ASSERT( pData != NULL );
LPITEMIDLIST pidlSelect = (LPITEMIDLIST)pData->m_pidlAbsolute.GetPtr();
ASSERT( pidlSelect != NULL );
m_wndShellList.FocusPIDL( pidlSelect );
}
The shell combo box above shell list and tree controls is also initialized with one line of code: m_comboLookIn.DelayFocusPIDL( pidlSelect );
Then you should take a look at the CExtShellDialogFile::OnShellTreeDelayedItemFocus(), CExtShellDialogFile::OnShellListLocationChanged(), CExtShellDialogFile::OnShellComboLocationChanged() and CExtShellDialogFile::OnShellItemExecute() handler methods which perform synchronization between shell controls. The first three handler methods are invoked when the focused shell item is changed in the shell combo/tree/list controls. The CExtShellDialogFile::OnShellItemExecute() method is invoked when user double clicks on some shell item in the shell control. If this control is shell list, then the file dialog should assume the IDOK button is clicked.
|
|
|
Chris G.
|
Aug 3, 2009 - 4:28 AM
|
Hello Prof-UIS, thank you for your help. Synchronizing data between those controls works now, but i still have the following two problems: 1. The shell list control is in report mode (LVS_REPORT) and displays the columns Name, Size, Type and so on. But i want to display only the Name column. I tried removing unneeded columns with DeleteColumn() but that causes an assertion. The same happens if i call GetHeaderCtrl().DeleteItem(). 2. If i click into the shell combo box it shows me a tree without lines and without + and - symbols for expanding and collapsing the items. I would like to have a normal tree control in the shell combo box like the one used in CExtShellTreeCtrl so that the user can walk through the whole filesystem inside the shell combo box. That tree should of course show only folders. If he than selects a folder he should see its contents in the shell list control. So actually i just need to turn the tree inside the combo box to one that is expandable and collapsable with the + and - symbols. How can this be achieved? Regards, Chris BTW: Answering support querries even on weekends shure deserves commendation! Great job!
|
|
|
Technical Support
|
Aug 4, 2009 - 1:53 AM
|
The CExtShellListCtrl class has the following locally defined enumeration:
enum e_shell_list_column_type_t
{
__ESLCT_NAME = -1,
__ESLCT_SIZE = -2,
__ESLCT_TYPE = -3,
__ESLCT_DATE_MODIFIED = -4,
__ESLCT_DATE_CREATED = -5,
__ESLCT_DATE_ACCESSED = -6,
__ESLCT_ATTRIBUTES = -7,
__ESLCT_CUSTOM_TYPE = 0,
};
And the following public array property: CArray < INT, INT > m_arrColumnTypes;
This array defines columns to display in the shell list view control and it contains the INT values which are really constants defined by the e_shell_list_column_type_t enumeration. This array is initialized in the constructor of the CExtShellListCtrl class: m_arrColumnTypes.Add( INT(__ESLCT_NAME) );
m_arrColumnTypes.Add( INT(__ESLCT_SIZE) );
m_arrColumnTypes.Add( INT(__ESLCT_TYPE) );
m_arrColumnTypes.Add( INT(__ESLCT_DATE_MODIFIED) );
m_arrColumnTypes.Add( INT(__ESLCT_DATE_CREATED) );
m_arrColumnTypes.Add( INT(__ESLCT_DATE_ACCESSED) );
m_arrColumnTypes.Add( INT(__ESLCT_ATTRIBUTES) );
This means you can create your own CExtShellListCtrl-derived class with the following code in its constructor: m_arrColumnTypes.RemoveAll();
m_arrColumnTypes.Add( INT(__ESLCT_NAME) );
As result, only the Name column will appear. The second question is very interesting. The shell combo box does not display any tree/shell tree. It really displays just one branch demonstrating the currently viewed shell folder and some neighborhood folders at each level. The shell combo box can be used for quick-jumping to neighborhood or parent folders only. So, we can assume your second question as feature request.
|
|
|
Chris G.
|
Aug 4, 2009 - 7:11 AM
|
Hello Prof-UIS, thank you for the detailed help. Now i got the shell list control exactly like i need it. Are there any chances the shell combo box will be able to contain a full tree control like mentioned before? If yes, when could that feature be expected to be available? Would it then be possible to get it without waiting for the next official update of Prof-UIS? Thanks & regards, Chris
|
|
|
Technical Support
|
Jul 31, 2009 - 7:46 AM
|
The CExtWA template class adds an anchoring feature to other windows. The CExtControlBar class implements a resizable control bar and it’s designed as a container for one child window which is automatically resized to cover the entire control bar’s client area. The CExtWA < CExtControlBar > template based class is incorrect usage of both the CExtWA and CExtControlBar classes. Please create one child dialog with browsing controls inside the control bar.
|
|
|
Isabelle Carrier
|
Jul 29, 2009 - 2:23 PM
|
Hello, I want to modify the skin for a software we are building with prof-uis. I understand the general process of modifying the aqua.xml file and the image bank that comes with it to get what we want. Im a graphic designer, so I might not get the technical terms right... try to understand me :) My first question would be: Are all the SkinItem that I can play with listed in the aqua.xml?
For example: I want to modify the look of the zone where we drop column header for grouping. I have found a SkinItem named "ReportGroupAreaItem", so I tried to add a SkinItem named "ReportGroupArea". It seemed logical to me, but it did not "picked up". So my guess is either I got the SkinItem name wrong or this zone did not get a SkinItem name at all. My second question is: I wouldn’t want to flood this forum with every SkinItem I am looking for... So would there be a way for me to identify the "pieces" of the interface and what SkinItem name it has? A sort of Inspect CSS feature like in Firebug?
I have read on other thread that you do not/cannot have a skin editor, but this would help a lot so we do not have to work in the dark and might be easier to make than a skin editor? Finally, Could you add the Grid in the skinable sample? It would greatly help visualize a more complete results of the effect of a skin. Thank you!
|
|
|
Technical Support
|
Aug 13, 2009 - 12:54 PM
|
We made the skinning subsystem improvements in the latest Prof-UIS 2.87 pre-release version. The serial version history numbers of the latest Prof-UIS versions are: 2.84, 2.85, 2.87. All these versions are very friendly to each other. You can compile your apps with any of them and it will be 100% compatible with newer and older versions. We can provide you with the 2.87 download if you drop us an e-mail to the support mail box at this web site.
|
|
|
Isabelle Carrier
|
Sep 3, 2009 - 2:46 PM
|
Out of curiosity, are you able to tell me when the official release is planned to be released? If it is anytime soon, I think we would prefer to use an official release. Thank you
|
|
|
Technical Support
|
Sep 4, 2009 - 2:23 PM
|
We hope to release Prof-UIS 2.87 this month.
|
|
|
Technical Support
|
Aug 11, 2009 - 12:30 PM
|
We are sorry for the delay with this answer. We implemented a skinned version of the group area part of the report grid control. Here is the ZIP file with the updated skins and compiled versions of the ReportGrid sample application which load the Black Diamond and Aqua skins initially:
http://www.prof-uis.com/download/forums/tmp/TestThemedReportGridGroupArea.zip
The new /Background/ReportGroupArea/Background XML item defines background image for the group area. It’s referred to the ...\BlackDiamond\Background\ReportGroupAreaBackground.png and ...\Aqua\Background\ReportGroupAreaBackground.png images in skin files. The /Grid/ReportEmptyMessageColor XML item defines text color of the message displayed in the group area when there are no columns dropped into it. We made the group area using colors which are somewhere between the default looking background and color of sea surface.
The ReportGrid sample project can be converted into skinnable by your developers. They just need to uncomment two groups of lines. One is in the StdAfx.h file:
//#if (!defined __PROF_SKIN_H)
// #include <../ProfSkin/ProfSkin.h>
//#endif // (!defined __PROF_SKIN_H)
Second is in the CMainFrame::CMainFrame() constructor in the MainFrm.cpp file: // CExtPaintManagerSkin * pPM = new CExtPaintManagerSkin;
// bool bLoaded = true;
// if( ! pPM->m_Skin.Load( _T("..\\..\\Skins\\XML\\Aqua.XML") ) )
// // if( ! pPM->m_Skin.Load( _T("..\\..\\Skins\\XML\\BlackDiamond.xml") ) )
// {
// bLoaded = false;
// ::AfxMessageBox( _T("Failed to load initial skin.") );
// delete pPM;
// }
// if( bLoaded )
// g_PaintManager.InstallPaintManager( pPM );
But first of all you need a newer version of Prof-UIS library, ProfSkin library and sample projects. You can drop us an e-mail to the support mail box at this web site with your license information and we will provide your developers with the FTP download of the latest Prof-UIS source code. The HelpNotes sample application demonstrates how to show the rich editor windows instead of default Prof-UIS tooltips over toolbar buttons and menu items. The rich editor window is the standard component of Windows. The WordPad application distributed with Windows uses the rich editor window for editing .doc and .rtf files. The HelpNotes sample application displays read-only rich editor windows instead of tooltips. This rich tooltip component is implemented as part of the HelpNotes sample application - it’s not part of Prof-UIS and Prof-UIS simply doesn’t know how to skin it. Please provide us with more details about how would you like to skin these rich tooltips.
|
|
|
Isabelle Carrier
|
Aug 12, 2009 - 2:20 PM
|
Is the version2.84 new enough to make the Group Area of the Report Grid skinnable? Because I have been told that we do not want to switch the version we are using to avoid regression issues with our softwares. Thank you
|
|
|
Isabelle Carrier
|
Aug 10, 2009 - 1:27 PM
|
Thank you for the quick answer. For now I would only need the code to be able to add the XML node to the Group Area of the Report Grid so I can modify its text style and its background. Would it be possible to add skinning capabilities to the HelpNotes feature, ie to skin the box in which the RTF appears in? If yes, I would appreciate the code for that item too. Thank you very much
|
|
|
Technical Support
|
Jul 30, 2009 - 12:44 PM
|
The Prof-UIS skin is very similar to CSS in HTML. The XML file describes painting rules - not exactly defined look of each UI element. We used XML because it has tree like structure. Each UI element has its leaf node in XML. If this node does not contain enough information about how to paint an UI element then this information is searched in parent nodes. The CSS styles are using the same inheritance of one style from other. Most of UI components in Prof-UIS are skinned and have their nodes in XML skin. The ribbon bar, for instance, is not skinned yet. Some of UI elements does not have XML nodes yet and they painted using default skinned dialog window background. The group area of report grid control is such element. We can add the stand-alone skinning rule for it in the XML file and provide you company with the source code update.
We edited XML skins using Visual Studio .NET because it provides colorized XML editor with automatic text indent formatting and the Document Outline window displays tree structure of edited XML file. The Document Outline window helped us to identify what is where in the XML skin file. We can compile some of our grid samples and make them initially loading XML skin. This will let you to see how the grids are skinned. Please provide us with the full requirements list for this moment.
|
|
|
Isabelle Carrier
|
Aug 10, 2009 - 1:30 PM
|
oops... did not reply to the right block of text... here is my reply : Thank you for the quick answer. For now I would only need the code to be able to add the XML node to the Group Area of the Report Grid so I can modify its text style and its background. Would it be possible to add skinning capabilities to the HelpNotes feature, ie to skin the box in which the RTF appears in? If yes, I would appreciate the code for that item too. Thank you very much
|
|
|
Anil Siddhpura
|
Jul 29, 2009 - 12:15 AM
|
Hi,
There are some "AutoHide", "Close" and some other buttons on a window if it is created as a chield of CExtControlBar.
Now, as per my requirement i am not showing these buttons on a dockable window. But I want the effects of "AutoHide" button. Means when you click on "AutoHide" button the window is shown & when you click on it again the window is hide.
How to do that?
Thanks
|
|
|
Technical Support
|
Jul 30, 2009 - 7:48 AM
|
You wrote:
How can i attach an an image in this post? I would like to explain my problem through a bitmap image. It should not be difficult. If you have a hosting, just upload the image to that host and then reference the image from this forum, like: <img src="http://www.yourhostxyz.com/image.png"/> Please note you should turn on the Turn HTML editor off next to this forum’s message editor on the left. This allows you to type in plain html and put the above mentioned reference. If you do not have a hosting, put the image on some free hosting like http://imageshack.us/ and reference it from this forum.
|
|
|
Anil Siddhpura
|
Jul 30, 2009 - 6:09 AM
|
Hi,
How can i attach an an image in this post?
I would like to explain my problem through a bitmap image.
|
|
|
Technical Support
|
Jul 29, 2009 - 11:02 AM
|
The CExtControlBar window is designed as a container for only one child window. You can create any type of window as a child of the CExtControlBar window and control bar will simply resize its child to cover entire control bar’s client area. That’s all control bar do with its single child window. The control bar does not know any details about the type of its child window.
You can create some buttons inside your window created as the control bar’s child. You can make these buttons auto hiding or closing/hiding the control bar. If your application is based on the dynamic resizable control bars, then you should use the CExtDynamicControlBar::BarStateSet() / CExtDynamicControlBar::BarStateGet() methods for detecting and changing state of control bar. If you are using simple resizable control bar, then the CExtControlBar::AutoHideModeGet() method should be invoked first of all for checking whether the bar is auto hidden. The state of auto hidden bar should be changed to simple docked or simple hidden state with the CExtControlBar::AutoHideModeSet() method. If the bar is not auto hidden, then you should use the CControlBar::IsVisible() method for checking whether the bar is displayed and the CFrameWnd::ShowControlBar() method for displaying or hiding the bar.
|
|
|
Anil Siddhpura
|
Jul 28, 2009 - 5:52 AM
|
Hi, How to disable dockable bar?
|
|
|
Technical Support
|
Jul 29, 2009 - 11:00 AM
|
If the control bar is auto hidden, the auto hide tabs have one tab item for it. If you move mouse hovers this tab item, the auto-hidden bar appears on the screen. It’s not possible to disable this behavior because the user will not be able to guess why some tab items show auto hidden bars when some other tab items do not show bars.
|
|
|
Anil Siddhpura
|
Jul 29, 2009 - 11:23 PM
|
Hi, So is it possible to hde a perticular tab of dockable bar? Can i hide/show the tabs? Thanks
|
|
|
Technical Support
|
Jul 30, 2009 - 12:44 PM
|
To hide a tab, you should hide the bar. I.e. you should put the bar into normal non-auto-hidden mode and then hide it.
|
|
|
Technical Support
|
Jul 28, 2009 - 8:43 AM
|
You should not disable the CExtControlBar windows. They will work incorrectly. Please disable the window created as child of the CExtControlBar window. You can additionally override the following virtual method in your CExtControlBar-derived class:
virtual void OnGetBarCaptionText(
e_bar_caption_text_t eBCT,
CExtSafeString & strCaptionText
) const;
Your method should invoke the parent class method, check whether the bar is in the disabled mode or whether its child window is disabled and add the _T(" - disabled") text to the strCaptionText string. As result, if the bar caption is Some Text, then its disabled caption will be Some Text - disabled.
|
|
|
Anil Siddhpura
|
Jul 29, 2009 - 12:03 AM
|
Hi,
What i have done....
I have not derived any class from CExtControlBar, i have just created some object of CExtControlBar. And there are some other class of my Dialog which are derived from CExtResizableDialog. Now these dialog are created as a chield of CExtControlBar’s object, so it become a dockable bar.
Now, at some point of time, i want that dockable window should not come out when i move cursor to it. So is it possible to disable it or disable that dialog? or is it possible that when i move my cursor to that dockable bar, it should not come out.
Thanks
|