Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Paul Cowan
|
Aug 9, 2007 - 1:29 PM
|
Any plans on updating the CExtDateTimeWnd poup calendar to match the Vista pop-up calendar? The Vista calendar has a nice month, year chooser.
|
|
Paul Cowan
|
Aug 13, 2007 - 8:14 AM
|
It was the zoomable picker in Vista that I was referring to. This picker allows the date to be very easily selected. We are using the standard Windows control in a lot of places just so we get this feature on Vista. But then we loose the themed look.
My other request is to allow the date format to be specified. The fixed day-month-year format is very restrictive, not everyone uses this format. By default, the date should at least be displayed in the selected regional short-date format.
|
|
Technical Support
|
Aug 10, 2007 - 5:41 AM
|
The CExtDateTimeWnd class implements a small date/time picker control similar to that in Microsoft Office. We can include in our plans a zoomable date time picker like that in Vista. Do you have any additional requirements about it?
|
|
Hans Bergmeister
|
Aug 9, 2007 - 8:28 AM
|
Hello,
we just found a bug in CExtIconEditDlg. It can be easily reproduced with the IconEditor sample:
1. Build and start the IconEditor sample. 2. Double click the first icon in the list - this will open the CExtIconEditDlg window. 3. Call "Cut" in the toolbox. 4. Call "Paste".
The image is not pasted correctly.
|
|
Hans Bergmeister
|
May 19, 2008 - 8:19 AM
|
Hello, did you find a resolution for this bug in the meantime? We can easily reproduce this problem on other computers, too. We are even able to produce "blue screens" here by copying and pasting an image into itself with your IconEditor sample code. Thus this more and more turns out to be a severe problem!
|
|
Technical Support
|
May 19, 2008 - 1:24 PM
|
The really strange thing is that the crashes or incorrect pasted images can appear on some ATI cards only. It looks like the following version of the CExtImageEditWnd::IedCopyToClipboard() and CExtImageEditWnd::IedCutToClipboard() methods solves the problem: bool CExtImageEditWnd::IedCopyToClipboard(
bool bSelectionOnly // = false
) const
{
ASSERT_VALID( this );
if( !IedCanCopy( bSelectionOnly ) )
return false;
HBITMAP hBitmap = IedSelectionGetHBITMAP();
if( hBitmap == NULL )
{
ASSERT( FALSE );
return false;
}
if( ! ::OpenClipboard( GetSafeHwnd() ) )
{
ASSERT( FALSE );
return false;
}
if( ! ::EmptyClipboard() )
{
ASSERT( FALSE );
VERIFY( ::CloseClipboard() );
return false;
}
::GdiFlush();
HGLOBAL hGlobal =
CExtBitmap::stat_HBITMAPtoHGLOBAL(
hBitmap
);
if( hGlobal == NULL )
{
ASSERT( FALSE );
VERIFY( ::CloseClipboard() );
return false;
}
::SetClipboardData( CF_DIB, hGlobal );
::SetClipboardData( CF_BITMAP, (HGLOBAL)CExtBitmap::stat_CloneBitmap( hBitmap ) );
VERIFY( ::CloseClipboard() );
return true;
}
bool CExtImageEditWnd::IedCutToClipboard(
bool bSelectionOnly, // = false
bool bRedrawWnd // = true
)
{
if( !IedCanCut( bSelectionOnly ) )
return false;
HBITMAP hBitmap = IedSelectionGetHBITMAP();
if( hBitmap == NULL )
{
ASSERT( FALSE );
return false;
}
if( ! ::OpenClipboard( GetSafeHwnd() ) )
{
ASSERT( FALSE );
return false;
}
if( ! ::EmptyClipboard() )
{
ASSERT( FALSE );
VERIFY( ::CloseClipboard() );
return false;
}
::GdiFlush();
HGLOBAL hGlobal =
CExtBitmap::stat_HBITMAPtoHGLOBAL( hBitmap );
if( hGlobal == NULL )
{
ASSERT( FALSE );
VERIFY( ::CloseClipboard() );
return false;
}
::SetClipboardData( CF_DIB, hGlobal );
::SetClipboardData( CF_BITMAP, (HGLOBAL)CExtBitmap::stat_CloneBitmap( hBitmap ) );
VERIFY( ::CloseClipboard() );
CRect rcSelection = m_arrImgEditData[m_nUndoPos]->m_rcSelection;
if( rcSelection.IsRectEmpty() )
{
rcSelection = CRect( CPoint(0,0), IedSizeGet() );
ASSERT( !rcSelection.IsRectEmpty() );
IedPushUndo( __EUT_IMAGE_CUT );
} // if( rcSelection.IsRectEmpty() )
else
IedPushUndo( __EUT_SELECTION_CUT );
_EmptyCache();
{ // BLOCK: surface DC
CSurfaceDC dc( m_arrImgEditData[m_nUndoPos]->GetBmpSurface() );
dc.FillSolidRect( &rcSelection, IedColorBackgroundGet() );
} // BLOCK: surface DC
IedUndo( 0 );
if( bRedrawWnd )
{
if( (IedGetStyle() & __EIEDWS_OUTER_TOOLS) == 0 )
{
rcSelection = OnIedPicToClient( rcSelection, false );
rcSelection.InflateRect( OnIedMeasureToolSize() );
rcSelection.InflateRect( 2, 2 );
InvalidateRect( &rcSelection );
} // if( (IedGetStyle() & __EIEDWS_OUTER_TOOLS) == 0 )
else
Invalidate();
UpdateWindow();
} // if( bRedrawWnd )
return true;
}
|
|
Hans Bergmeister
|
May 20, 2008 - 9:01 AM
|
Hello, yes, the fix seems to help - at least on our computer, where we encountered this problem. Many thanks for taking care.
|
|
Technical Support
|
Aug 9, 2007 - 12:06 PM
|
We confirm this may happen in some particular situations:
1) You have copied one image and paste it into another. Both images are palette based and have different palettes. 2) You are copying/pasting on a desktop with video mode less than 24/32 bit. 3) You copied 24/32 bit image and paste it into a low color image.
The same occurs in MSPAINT.EXE (Paint Brush bitmap editor provided with any Windows OS version).
|
|
Hans Bergmeister
|
Aug 9, 2007 - 12:37 PM
|
Hello,
I am afraid, that none of the three conditions applies. Did you really try this scenario? It is my impression, that you responded without trying it yourself.
1. I call cut and paste directly after another, without anything between. Thus I copy the image and paste it into the SAME image with the SAME palette.
2. The video mode, where this occurs is 32 bit.
3. Since I don’t do anything between cut and paste, the format of the image remains unchanged.
The same does NOT occur in MSPAINT.EXE. Try the scenario yourself, please, with both, your editor and MSPAINT and you will see, that this is a clear bug in Prof-UIS, nothing else.
|
|
Technical Support
|
Aug 10, 2007 - 10:43 AM
|
Thank you for reporting the problem. We successfully reproduced the problem on one of our computers. Here are the results of testing.
Computer 1. Windows XP SP2, NVIDIA GeForce 7300GT. Works OK Computer 2. Windows Vista, NVIDIA GeForce 7300GT. Works OK Computer 3. Windows XP SP2, Gigabyte RADEON X600PRO. Bug is confirmed
We will debug the problem on the third computer. Could you tell us what video adapter you are using?
|
|
Hans Bergmeister
|
Aug 10, 2007 - 10:49 AM
|
Hello,
I am happy, that you were able now to reproduce the bug.
Here the bug occurs on Windows XP SP2, NVIDIA Quadro NVS 285, 2 x with two DVI monitors connected.
|
|
Hans Bergmeister
|
Aug 9, 2007 - 7:50 AM
|
Hello,
I have several questions regarding CExtIconEditDlg:
We want to use CExtIconEditDlg as the editor to edit bitmaps with transparent background. We have managed to integrate the dialog into our application, but have a few open questions:
1. The color palette always shows the colors already used in the bitmap. But we also want to give the user the opportunity to add more colors to the image, too. What do we have to do to get CExtIconEditDlg to show a palette with more colors than already contained in the image?
2. Additionally to the colors contained in the palette the user should have the opportunity to add custom colors by means of a color picker (if available) or a color selection dialog. Does CExtIconEditDlg provide such feature?
|
|
Technical Support
|
Aug 9, 2007 - 12:07 PM
|
You should use a CExtIconEditDlg -derived class which implements the OnInitDialog() virtual method. This method should invoke the parent class method and then modify the content of the CExtIconEditDlg::m_wndColorPalette color palette window.
|
|
Hans Bergmeister
|
Aug 9, 2007 - 12:46 PM
|
Hello,
in the meantime we overloaded OnInitDialog and load a custom color array into the color palette window. This raises the next question:
We use a blueish grey color as transparent color in our bitmaps and cannot change this. We successfully set this color as transparent in the editor and preview window of the dialog by calling dlg.m_icon.AssignFromHBITMAP(hBitmap, color); where color is our own transparent color.
However, the color palette window comes up with the colors as specified in the color array, but "Pink" (RGB(255, 0, 255) is missing in the palette. Instead "Pink" is replaced by the palette button, that normally stands for the transparency color. What is wrong?
Question 2. is still open. Does CExtIconEditDlg provide a feature to allow the customer to edit the palette colors?
|
|
Debabrata Mukherjee
|
Aug 9, 2007 - 5:57 AM
|
Hi Support,
Today we can implement, a CExtToolBoxWnd class and add items into it. the items are duely highlighted when we move the mouse over it. I did it on the lines of FormEditor, using the following:
m_wndBinsBar.ModifyToolBoxWndStyle(__TBWS_PM_BUTTONS);
How is it possible to create a view over a CExtToolBoxWnd? My current bins bar is a CExtControlBar, where i safely have Cviews over it. But how can i make that work for CExtToolBoxWnd? If I try so, no view is being shown at all for the bins. The following is the way how I create my controls on the view. One of these is a treectrl(CsaBinsTools). Now I want to change it to a tree where i can see the treeitems highlighted once i hover the mouse on it.
int CSaBinsCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) { // Let the base class do it’s thing. if (COleControl::OnCreate(lpCreateStruct) == -1) return -1;
// Create the all of the controls. SA_CATCH_ALL_BEGIN { // All of the controls will be resized during the WM_SIZE message. CRect rect(0, 0, 1, 1); // Licensing for SAIC.OCX. WCHAR szLicString[] = L"707A747B626CGNUD777E102060"; BSTR bstrLic = ::SysAllocString(szLicString); // Create the Bins themselves. Note that the "caption" text passed in // to each them will never actually be displayed to the user, so there is // no need to translate it. //UI Enhancements 6.5 CCreateContext* pContext = NULL; if (lpCreateStruct != NULL) pContext = (CCreateContext*)lpCreateStruct->lpCreateParams; if(!m_binTabPage.Create (this,rect,IDS_SABINS_TAB_PAGE,WS_CHILD|WS_VISIBLE )) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_PARTS); } //UI Enhancements 6.5 if (!m_binParts.Create("Repository Tree Control", 0, rect, this, IDC_SABINS_BIN_PARTS, NULL, FALSE, bstrLic)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_PARTS); }
if (!m_binPlanFolders.Create(NULL, "Repository Tree Control", WS_CHILD, rect, this, IDC_SABINS_BIN_RECYCLE)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_PLANS); }
if (!m_binPlanFolderRecycler.Create(NULL, "Repository Tree Control", WS_CHILD, rect, this, IDC_SABINS_BIN_PLANS)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_RECYCLE); }
if (!m_binTools.Create("Repository Tree Control", 0, rect, this, IDC_SABINS_BIN_TOOLS, NULL, FALSE, bstrLic)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_TOOLS); }
// Create the Search Engine control. Note that the "caption" text // passed in to it will never actually be displayed to the user, so // there is no need to translate it. if (!m_SearchEngine.Create("Search Engine Control", WS_VISIBLE, rect, this, IDC_SABINS_SEARCH_ENGINE, NULL, FALSE, bstrLic)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_CREATE_SEARCH_ENGINE); } // End of need for licensing information. ::SysFreeString(bstrLic); bstrLic = NULL; // Create the bin-switching controls. Note that the "caption" text // passed in to each them will never actually be displayed to the user, // so there is no need to translate it.
//UI Enhancements 6.5 if(!m_binTabPage.ItemInsert ("Parts",0,TRUE,__ETWI_GROUP_START,-1,0,FALSE)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_PARTS); } //UI Enhancements 6.5
if (!m_abtnParts.Create("Parts", BS_PUSHBUTTON | BS_OWNERDRAW, rect, /*&m_binTabPage*/this, IDC_SABINS_BSW_PARTS)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_CREATE_BSW_PARTS); }
//UI Enhancements 6.5 if(!m_binTabPage.ItemInsert ("Plans",0,TRUE,__ETWI_DISABLED,-1,0,FALSE)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_PLANS); } //UI Enhancements 6.5 if (!m_abtnPlans.Create("Plans", BS_PUSHBUTTON | BS_OWNERDRAW, rect, /*&m_binTabPage*/this, IDC_SABINS_BSW_PLANS)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_CREATE_BSW_PLANS); } //UI Enhancements 6.5 if(!m_binTabPage.ItemInsert ("Recycle",0,TRUE,__ETWI_DISABLED,-1,0,FALSE)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_RECYCLE); } //UI Enhancements 6.5
if (!m_abtnRecycle.Create("Recycle", BS_PUSHBUTTON | BS_OWNERDRAW, rect,/*&m_binTabPage*/ this, IDC_SABINS_BSW_RECYCLE)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_CREATE_BSW_RECYCLE); }
//UI Enhancements 6.5 if(!m_binTabPage.ItemInsert ("Tools",0,TRUE,__ETWI_DISABLED,-1,0,FALSE)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_BIN_CREATE_TOOLS); } //UI Enhancements 6.5
if (!m_abtnTools.Create("Tools", BS_PUSHBUTTON | BS_OWNERDRAW, rect, /*&m_binTabPage*/this, IDC_SABINS_BSW_TOOLS)) { throw new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_CREATE_BSW_TOOLS); } // Create the bin-switcher tool-tip control. m_ttipSwitchers.Create(this); // Set up each bin-switcher’s bitmaps m_abtnParts.SetBitmaps(IDB_SABINS_BSW_PARTS_ACTIVE, IDB_SABINS_BSW_PARTS_INACTIVE, IDB_SABINS_BSW_PARTS_DOWN, IDB_SABINS_BSW_PARTS_CHECKED);
m_abtnPlans.SetBitmaps(IDB_SABINS_BSW_PLANS_ACTIVE, IDB_SABINS_BSW_PLANS_INACTIVE, IDB_SABINS_BSW_PLANS_DOWN, IDB_SABINS_BSW_PLANS_CHECKED);
m_abtnTools.SetBitmaps(IDB_SABINS_BSW_TOOLS_ACTIVE, IDB_SABINS_BSW_TOOLS_INACTIVE, IDB_SABINS_BSW_TOOLS_DOWN, IDB_SABINS_BSW_TOOLS_CHECKED);
m_abtnRecycle.SetBitmaps(IDB_SABINS_BSW_RECYCLE_ACTIVE, IDB_SABINS_BSW_RECYCLE_INACTIVE, IDB_SABINS_BSW_RECYCLE_DOWN, IDB_SABINS_BSW_RECYCLE_CHECKED);
// Set up each bin-switcher’s colors. This control what // system colors get substituted for colors in the above-set bitmaps. // Bitmaps contain purple for button face. m_abtnParts.MapColor( RGB(0xFF,0x00,0xFF), COLOR_BTNFACE ); m_abtnPlans.MapColor( RGB(0xFF,0x00,0xFF), COLOR_BTNFACE ); m_abtnTools.MapColor( RGB(0xFF,0x00,0xFF), COLOR_BTNFACE ); m_abtnRecycle.MapColor( RGB(0xFF,0x00,0xFF), COLOR_BTNFACE );
// Bitmaps contain dark magenta for button hightlight. m_abtnParts.MapColor( RGB(0x80,0x00,0x80), COLOR_BTNHIGHLIGHT ); m_abtnPlans.MapColor( RGB(0x80,0x00,0x80), COLOR_BTNHIGHLIGHT ); m_abtnTools.MapColor( RGB(0x80,0x00,0x80), COLOR_BTNHIGHLIGHT ); m_abtnRecycle.MapColor( RGB(0x80,0x00,0x80), COLOR_BTNHIGHLIGHT );
// Bitmaps contain dark cyan for button shadow. m_abtnParts.MapColor( RGB(0x00,0x80,0x80), COLOR_BTNSHADOW ); m_abtnPlans.MapColor( RGB(0x00,0x80,0x80), COLOR_BTNSHADOW ); m_abtnTools.MapColor( RGB(0x00,0x80,0x80), COLOR_BTNSHADOW ); m_abtnRecycle.MapColor( RGB(0x00,0x80,0x80), COLOR_BTNSHADOW ); // Add each bin-switcher to the tool-tip control. m_abtnParts.SetToolTip(m_ttipSwitchers, IDS_SABINS_BSWTIP_PARTS); m_abtnPlans.SetToolTip(m_ttipSwitchers, IDS_SABINS_BSWTIP_PLANS); m_abtnTools.SetToolTip(m_ttipSwitchers, IDS_SABINS_BSWTIP_TOOLS); m_abtnRecycle.SetToolTip(m_ttipSwitchers, IDS_SABINS_BSWTIP_RECYCLE);
// Set up the drop targets for each bin-switcher. m_swtargParts.m_lBinType = SABINS_BINTYPE_PARTS; m_swtargParts.Register(&m_abtnParts); m_swtargPlans.m_lBinType = SABINS_BINTYPE_PLANS; m_swtargPlans.Register(&m_abtnPlans); m_swtargRecycle.m_lBinType = SABINS_BINTYPE_RECYCLED; m_swtargRecycle.Register(&m_abtnRecycle);
m_swtargTools.m_lBinType = SABINS_BINTYPE_TOOLS; m_swtargTools.Register(&m_abtnTools);
// Save the optimum switcher size, according to the size of the bitmaps. m_abtnParts.SizeToContent(); m_abtnParts.GetWindowRect(rect); m_iSwitcherHeight = rect.Height(); m_iSwitcherWidth = rect.Width(); // Allow a small gap above and below the switchers. We can’t just increase // the height of the buttons, because CBitmapButton doesn’t do vertical // centering. m_iSwitcherVerticalGap = 3; // Make the bins globally available. CSaBinsGlobals::Instance()->SetBins(&m_binParts, &m_binPlanFolderRecycler, &m_binTools, &m_binPlanFolders);
// Disable each bin until the app is done loading. EnableAllBins(FALSE);
// Associate the parts bin with the search engine. m_binParts.SetSearchEngine(&m_SearchEngine); // This is required to make F1 help processing work. Without this, // m_pMainWnd remains null, causing help commands to go to the currently // active window instead of this window. We want them to go to this // window (the control window) so that the default help processing will // occur (ID_HELP processing, etc.). AfxGetApp()->m_pMainWnd = this; } SA_CATCH_ALL_END ( // The MFC caller tries to go on if exception, so we must display the // error and return -1. CSa_Exception * pE = new CSa_Exception(SABINS_CAT_INTERNAL_ERROR, SABINS_E_CREATE_CONTROL); SaUtDisplayExceptionDlg(NULL, pE); pE->Delete(); return -1; ) return 0; }
|
|
Debabrata Mukherjee
|
Aug 21, 2007 - 9:38 AM
|
Please state us clearly whether ProfUIS supports "highlighting" of items in a list when mouse is hovered on it and collapsing/expanding of main items in the list of items .We know it exisits in the toolboxwnd class but is it possible with anyother class also implements these features? We r having problems in using the CExtToolBoxWnd as the existing code, as mentioned above has Wnds which implement treectrls. These treectrls are so interwined that we cannot eliminate them as other parts are also using it. I had sent you a number of mails regarding this from my id sanket_das1@yahoo.co.in.
Please respond to us soon.
|
|
Technical Support
|
Aug 21, 2007 - 11:21 AM
|
It seems we do not understand your question clearly enough. When you are moving the mouse pointer over toolbox (CExtToolBoxWnd ) items in the FormEditor sample application they become highlighted. Could you please send us a screenshot of any control in any known application demonstrating which highlighting you need exactly?
|
|
Debabrata Mukherjee
|
Aug 16, 2007 - 9:32 AM
|
The CExtToolBoxWnd is not letting me use many of the exisitng methods and if I derive my control from toolboxwnd, then i would hav to make many cumbersome changes. what do ya consider shld be best.
|
|
Technical Support
|
Aug 18, 2007 - 6:49 AM
|
Prof-UIS includes a quite large number of classes implementing different controls. To define notification messages for all of them would not have been reasonable because MFC dialog designers and Visual Studio Class Wizard do not work with notifications from custom controls. That is why we are using virtual methods instead. Please let us know which difficulties you have after creating your own CExtToolBoxWnd -derived class?
|
|
tera t
|
Aug 9, 2007 - 12:06 AM
|
Hello
When I do not want to make top outer cell width less than number of the identification dots. Should I use this order as follows?
ttp://profuis0.tripod.com/20070809/image01.jpg
INT CExtGridCellHeader2::OnMeasureBestFitExtent( CExtGridWnd * pWndGrid, // can be NULL CDC & dcMeasure, LONG nVisibleColNo, LONG nVisibleRowNo, LONG nColNo, LONG nRowNo, INT nColType, INT nRowType, bool bMeasuringColumnExtent ) const { ASSERT_VALID( this ); ASSERT( dcMeasure.GetSafeHdc() != NULL ); CSize _sizeMeasured = MeasureCell( pWndGrid, dcMeasure ); _sizeMeasured.cx = _sizeMeasured.cx + 16;
return bMeasuringColumnExtent ? _sizeMeasured.cx : _sizeMeasured.cy; }
|
|
Technical Support
|
Aug 9, 2007 - 8:17 AM
|
Yes, you are right. But please note your code will make all the columns wider, not only the sorted columns.
|
|
tera t
|
Aug 9, 2007 - 6:23 PM
|
Hello.
Is an argument of a Virtual function always a changed thing? (-_-;)
2.54 virtual INT OnMeasureBestFitExtent( CExtGridWnd * pWndGrid, // can be NULL CDC & dcMeasure, bool bMeasuringColumnExtent ) const;
2.7 , 2.64
virtual INT OnMeasureBestFitExtent( CExtGridWnd * pWndGrid, // can be NULL CDC & dcMeasure, LONG nVisibleColNo, LONG nVisibleRowNo, LONG nColNo, LONG nRowNo, INT nColType, INT nRowType, bool bMeasuringColumnExtent ) const;
|
|
Technical Support
|
Aug 10, 2007 - 5:37 AM
|
Typically we do not change the parameters of virtual functions. But sometimes when there is an absolute necessity, we have to change them. We are really sorry for this inconvenience.
|
|
Suhai Gyorgy
|
Aug 8, 2007 - 9:17 AM
|
Dear Support,
I’d like to use your CExtTabPageContainerOneNoteWnd control, but I’d like to remove the colorful line it has near the tabs. To understand which part I mean, please check this screenshot. How could I remove that couple of pixel of red lines and have my page starting right under the tabs?
Thank you!
|
|
Technical Support
|
Aug 8, 2007 - 10:31 AM
|
All the page container classes have the common CExtTabPageContainerWnd::PageInsert() method for registering page windows. But the One Note tab page container has its own CExtTabPageContainerOneNoteWnd::PageInsert() method for this because its method allows you to specify two gradient colors. You can specify your own colors to find more consistent color of the tab line on your screenshot. The color of this tab line is the bottom color of the selected tab item. The TabbedBars sample paints a custom background in the page windows inserted into One Note tab page container which is used as the main SDI child view there. We think this is the best way to ’hide’ the tab line you are talking about. It is also possible to make the One Note tab control of a lesser height, but we need to know more details about your task if you need this.
|
|
Suhai Gyorgy
|
Aug 8, 2007 - 2:34 PM
|
I’d like to keep the default colors, which are different for each tabitem. I’d just like to remove that line that goes beyond the tab item all along the whole tabwnd. When using CExtTabPageContainerFlatWnd, the white color of the tab item stays only inside the tab item. I’d like to achieve the same. By editing the previous screenshot, I could produce a picture showing what I need. The DevStudio tab is selected, but the green color does not go beyond the tab item.
|
|
Technical Support
|
Aug 9, 2007 - 8:29 AM
|
Please try the following improved version of the One Note tab page container class: class CTabPageContainerForChris : public CExtWRB < CExtTabPageContainerOneNoteWnd >
{
class LocalTabs : public CExtTWPC < CExtTabOneNoteWnd >
{
protected:
virtual INT OnTabWndGetParentSizingMargin(
DWORD dwOrientation
) const
{
dwOrientation;
return 0;
}
};
virtual CExtTabWnd* OnTabWndGetTabImpl()
{
return new LocalTabs;
}
}; It removes the bottom tab line But we think this makes the tab control unusable because it is hardly possible to see which tab item is selected.
|
|
Suhai Gyorgy
|
Aug 10, 2007 - 3:32 AM
|
Yes, I agree, the above code makes the tab control unusable, so I modified it a little.
In the default implementation, two different parts make up your bottom tab line (they are drawn in OnTabWndEraseClientArea method): - a colorline, which is 2-3 pixels wide and has the same color as the selected tab item, - and a tab border margin, which is 1 pixel wide and has the color COLOR_3DSHADOW.
I wanted to remove the colorline and keep only the tab border margin. I could achieve this by returning 3 in OnTabWndGetParentSizingMargin and also overriding OnTabWndEraseClientArea and providing a proper rcTabNearBorderArea parameter for the base class’ method.
Keeping the tab border margin makes the tab window usable just the same. Thank you for putting me to the right path!
|
|
George Freewood
|
Aug 3, 2007 - 7:37 AM
|
Hello,
we want to create a toolbar button with some kind of associated drop down menu. But instead of displaying the normal CExtPopupMenuWnd we need to display a custom popup window, when the drop down arrow of the toolbar button is being clicked.
For this reason we are trying to disable the CExtPopupMenuWnd, while still leaving the drop down arrow in the tool bar button be enabled.
We looked into your source code and detected, that setting the flag CExtPopupMenuWnd::MsgPrepareMenuData_t::m_bMenuCanceled to true may work here.
Indeed this almost seems exactly to do, what we want to do - with one problem: ProfUIS crashes due to a duplicate call to the destructor of the CExtPopupMenuWnd object.
Is this the intended result, when somebody sets this flag?
|
|
Technical Support
|
Aug 3, 2007 - 10:33 AM
|
You should use the toolbar button class listed below. What you should only do is to put your own popup window tracking code into it: class CYourButton : public CExtBarButton
{
public:
DECLARE_DYNCREATE( CYourButton );
CYourButton(
CExtToolControlBar * pBar = NULL,
UINT nCmdID = ID_SEPARATOR,
UINT nStyle = 0
)
: CExtBarButton( pBar, nCmdID, nStyle )
{
}
virtual ~CYourButton()
{
}
virtual bool IsAbleToTrackMenu(
bool bCustomizeMode = false
) const
{
ASSERT_VALID( this );
if( bCustomizeMode )
return false;
return true;
}
virtual UINT OnTrackPopup(
CPoint point,
bool bSelectAny,
bool bForceNoAnimation
)
{
. . .
}
}; You can use the CExtBarColorButton::OnTrackPopup() method’s source code as an example.
|
|
George Freewood
|
Aug 3, 2007 - 11:07 AM
|
Hello,
I was already afraid, that this is your answer. This solution is very long-winded and rather static, because it requires creation of an own toolbar class and creation of an own button class at all places, where such feature is desired.
Wouldn’t it be much simpler, more dynamic and more generic, if each popup menu could be cancelled at any time at runtime by simply setting a bit in the CExtPopupMenuWnd::g_nMsgPrepareMenu message handler? As I mentioned in my previous article this bit is already there in Prof-UIS. What about simply making this bit working without leading the application to crash?
|
|
Technical Support
|
Aug 6, 2007 - 8:01 AM
|
We do not agree that the solution is long winded. When a pop-up menu is open and then you set the mouse pointer over some other button with pop-up menu (e.g. in the menu bar), the pop-up menu will be closed and the new pop-up menu appears.So the Prof-UIS pop-up works in conjunction with drop-down buttons and it is not enough just to cancel the Prof-UIS pop-up menu and show your own one.
|
|
Andrew Banks
|
Aug 2, 2007 - 3:35 PM
|
I tried void CExtGrid::OnGetPrintableDocTitle( CExtSafeString & strPrintableDocTitle ) { strPrintableDocTitle = "DocTitle" ; }
to print a grid title. It is called but a title does not print.
How do I print a title for a grid?
|
|
Technical Support
|
Aug 3, 2007 - 9:42 AM
|
The titles are currently not supported in the printing subsystem. This virtual method was added to make the APIs similar to MFC views.
|
|
Andrew Banks
|
Aug 7, 2007 - 2:15 PM
|
Any chance of allowing a grid title to be printed.
|
|
Technical Support
|
Aug 9, 2007 - 8:28 AM
|
You could export the content of the grid control into Excel or HTML and print it in this case.
|
|
Michael Clapp
|
Aug 2, 2007 - 12:51 PM
|
I have having trouble deleting a CExtTabbedToolControlBar object that I’ve created in my mainframe class..
I’ve set the autodelete flag on when creating it:
m_tabbar = new CAgtekTabBar();
m_tabbar->Create(_T("Tab Bar"), this, ID_VIEW_TABBEDBAR); m_tabbar->m_bAutoDelete = true; m_tabbar->EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM);
DockControlBar( m_tabbar, CBRS_ALIGN_TOP); ShowControlBar( m_tabbar,TRUE, FALSE);
In my mainframe OnDestroy, I get an unhandled exception when the tabbar is attempted to be deleted (verifying by inspected the window handle of the window to be deleted in CWnd::DestroyWindow()
The stack is:
ProfUIS264nd.dll!CArray<CExtHookSink *,CExtHookSink *>::GetSize() Line 279 + 0x11 bytes C++ ProfUIS264nd.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=130, unsigned int & wParam=0, long & lParam=0) Line 239 + 0xb bytes C++ ProfUIS264nd.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00c01272, unsigned int nMessage=130, unsigned int wParam=0, long lParam=0) Line 287 + 0x14 bytes C++ user32.dll!7e418734() [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll] user32.dll!7e41d05b() user32.dll!7e41b4c0() user32.dll!7e41dabd() ntdll.dll!7c90eae3() user32.dll!7e41daf6() mfc80d.dll!CWnd::DestroyWindow() Line 993 + 0xd bytes C++ > Highway3D.exe!CExtNCW<CMDIFrameWnd>::DestroyWindow() Line 453 C++ Highway3D.exe!CMainFrame::DestroyWindow() Line 325 C++ mfc80d.dll!CFrameWnd::OnClose() Line 849 C++ Highway3D.exe!CMainFrame::OnClose() Line 286 C++ mfc80d.dll!CWnd::OnWndMsg(unsigned int message=16, unsigned int wParam=0, long lParam=0, long * pResult=0x0021f294) Line 2028 C++ mfc80d.dll!CWnd::WindowProc(unsigned int message=16, unsigned int wParam=0, long lParam=0) Line 1741 + 0x20 bytes C++ Highway3D.exe!CExtNCW<CMDIFrameWnd>::WindowProc(unsigned int message=16, unsigned int wParam=0, long lParam=0) Line 413 + 0x14 bytes C++ mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x0e85f290, HWND__ * hWnd=0x00591130, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0) Line 240 + 0x1c bytes C++ mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00591130, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0) Line 389 C++ mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00591130, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0) Line 411 + 0x15 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e41c63f() user32.dll!7e41f65d() ProfUIS264nd.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=16, unsigned int & wParam=0, long & lParam=0) Line 236 + 0x20 bytes C++ ProfUIS264nd.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00591130, unsigned int nMessage=16, unsigned int wParam=0, long lParam=0) Line 287 + 0x14 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e41b4c0() user32.dll!7e41b50c() ntdll.dll!7c90eae3() user32.dll!7e4194be() user32.dll!7e41b42d() user32.dll!7e4184fc() user32.dll!7e41ba0e() user32.dll!7e4184fc() user32.dll!7e4185a4() user32.dll!7e41d598() uxtheme.dll!5ad73c20() uxtheme.dll!5ad8e300() uxtheme.dll!5ad71ac7() uxtheme.dll!5ad7367a() uxtheme.dll!5ad8e2d5() user32.dll!7e42f11d() user32.dll!7e43e535() user32.dll!7e4308a6() user32.dll!7e41b96b() mfc80d.dll!CMDIFrameWnd::AssertValid() Line 385 + 0x1c bytes C++ mfc80d.dll!CThreadSlotData::GetThreadValue(int nSlot=2226356) Line 265 C++ 0263c798() user32.dll!7e44f720() mfc80d.dll!CMDIFrameWnd::DefWindowProcA(unsigned int nMsg=274, unsigned int wParam=61536, long lParam=10223642) Line 188 C++ mfc80d.dll!CWnd::Default() Line 274 C++ mfc80d.dll!CWnd::OnSysCommand(unsigned int __formal=61536, unsigned int __formal=61536) Line 460 + 0xf bytes C++ mfc80d.dll!CFrameWnd::OnSysCommand(unsigned int nID=61536, long lParam=10223642) Line 1046 C++ mfc80d.dll!CWnd::OnWndMsg(unsigned int message=274, unsigned int wParam=61536, long lParam=10223642, long * pResult=0x0021fa70) Line 2056 C++ mfc80d.dll!CWnd::WindowProc(unsigned int message=274, unsigned int wParam=61536, long lParam=10223642) Line 1741 + 0x20 bytes C++ Highway3D.exe!CExtNCW<CMDIFrameWnd>::WindowProc(unsigned int message=274, unsigned int wParam=61536, long lParam=10223642) Line 413 + 0x14 bytes C++ mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x0e85f290, HWND__ * hWnd=0x00591130, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=10223642) Line 240 + 0x1c bytes C++ mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x00591130, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=10223642) Line 389 C++ mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x00591130, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=10223642) Line 411 + 0x15 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e41c63f() user32.dll!7e41f65d() ProfUIS264nd.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=274, unsigned int & wParam=61536, long & lParam=10223642) Line 236 + 0x20 bytes C++ ProfUIS264nd.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00591130, unsigned int nMessage=274, unsigned int wParam=61536, long lParam=10223642) Line 287 + 0x14 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e4189cd() user32.dll!7e4196c7() mfc80d.dll!AfxInternalPumpMessage() Line 183 C++ mfc80d.dll!CWinThread::PumpMessage() Line 896 C++ mfc80d.dll!CWinThread::Run() Line 625 + 0xd bytes C++ mfc80d.dll!CWinApp::Run() Line 894 C++ mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00241f12, int nCmdShow=1) Line 47 + 0xd bytes C++ Highway3D.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00241f12, int nCmdShow=1) Line 33 C++ Highway3D.exe!__tmainCRTStartup() Line 589 + 0x35 bytes C Highway3D.exe!WinMainCRTStartup() Line 414 C kernel32.dll!7c816fd7() Highway3D.exe!C2DView::DrawPolyPlus(CDC * pDC=0x00630069, CPolyLines * pLines=0x0065004b, bool bPrinting=true) Line 673 + 0x11 bytes C++ Highway3D.exe!C3DView::EditStrataNames(bool bAllowDelete=true) Line 9317 + 0x37 bytes C++ 15ff00b7()
|
|
Michael Clapp
|
Aug 2, 2007 - 4:49 PM
|
1) Yes, a similar crash occurs in TabbedBars if m_bAutoDelete is set after a tabbedToolControlBar is created:
ntdll.dll!7c901230() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!7c96c943() ntdll.dll!7c96cd80() ntdll.dll!7c960af8() kernel32.dll!7c85e9cf() msvcr80d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x01e70ec8) Line 2072 C++ msvcr80d.dll!_free_dbg_nolock(void * pUserData=0x01e70ec8, int nBlockUse=0x00c00004) Line 1279 + 0x9 bytes C++ msvcr80d.dll!_free_dbg(void * pUserData=0x01e70ec8, int nBlockUse=0x00c00004) Line 1220 + 0xd bytes C++ mfc80d.dll!CObject::operator delete(void * p=0x01e70ec8) Line 42 + 0xf bytes C++ > ProfUIS264md.dll!CExtTabbedToolControlBar::`vector deleting destructor’() + 0x68 bytes C++ mfc80d.dll!CControlBar::PostNcDestroy() Line 204 + 0x21 bytes C++ ProfUIS264md.dll!CExtControlBar::PostNcDestroy() Line 8086 C++ mfc80d.dll!CWnd::OnNcDestroy() Line 850 C++ mfc80d.dll!CWnd::OnWndMsg(unsigned int message=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000, long * pResult=0x0012e2a4) Line 2028 C++ mfc80d.dll!CWnd::WindowProc(unsigned int message=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 1741 + 0x20 bytes C++ mfc80d.dll!CControlBar::WindowProc(unsigned int nMsg=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 504 + 0x14 bytes C++ ProfUIS264md.dll!CExtControlBar::WindowProc(unsigned int message=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 8519 C++ ProfUIS264md.dll!CExtToolControlBar::WindowProc(unsigned int message=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 12651 C++ ProfUIS264md.dll!CExtTabbedToolControlBar::WindowProc(unsigned int message=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 511 + 0x14 bytes C++ mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01e70ec8, HWND__ * hWnd=0x002c04a6, unsigned int nMsg=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 240 + 0x1c bytes C++ mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x002c04a6, unsigned int nMsg=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 389 C++ mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x002c04a6, unsigned int nMsg=0x00000082, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 411 + 0x15 bytes C++ user32.dll!7e418734() user32.dll!7e41d05b() user32.dll!7e41b4c0() user32.dll!7e41dabd() ntdll.dll!7c90eae3() user32.dll!7e41daf6() mfc80d.dll!CWnd::DestroyWindow() Line 993 + 0xd bytes C++ mfc80d.dll!CControlBar::DestroyWindow() Line 598 C++ ProfUIS264md.dll!CExtControlBar::DestroyWindow() Line 8098 C++ mfc80d.dll!CFrameWnd::DestroyDockBars() Line 1622 C++ mfc80d.dll!CFrameWnd::OnDestroy() Line 856 C++ mfc80d.dll!CWnd::OnWndMsg(unsigned int message=0x00000002, unsigned int wParam=0x00000000, long lParam=0x00000000, long * pResult=0x0012e9fc) Line 2028 C++ mfc80d.dll!CWnd::WindowProc(unsigned int message=0x00000002, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 1741 + 0x20 bytes C++ TabbedBars-md.exe!CExtNCW<CFrameWnd>::WindowProc(unsigned int message=0x00000002, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 326 + 0x14 bytes C++ mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01e70068, HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000002, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 240 + 0x1c bytes C++ mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000002, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 389 C++ mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000002, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 411 + 0x15 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e41c63f() user32.dll!7e41f65d() ProfUIS264md.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=0x00000002, unsigned int & wParam=0x00000000, long & lParam=0x00000000) Line 236 + 0x20 bytes C++ ProfUIS264md.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x003e0446, unsigned int nMessage=0x00000002, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 287 + 0x14 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e41b4c0() user32.dll!7e41b50c() ntdll.dll!7c90eae3() user32.dll!7e41daf6() mfc80d.dll!CWnd::DestroyWindow() Line 993 + 0xd bytes C++ TabbedBars-md.exe!CMainFrame::DestroyWindow() Line 786 C++ mfc80d.dll!CFrameWnd::OnClose() Line 849 C++ mfc80d.dll!CWnd::OnWndMsg(unsigned int message=0x00000010, unsigned int wParam=0x00000000, long lParam=0x00000000, long * pResult=0x0012f144) Line 2028 C++ mfc80d.dll!CWnd::WindowProc(unsigned int message=0x00000010, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 1741 + 0x20 bytes C++ TabbedBars-md.exe!CExtNCW<CFrameWnd>::WindowProc(unsigned int message=0x00000010, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 326 + 0x14 bytes C++ mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01e70068, HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000010, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 240 + 0x1c bytes C++ mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000010, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 389 C++ mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000010, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 411 + 0x15 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e41c63f() user32.dll!7e41f65d() ProfUIS264md.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=0x00000010, unsigned int & wParam=0x00000000, long & lParam=0x00000000) Line 236 + 0x20 bytes C++ ProfUIS264md.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x003e0446, unsigned int nMessage=0x00000010, unsigned int wParam=0x00000000, long lParam=0x00000000) Line 287 + 0x14 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e4318e3() user32.dll!7e41b4c0() user32.dll!7e41b50c() ntdll.dll!7c90eae3() user32.dll!7e4194be() user32.dll!7e41b42d() user32.dll!7e4184fc() user32.dll!7e4185a4() user32.dll!7e41d598() uxtheme.dll!5ad71af6() user32.dll!7e41d4ee() mfc80d.dll!CThreadLocalObject::GetData(CNoTrackObject * (void)* pfnCreateObject=0x003e0446) Line 419 + 0x11 bytes C++ user32.dll!7e42f11d() user32.dll!7e41d4ee() user32.dll!7e418734() user32.dll!7e41d4ee() user32.dll!7e41d4ee() user32.dll!7e418816() user32.dll!7e41d4ee() user32.dll!7e41d4ee() user32.dll!7e41c63f() user32.dll!7e41d4ee() user32.dll!7e41f65d() user32.dll!7e41d4ee() mfc80d.dll!CWnd::DefWindowProcA(unsigned int nMsg=0x00000112, unsigned int wParam=0x0000f060, long lParam=0x0096002e) Line 1029 + 0x20 bytes C++ mfc80d.dll!CWnd::Default() Line 274 C++ mfc80d.dll!CWnd::OnSysCommand(unsigned int __formal=0x0000f060, unsigned int __formal=0x0000f060) Line 460 + 0xf bytes C++ mfc80d.dll!CFrameWnd::OnSysCommand(unsigned int nID=0x0000f060, long lParam=0x0096002e) Line 1046 C++ mfc80d.dll!CWnd::OnWndMsg(unsigned int message=0x00000112, unsigned int wParam=0x0000f060, long lParam=0x0096002e, long * pResult=0x0012f9dc) Line 2056 C++ mfc80d.dll!CWnd::WindowProc(unsigned int message=0x00000112, unsigned int wParam=0x0000f060, long lParam=0x0096002e) Line 1741 + 0x20 bytes C++ TabbedBars-md.exe!CExtNCW<CFrameWnd>::WindowProc(unsigned int message=0x00000112, unsigned int wParam=0x0000f060, long lParam=0x0096002e) Line 326 + 0x14 bytes C++ mfc80d.dll!AfxCallWndProc(CWnd * pWnd=0x01e70068, HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000112, unsigned int wParam=0x0000f060, long lParam=0x0096002e) Line 240 + 0x1c bytes C++ mfc80d.dll!AfxWndProc(HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000112, unsigned int wParam=0x0000f060, long lParam=0x0096002e) Line 389 C++ mfc80d.dll!AfxWndProcBase(HWND__ * hWnd=0x003e0446, unsigned int nMsg=0x00000112, unsigned int wParam=0x0000f060, long lParam=0x0096002e) Line 411 + 0x15 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e41c63f() user32.dll!7e41f65d() ProfUIS264md.dll!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=0x00000112, unsigned int & wParam=0x0000f060, long & lParam=0x0096002e) Line 236 + 0x20 bytes C++ ProfUIS264md.dll!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x003e0446, unsigned int nMessage=0x00000112, unsigned int wParam=0x0000f060, long lParam=0x0096002e) Line 287 + 0x14 bytes C++ user32.dll!7e418734() user32.dll!7e418816() user32.dll!7e4189cd() user32.dll!7e4196c7() mfc80d.dll!AfxInternalPumpMessage() Line 183 C++ mfc80d.dll!CWinThread::PumpMessage() Line 896 C++ mfc80d.dll!CWinThread::Run() Line 625 + 0xd bytes C++ mfc80d.dll!CWinApp::Run() Line 894 C++ mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f11, int nCmdShow=0x00000001) Line 47 + 0xd bytes C++ TabbedBars-md.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f11, int nCmdShow=0x00000001) Line 33 C++ TabbedBars-md.exe!__tmainCRTStartup() Line 589 + 0x35 bytes C TabbedBars-md.exe!WinMainCRTStartup() Line 414 C kernel32.dll!7c816fd7()
2) If I comment out the m_tabbar->m_bAutoDelete , then I also see the crash
|
|
Technical Support
|
Aug 6, 2007 - 8:04 AM
|
Would you send the modified version of the TabbedBars sample (which crashes) to us?
|
|
Technical Support
|
Aug 2, 2007 - 2:22 PM
|
Would you tell us if it is possible to reproduce this problem using the TabbedBars sample? Does it disappear if you comment out the m_tabbar->m_bAutoDelete = true; code (disregard some memory leaks in this case, just try to reproduce the crash)?
|
|
Pawel Kalinowski
|
Aug 2, 2007 - 4:14 AM
|
Hi!
Just noticed that if you move the mouse over a ribbon button, wait for about 1s and then press it (works best if the button has some sort of a popup), then the screen tip frame will appear below the popup and stay there - empty, you can see only the bottom/right part/shadow. What’s worse, the frame remains until you deactivate the window or move the mouse over it’s parent ribbon button again.
Sorry there’s no screenshot this time, but as I said, the effect disappears when you deactivate the window.
Regards
|
|
Technical Support
|
Aug 2, 2007 - 2:15 PM
|
We confirm this bug in the ribbon. We will fix it in the next release. Thank you.
|
|
George Freewood
|
Aug 2, 2007 - 2:23 AM
|
Hello,
in another thread with a similar title two questions remained open:
1. If the support of a themed CListCtrl is not possible, would it be at least possible to get a themed CHeaderCtrl in Prof-UIS? 2. You mentioned problems to achieve a "themed background" of a CListCtrl. But what is meant with such themed background?
|
|
Technical Support
|
Aug 2, 2007 - 2:13 PM
|
1. We added the "skinned CExtHeaderCtrl and CListCtrl" item to our TO-DO list. We need to repaint header items using the same APIs which paint report grid’s header cells.
2. We did not mean anything special about skinning the client area of the list view control and just thought you may have some ideas about this.
|
|
Hans Bergmeister
|
Jan 11, 2008 - 3:05 AM
|
Hello,
is there any progress regarding a skinned CExtHeaderCtrl ?
|
|
George Freewood
|
Aug 3, 2007 - 2:11 AM
|
Hello,
re 1. Many thanks for adding this to your list. In the meantime we helped ourselves with an intermediate solution by using a hidden report grid window with just one cell and calling the CExtPaintManager::ReportGrid_PaintHeaderRowBackground() and CExtReportGridWnd::OnGbwPaintCell() APIs in a custom draw handler of our own version of a themed CHeaderCtrl.
It looks nice, but the implementation would be more perfect and clean, if we could go without the hidden report grid.
re 2. Now I understand. With "no ideas" you appearently wanted to say, that you don’t know _what_ to do. Originally I understood _how_ to do and couldn’t imagine, that this is a real problem for you expert guys ;-)
Anyway, I can actually provide some ideas: we created a themed CListCtrl, too. It subclasses our own themed CHeaderCtrl. Furthermore it uses g_CExtPaintManager::GetColor(COLOR_3DFACE) as the color to highlight the selection and to draw grid lines in report mode, if any.
Both, the header and the list now perfectly fit to the appearance of our applications.
BTW: if you are doing a themed CListCtrl anyway then it would be a useful enhancement, too, if you offer an option, with which the "sort column" in report view could be specified. If this is done, then the header ctrl should show an arrow in the related item and the column itself should be slightly highlighted - exactly the same way as the Windows Explorers looks like in report view on Windows XP. This feature is missing in the standard CListCtrl.
|
|
Technical Support
|
Aug 3, 2007 - 11:13 AM
|
Thank you for your explanations. The sortable feature in list view controls in the report mode can be easily found on the Internet and we even have our own implementation of this feature in the source code of some old projects. So, we will treat it as the most important requirement for skinned header control and scroll bars. It is not a problem to add sorting to this class. It should be compatible with any custom drawn list view items in scope of your projects
|
|
George Freewood
|
Aug 3, 2007 - 1:16 PM
|
Hello,
sounds great! Many thanks in advance.
|
|
Andrew Banks
|
Aug 1, 2007 - 11:40 AM
|
Hi,
I cant find anything to change portrait/landscape and paper size in the print function of CExtGridWnd .
I know I can use print setup to change these, but, for the users, they dont want to do this everytime.
In other words, If i have a grid that can be printed on legal, landscape mode and not produce multiple pages for the across dimension, then it would be more user friendly.
Do you have this?
|
|
Technical Support
|
Aug 1, 2007 - 12:54 PM
|
The File | Print Setup menu command in the ReportGrid and SimpleGrids sample applications allows you to change the Portrait/Landscape page orientation. If you have a CExtPPVW -based control, then its m_pWndPP->m_pPpvPrintPreviewInfo->m_pPD->m_pd property (which is the PRINTDLG data structure ) can be used to change the paper orientation programmatically. The PRINTDLG::hDevMode member specifies the memory containing the DEVMODE,/code> data structure which have the <code>DEVMODE::dmOrientation member (DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE values can be specified in it). Additional tricks about printer settings are described in this article.
|
|
Andrew Banks
|
Aug 1, 2007 - 1:32 PM
|
Thanks, however, just prior to CExtPPVW < CExtGridWnd > :: OnCmdMsg( nID,nCode,pExtra,pHandlerInfo ) with nID == ID_FILE_PRINT
m_pWndPP is NULL.
Therefore, m_pWndPP is being set before printing.
What do I need to override to get to a non-NULL m_pWndPP.
|
|
Technical Support
|
Aug 6, 2007 - 8:06 AM
|
We confirm the NULL value issue. Please override the CExtPPVW_Printable::OnInitializePrintPreviewToolBar() virtual method. This method is invoked to create the built-in toolbar after the print preview window environment has been created and configured.
|
|
Michael Clapp
|
Aug 1, 2007 - 10:48 AM
|
I’ve been able to add a menu item dynamically using OnExtMenuPrepare and pPopup->ItemInsertCommand .
I also set pData->m_bMenuChanged = true;
However, I’ve observed that when CExtPopupMenuWnd::_UpdateCmdUI() is called, the CmdUI for this menu item does not get called because _state.m_pItemDataActive->IsNoCmdUI() returns true. It seems like the m_bNoCmdUI flag gets set to true whenever ItemInsertCommand gets called.
|
|
Technical Support
|
Aug 1, 2007 - 11:41 AM
|
You should use the CExtPopupMenuWnd::ItemInsertCommand() method if you do not want to see the MFC’s command updating mechanism applied to the inserted command item. You should use the CExtPopupMenuWnd::ItemInsert() method otherwise.
|
|
Massimo Germi
|
Aug 1, 2007 - 10:27 AM
|
Hi to all, I have difficulty to create an application, dialog based, witch is initially hided. When I call ShowWindow(SW_HIDE) doesn’t appears.
Do tou have any suggestions?
tx a lot
|
|
Technical Support
|
Aug 1, 2007 - 11:45 AM
|
The DoModal() method shows the dialog window even if the dialog resource is not configured as visible. You should create your dialog using the Create() method. The dialog should instantiated in dynamic memory and the CWinApp::m_pMainWnd pointer should point to your dialog. This dialog will be invisible if the dialog resource is not configured as visible.
|
|
Massimo Germi
|
Aug 1, 2007 - 8:11 AM
|
Hi to all, My application says: C:\Develop\Prof-UIS\Src\ExtCmdIcon.cpp(6832) : {918} normal block at 0x019A0028, 1120 bytes long. ... ... In the following point LPVOID CExtBitmap::stat_AllocLL( ULONG amount, ULONG alignment ) { Here -> LPBYTE mem_real = new BYTE[ amount + alignment ];
|
|
Technical Support
|
Aug 1, 2007 - 11:28 AM
|
This memory leak relates to a CExtBitmap object that is not dellocated. Any CExtCmdIcon object stored in the global command manager contains CExtBitmap objects describing icon surfaces. This memory leak can occur if your application is terminated with an exception and the destructors of global variables are not invoked.
|
|
Suhai Gyorgy
|
Aug 1, 2007 - 7:01 AM
|
Dear Support,
I’ve overriden CExtReportGridWnd::OnReportGridColumnCtxMenuConstruct method to remove some menu items and change the text of the default context menu. But now I need the menu to be resized because of the changes. Please, advise!
I know how to do it with the usage of CExtPopupMenuWnd::g_nMsgPrepareOneMenuLevel message, but I’d like to handle this menu inside my ReportGrid-derived class, not in MainFrame (which already handles other popup menus through CExtPopupMenuWnd::g_nMsgPrepareOneMenuLevel )
Thank you!
|
|
Technical Support
|
Aug 1, 2007 - 11:32 AM
|
The modified report grid’s context menu should have been resized taking into account its items. Could you send us a screenshot demonstrating the incorrect menu size?
|
|
Suhai Gyorgy
|
Aug 2, 2007 - 2:14 AM
|
I could reproduce the problem in your ReportGird sample. The overriden method is like follows: bool CChildView::OnReportGridColumnCtxMenuConstruct(
CExtPopupMenuWnd * pPopup,
CWnd * pWndSrc,
CExtReportGridColumn * pRGC,
DWORD & dwMenuTrackingFlags
)
{
if ( !CExtReportGridWnd::OnReportGridColumnCtxMenuConstruct( pPopup, pWndSrc, pRGC, dwMenuTrackingFlags ) )
return false;
for ( int i = 0; i < pPopup->ItemGetCount(); i++ ) {
if ( pPopup->ItemGetCmdID(i) == ID_EXT_RG_CTX_SORT_ASCENDING ) {
pPopup->ItemSetPopupText( i, _T("This is a very long text for testing") );
}
}
return true;
}
Here’s a screenshot. But after developing further, we added a new command in this popup menu with the following code placed just before the for loop: if ( !g_CmdManager->CmdIsRegistered(g_CmdManager->ProfileNameFromWnd( GetSafeHwnd() ), ID_GRID_CTX_UNGROUP_ALL) ) {
CExtCmdItem * pCmdItem = g_CmdManager->CmdAllocPtr(
g_CmdManager->ProfileNameFromWnd( GetSafeHwnd() ),
ID_GRID_CTX_UNGROUP_ALL );
ASSERT( pCmdItem != NULL );
pCmdItem->m_sMenuText = _T("My Command");
g_CmdManager->CmdSetup( g_CmdManager->ProfileNameFromWnd( GetSafeHwnd() ), *pCmdItem );
}
pPopup->ItemInsert(ID_GRID_CTX_UNGROUP_ALL, 6);
This time the popup menu gets resized to the proper size. Screenshot.
|
|
Technical Support
|
Aug 2, 2007 - 12:56 PM
|
Thank you for the detailed description. We have fixed the problem by adding one line of code: bool OnReportGridColumnCtxMenuConstruct(
CExtPopupMenuWnd * pPopup,
CWnd * pWndSrc,
CExtReportGridColumn * pRGC,
DWORD & dwMenuTrackingFlags
)
{
if ( !CExtReportGridWnd::OnReportGridColumnCtxMenuConstruct( pPopup, pWndSrc, pRGC, dwMenuTrackingFlags ) )
return false;
for( int i = 0; i < pPopup->ItemGetCount(); i++ )
{
if( pPopup->ItemGetCmdID(i) == /*ID_EXT_RG_CTX_SORT_ASCENDING*/ 30453 )
{
pPopup->ItemSetPopupText( i, _T("This is a very long text for testing") );
}
}
pPopup->_SyncItems(); // THIS LINE WAS ADDED
return true;
}
|
|
tera t
|
Aug 1, 2007 - 3:50 AM
|
Hello
If there are samples, please teach it
|
|
Technical Support
|
Aug 1, 2007 - 11:33 AM
|
Please let us know which parts of the grid control should be copied/pasted? One grid cell only? Full rows/columns? All the selected grid cells?
|
|
Technical Support
|
Aug 1, 2007 - 11:35 AM
|
The grid window is designed as a general purpose control for displaying table like data, where each cell object is an instance of some cell class which keeps its specific data and implements its behavior. The grid window knows nothing about which kind of data is stored in cell objects and which behavior they implement. So, that is why we did not include built-in copy/paste API. All the grid cells support run-time type information, serialization, cloning and assignment features. These features make them ready for the copy/paste operation, but generally the grid window is unable to know whether the pasted cells should replace instances of existing cells independently from cell types or whether the data type conversion should be performed instead. This is a very important detail because some particular grid may need to keep cells of appropriate type in some columns and/or rows. If you need simply copy/paste the cell’s text, we think it can be implemented locally in your application. You need to walk through the selected cells and invoke the TextGet() /TextSet() method for each of them according to the format of the data in the clipboard.
|
|
Ian McIntosh
|
Jul 31, 2007 - 11:26 AM
|
Hi, If I maximise my app, then minimise it, then maximise it again, the automatic resizing is slightly (but noticeably) different from the resizing on the first maximise. If I then press restore, the app seems to be restored then immediately re-maximized, this time with the initial resizing. I can demonstrate part of this problem using the RibbonBarMDI sample (profUIS 2.70, MBCS debug). Build & run, maximize, minimize then restore. The app seems to restore then immediately maximize again. This doesn’t demonstrate the different resizing issue, but hopefully give you enough to fix it.
|
|
Ian McIntosh
|
Aug 14, 2007 - 9:45 AM
|
|
|
Technical Support
|
Aug 2, 2007 - 2:19 PM
|
Thank you for reporting the bug, Ian. We are working on this and hope to have it fixed soon.
|
|
Adam Keadey
|
Jul 31, 2007 - 9:54 AM
|
I’m using the CExtGridCellPicture and loading it using CExtBitmap.
I want the image to be transparent on a color.
|
|
Technical Support
|
Jul 31, 2007 - 11:28 AM
|
You can make some color transparent by using the code like as follows: // We want to make RGB(255,0,255) transparent
m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 ); Please note that if you are using a 32-bpp bitmap, then you have to do nothing. Bitmaps with alpha channel are fully supported in Prof-UIS.
|
|
Adam Keadey
|
Jul 30, 2007 - 9:21 AM
|
I have a CExtGridCellPicture in a CReportGridWnd and I want the set the row height for each row to the actual size of the picture?
The row height for each row could be different depending on the image.
I do not allow the row height to be resized through drop and drag.
|
|
Technical Support
|
Jul 30, 2007 - 10:31 AM
|
You should invoke the BestFitRow() method after all its cells, including pictures, were initialized.
|
|
Adam Keadey
|
Jul 31, 2007 - 10:19 AM
|
BestFitRow takes the row number and I have the CExtReportGridItem.
How can I get the RowNumber?
When is the best time to call BestFitRow? Should I just call it every time I update and item in the grid?
I have and UpdateItem Function that roughly follows
Update the item from ReportGridItem
ReportSortOrderUpdate
|
|
Technical Support
|
Aug 1, 2007 - 11:37 AM
|
Actually the question is how to convert a CExtReportGridItem object into the row number so it can be used in the BestFitRow() method. If so, you can do this using the CExtTreeGridWnd::ItemGetVisibleIndexOf() method: LONG nRowNo = ItemGetVisibleIndexOf( *pRGI );
|
|