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 General Discussion » "File open" Dialog is not opening from Grid window(CExtGridWnd) Collapse All
Subject Author Date
Anil Siddhpura Feb 26, 2010 - 12:54 AM

Hi,

I have created one grid dialog, and I want to open a "file open" dialog from the grid.

So for that i done following.

pCellString = STATIC_DOWNCAST(CExtGridCellString,m_2DTechProGrid.GridCellGet(0,RowNo,0,0,RUNTIME_CLASS(CExtGridCellString)));
    pCellString ->TextSet(strTitle);
    pCellString->TextColorSet(CExtGridCell::__ECS_ALL, RGB(0,0,0));
    pCellString->FontWeightSet( FW_BOLD );

    pCellFile = STATIC_DOWNCAST(CExtGridCellFile, m_2DTechProGrid.GridCellGet(1,RowNo,0,0,RUNTIME_CLASS(CExtGridCellFile)));
    UNREFERENCED_PARAMETER(pCellFile);
    pCellFile = STATIC_DOWNCAST(CExtGridCellFile, m_2DTechProGrid.GridCellGet(1,RowNo));
    pCellFile->TextSet( strValue );
    pCellFile->m_bOpenFileDialog = TRUE;
    //pCellFile->FileDialogStyleSet(OFN_FILEMUSTEXIST);
    pCellFile->FileDialogFilterSet(_T("Worksheet Files (*.xls)|*.xls|Worksheet Files (*.xlsx)|*.xlsx|"));

What am I doing wrong? I think by doing this the file open dialog should open. But it is not.

I have several other project in which the dialog opens, but in this it is not.

The other projects are Application(.exe) while this one is library(.dll). So is it creating any problem?

Please provide me the solution.

Technical Support Feb 26, 2010 - 1:33 PM

The file dialog grid cell initialization code is OK. We suspect your DLL project uses Prof-UIS as static library and the file dialog’s resource is not available. If our guess is correct, then please check whether the .rc2 file of your DLL project includes Prof-UIS resources. It should contain the following lines of code:

#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
            #include <Resources/Resource.rc>
#endif

Please also read the following and check whether the correct Prof-UIS library configuration is used in your DLL project:
http://www.prof-uis.com/prof-uis/tech-support/faq/miscellaneous.aspx#how-to-use-prof-uis-in-my-dll-project