Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS Tech Support » Problems with CExtGridCellFile under Windows 98 Collapse All
Subject Author Date
Andrew Cochran Jul 19, 2006 - 3:12 AM

When I use CExtGridCellFile to give users an ability for enter path to file, dialog doesn’t appear when my program is launched under Windows 98. But in WinXP everything is OK!

Please suggest how can I give my program the ability to show file dialog in Win98, when user is clicking the button on CExtGridCellFile.

Thanks.

Technical Support Jul 19, 2006 - 9:05 AM

We tested CExtGridCellFile on Windows 98 and found no problems. The file open dialog always appears. This is implemented in the CExtGridCellFile::OnButtonPressed() virtual method. Of course, you can override this method in your class and implement any custom behavior.

Andrew Cochran Jul 20, 2006 - 1:59 AM

Thnks. But I still have the problem when using CExtGridCellFile only. I’ve created a CExtGridCellFile derived class and call my FileDialog class in OnButtonPressed method. Now it works.

May be it depends on MY version of Windows 98.

Best regards!

Technical Support Jul 20, 2006 - 6:33 AM

We tested CExtGridCellFile on Windows 98 SE. Please let us see your variant of the OnButtonPressed() method.

Andrew Cochran Jul 24, 2006 - 1:38 AM

Here it is

virtual void OnButtonPressed(
CExtGridWnd & wndGrid,
INT /*nButtonType*/,
const RECT & /*rcCellExtra*/,
const RECT & /*rcCell*/,
LONG /*nVisibleColNo*/,
LONG /*nVisibleRowNo*/,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType
)
{
Dialogs::FileDialog dlg(true, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT
, L"Bitmap files (*.bmp)|*.bmp|GIF Files (*.gif)|*.gif|JPEG Files (*.jpg; *.jpeg)|*.jpg;*.jpeg|PNG Files (*.png)|*.png|TIFF Files (*.tif)|*.tif|All files (*.*)|*.*||");
if (dlg.DoModal() == IDOK)
{
TextSet(dlg.GetPathName());
wndGrid.OnGridCellInputComplete(*this, nColNo, nRowNo, nColType , nRowType);
}
}

Technical Support Jul 24, 2006 - 8:47 AM

Our file dialog window has the OFN_EXPLORER style, which may be the cause of the problem.