I could only find it by using FindWondow API in class derived from CHeaderCtrl. Ans I customized the edit control from OnCustomDraw().
aks
I could only find it by using FindWondow API in class derived from CHeaderCtrl. Ans I customized the edit control from OnCustomDraw().
aks
Ok. I got it, I used FindWindoEx to find the WC_EDIT in the header. I think the filter button is not exactly a button. Its a bitmap.
aks
Thank you for the comment. I tried by subclassing the Header control. But I could not find any options to get the edit control and button from the CHeaderCtrl.
aks
I did not done any specific code for the setting the focus. I just shared the framework generated code for easily reproducing the issue, so that you can understand the issue clearly.
aks
please find the source shared at https://www.dropbox.com/s/w8pv31dhxy88h5p/Focus_Test.zip?dl=0[^]
aks
I have a CListCtrl in my MFC dialog application. I enabled the HDS_FILTERBAR for List control the by the following code.
CHeaderCtrl* pHeaderCtrl = m_myListCtrl.GetHeaderCtrl();
pHeaderCtrl->SetDlgCtrlID( IDC_LIST1 );
HDITEM hdItem;
ZeroMemory( &hdItem, sizeof( HDITEM ));
hdItem.mask = ( HDI_FILTER );
pHeaderCtrl->ModifyStyle( 0, HDS_FILTERBAR );
hdItem.type = HDFT_ISSTRING;
The filter is displayed. However I would like to change the background color and font of the Edit control and button in the filter section. How can I achieve it.
aks
Nice quote :) Could you please suggest a solution!
aks
Yes. I think the default MFC application created using the VS2010 wizard has this behavior.
aks
Yes. Before button click, even if the last focus is on another control( say tab order 2 ), after closing the Modal dialog the focus move to control having Tab order 0.
aks
1. I set tab order for control in a MFC dialog. 2. Started the application. 3. Clicked a button in dialog, whose tab order is 3. 4. A modal dialog displayed. 5. Closed the modal dialog. Now the focus automatically moved to the control having tab order 0. Since the focus was on the button just before the click, I would like to retain the selection on the same button.
aks
I have a csv file. I want to load the csv fil to a database. I tried by using CDAOSatabase instance with 'Microsoft Text Writer' jet enine. ( One Problem I found that when I execute a query to ceate a new table, the file equivalent to the new table is created in physical disk, even though I didn't commit the transaction) Also I heard that in windows there will not be a 64bit 'Microsoft Text Writer' in winows 64 bit. ( In my spec there is no MSOffice installed separately on this winows 64 bit machine ) Could ou please let me know is there any solution to use 'Microsoft Text Writer' in Windows64 bit machine without Microsoft office installed.
aks
I have an ATL dialog based applications. I have a custom list control derived from CListCtrl with message map BEGIN_MESSAGE_MAP( MyListCtrl, CListCtrl ) ON_NOTIFY_REFLECT( NM_CUSTOMDRAW, &MyListCtrl::OnNMCustomDraw ) END_MESSAGE_MAP() void MyListCtrl, ::OnNMCustomDraw( NMHDR *pNMHDR, LRESULT *pResult ) { NMLVCUSTOMDRAW* pLVCD = reinterpret_cast( pNMHDR); // Take the default processing *pResult = CDRF_DODEFAULT; if( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage ) { *pResult = CDRF_NOTIFYITEMDRAW; } else if( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage ) { int nRow = static_cast(pLVCD->nmcd.dwItemSpec ); if( true == MyArray[nRow].bIsOlder ) { pLVCD->clrText = RGB( 128, 128, 128 ); } pResult = CDRF_DODEFAULT; } } But I am not getting ant reflected message from the parent dialog. I know that it can be done by using the REFLECT_NOTIFICATIONS() in the parent class. But I read that we have to derive the CListCtrl from CContained window. Is it the right way, if so what are things I have to take care. Is there any better solution to resolve this issue?
aks
Can any one help me to solve this issue?
aks
I need to display a child html page inside the main html page using HTML Import. I tried a sample but it seems to be failing on link.import.querySelector(). The sample code I tried is mentioned below: Can you help me to resolve the problem. Main.html
<!DOCTYPE html>
<html>
<head>
<link rel="import" href="Child.html">
</head>
<body>
<button id="button1" onclick="onclick">Button1</button>
<div id="ChildContainer" />
</body>
<script>
button1.onclick = function ()
{
alert("Before reading imported files.");
var link = document.querySelector('link[rel="import"]');
alert("Before importing Child.");
var template = link.import.querySelector('Child');
alert("Before cloning contents of Child.");
var clone = document.importNode(Child.content, true);
alert("Before setting the child to ChildContainer.");
document.querySelector('#ChildContainer').appendChild(clone);
};
</script>
</html>
Child.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="Child">
<h3>Sample Text</h3>
</div>
</body>
</html>
aks
Thank you for the update. I have a traditional application with an ocx supporting some advanced imaging operations. HTML5 supports some basic imaging operations like mirror, rotate etc. But I also need some advanced imaging operation like text overlay etc. I will appreciate you on suggesting mechanism to achieve these in HTML5.
aks
I am newbie to web & HTML5. Can you please help me to load an ocx file to an html(5) page.
aks
I have a Restful service. I would like to create a .net wrapper for these Restful apis, so that I can call these from my desktop applications. Can any one correct and help me to achieve this.
aks
Which would be preferred code coverage tool for a bug fix project. I have a base code and I had done some modification in some existing function as part of fix. I would like to ensure the code coverage of modified codes. Is there any tools in your knowledge that can help me to find how much of my modified code is covered.
aks
Thank you Wayne. I am a beginner in web development. My real concern is whether I would go for a WCF service, REST service or a Web Api. My primary intention is to use the service in a client web application. Later I also planning to use it from different devices like tab/mob.
aks
I have a regular C# desktop GUI application providing regular windows interface. WCF is not used for supporting these interfaces, since it mainly working as a standalone desktop application, with a lot of data involved in data transfer. But I have used WCF with netNamedPipeBinding for UI automation. Now I would like to call these interfaces from a web page also. So in my understanding 1. I have to host my desktop application as WCF web service ( with httpBinding and need o provide a new contract for the interfaces). 2. Call the existing I/Fs from the new interface class. Please correct me if wrong.
aks