|
Perhaps you missed this from MSDN:
When the search handle is not needed,
close it by using the FindClose function.
Since you haven't closed the handle, it's still in use.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
mihai123 wrote: SHFileOperation
I always use this tested class :-
http://www.codeproject.com/KB/shell/cshellfileop.aspx[^]
when ever i want to do folder operations!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
|
Hi Everyone,
I am using ListView in Report style with 4 colomn, how can I paint the 4th subitem field with desired color.
I tried to do it with OwnerDraw but it is filling the full row, I applied tha same with CDDS_SUBITEM but getting desired result.
How can I achieve this?
I am awaiting for your response.
|
|
|
|
|
in this case you can use the CustomDraw feature of List control. For this subscribe the NM_CUSTOMDRAW notification from list control and draw the desired subitem as you prefer.
akt
|
|
|
|
|
I tried with NM_CUSTOMDRAW and it is working but how can I fill the some area of 4th subitem with desired color?
my code is here
CListCtrl &ListCtrl=GetListCtrl();
LPNMLVCUSTOMDRAW pNMCD = reinterpret_cast<LPNMLVCUSTOMDRAW>(pNMHDR);
int nVar=pNMCD->nmcd.dwItemSpec;
*pResult = CDRF_DODEFAULT;
switch(pNMCD->nmcd.dwDrawStage)
{
case CDDS_PREPAINT:
*pResult= CDRF_NOTIFYITEMDRAW;
return;
case CDDS_ITEMPREPAINT:
*pResult= CDRF_NOTIFYSUBITEMDRAW;
return;
case (CDDS_ITEMPREPAINT | CDDS_SUBITEM):
{
if(pNMCD->iSubItem==4)
{
if(nVar%2)
pNMCD->clrTextBk=RGB(232,232,244);
else
pNMCD->clrTextBk=RGB(255,255,255);
}
*pResult=CDRF_DODEFAULT;
return;
}
|
|
|
|
|
Your code if working fine.4 th subitem is filled with specific color.
Sudhir Kumar
|
|
|
|
|
In NMLVCUSTOMDRAW structore there is another called NMCUSTOMDRAW. This NMCUSTOMDRAW contains the handle of the DC and rect of the subitem. Using this this DC and rect ucan paint the subitem area.
akt
|
|
|
|
|
|
Hello,
I have made a dll and for each of the classes included in the dll I have used the macro AFX_EXT_CLASS in the declaration of the class.
But if I have a .h file which has only consts then which macro should I use to indicate that this file is in the dll.
Pritha
|
|
|
|
|
Nothing, just include the header file.
|
|
|
|
|
You want to export those consts through dll.
Sudhir Kumar
|
|
|
|
|
Hello,
Thank you for your replies.
yes I want to export those consts through dlls.
Pritha
|
|
|
|
|
prithaa wrote: yes I want to export those consts through dlls.
Since the constants are declared in the header file it self, you don't need to export it. Just include the header file.
|
|
|
|
|
Great ! 1 min
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
|
prithaa wrote: But if I have a .h file which has only consts then which macro should I use to indicate that this file is in the dll.
if you just want to include the const, you just have to include the Header file, you don't have to anything or macro for including const, as contants defination would be available in the header file, I believe, this information would not be exported by DLL.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Thanks for all the replies
|
|
|
|
|
How to know whether the value is changed?
I've tried to override CMFCPropertyGridProperty::OnUpdateValue , but got a problem.
class MyProp : public CMFCPropertyGridProperty
{
...
};
BOOL CMyProp::OnUpdateValue()
{
if (!CMFCPropertyGridProperty::OnUpdateValue())
return FALSE;
if (IsValueChanged()) {
MessageBeep(MB_OK);
}
*m_pValue=GetValue().fltVal;
return TRUE;
}
|
|
|
|
|
I think even if same value is typed.It will return true.Because you tried to change the value .
Sudhir Kumar
|
|
|
|
|
i have a coding were i have to display the strings in the list box and if i select a particular string in the listbox a specific operation is done,i have put all these codings in a button click, but the listing of string in listbox takes place finally after all the operation inside the button click gets over,but i need the listing to be done first,where lies the problem???
for(j=0;j<n;j++)>
{
getlist(j,name); ->function call which fetches name
printf("\n%s\n",name);->this printing takes place
list.AddString((CString)name);
}
</n;j++)>
the below operation is done after the selection but listing doesn't happen
currentindx=list.GetCurSel();
SelectService(currentindx,&callback);
Raja
|
|
|
|
|
Sorry I didn't understand your problem. What do you want?.. as you have said you have put the code for adding string in List box on button click, than it going to happen at button click.
See programming always happen in sequence, so you have to decide sequence of your programming steps!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Can you please make you question more understandible.
Sudhir Kumar
|
|
|
|
|
sudhir_Kumar wrote: Can you please make you question more understandible.
I am sorry , is this question for me or guy above me.. I am little confuse, what to reply ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Why are you populating list box in button click. Can you populate the list box in OnInitDialog?
akt
|
|
|
|