|
Hi All,
I have a custom tree control.It doesnt have the ID.Im using the bellow code.
RECT rect = {25,29,190,250};
m_treeCtrl1.Create(WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_TRACKSELECT|TVS_SHOWSELALWAYS ,
rect,this, 1001);
Now I need to write the code in click event.It doesnt have the ID.so i dont know how to write the click event.
PLs help me..............
Thanks & Regars,
Anitha
|
|
|
|
|
AnithaSubramani wrote: It doesnt have the ID
Yes it does, it is the last argument of the Create function (so, it is 1001). In general it is better to reserve the ID in the resource file, so that when you add another control through the resource editor, the same Id won't be reused.
|
|
|
|
|
Thanks Cedric Moonen, I got the output.
|
|
|
|
|
Hi,
I made CListCtrl application which is used in column '0' checkboxes,column '1' comboboxes.when check combo will place,when you uncheck combo disappear.its working fine using onItemChanged() function.but problem is when user do double click check box becomes uncheck but combo placing in column '1' instead of disappear .am placing checkboxes dynamically using LVS_EX_CHECKBOXES.please help me in this.
Thanks & Regards,
T.Sreenivasa Chary.
|
|
|
|
|
Give code snipplet for the checkbox-change event handler, please.
|
|
|
|
|
Hi,
this the code snipplet.
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
int index=0;
int i;
index=pNMListView->iItem;
CStringList pComboList;
pComboList.AddTail("Sonu");
pComboList.AddTail("Sunny");
pComboList.AddTail("Cheechaa");
pComboList.AddTail("Srinu");
for(i=0;i < m_List.GetItemCount();i++)
{
bChecked=m_List.GetCheck(i);
CString strTemp;
strTemp.Empty();
strTemp.Format("%s",m_List.GetItemText(m_List.iRowIndex,1));
if(strTemp.IsEmpty())
{
if((i==m_List.iRowIndex) && (bChecked==1))
{
m_List.ShowInPlaceList(m_List.iRowIndex,1,pComboList,"");
//ShowinPlaceList is used for to place combo box
}
}
else
{
if(i==m_List.iRowIndex && bChecked==0) m_List.SetItemText(m_List.iRowIndex,1,"srinu");
}
}
*pResult = 0;
thanks & regards,
T.Sreenivasa Chary.
|
|
|
|
|
Where do you filter out the checkbox change? As i understood, you want the combo-box appear/disappear thing when the user checks or unchecks the checkbox of the list item. OnItemChange gets called also when the item's selection or focused state changes (and maybe some other cases i'm right now not aware of or am not thinking of). Should this code run for every possible state change?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
yes,the code change every possible state.when we check combo should appear,when we uncheck combo should not appear.in case double click checkboxes state becomes uncheck so combo should not appear but in my code when double click check box becomes uncheck its fine but combo appearing.pls solve my problem.
|
|
|
|
|
i want to find a control which looks like the msn's
it can display the gif dynamicly and the font ,can control the font size ,color and so on,it's best inherit from richtext ,any help is appreciated
regards
a beginner
|
|
|
|
|
Do you want to show images and fonts?
|
|
|
|
|
sure ,alos i need show the dynamic gif ,do u konw ,thanks
a beginner
|
|
|
|
|
You need to EnumFontFamily or EnumFontFamilies for enumerates fonts and CreateFont/ for images you can use of CImage class for load and show them.
|
|
|
|
|
Hello,
I am looking for information of present drives on the system.
I am interested to get information of each drive present on the system which includes -
1) Model,
2) Serial number,
3) Type
4) Solid state drive status, etc.
Now, I am able to get such information for hard disk's drives. But not able to get this information for other drives like CD-ROM, USB drives, etc.
I am using CreateFile method to locate that drive and pass the handle to DeviceIoControl method which gives me listed info for Hard disk drives only. The DeviceIoControl gives me blank buffer for other drives like CD_ROM and USB, etc.
I am using code to locate drive as -
HANDLE hDiskDevice = CreateFile(DeviceName,
GENERIC_READ| GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);
To fetch information from the system, I am using -
DeviceIoControl(hDiskDevice,
SMART_RECEIVE_DRIVE_DATA,
pInputATABuffer,
InputBufferSize -1,
pOutputATABuffer,
OutputBufferSize -1,
&BytesReturned, NULL)
Please let me know if you have any ideas to get such information for USB, CD-ROM, etc drives.
Thank you.
With regards,
Shashikant
|
|
|
|
|
|
Did you see here[^]
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
can anyone please let me know what's the exact difference between subclasswindow and subclassdlgitem in subclassing?
Regards,
KDevloper
|
|
|
|
|
Looking at documentation, I suppose SubclassDlgItem is just a shortcut to the sequence
HWND hMyCtrl = GetDlgItem(IDC_MYCONTROL);
SubclassWindow( hMyCtrl );
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks Palini.
Regards,
KDevloper
|
|
|
|
|
i m trying to copy font file from windows font folder but i m not able to set font title name for that file.
|
|
|
|
|
Ashakulhade wrote: set font title name for that file.
Where do you want to set the font title name for the file?
Are you trying to read the font file and then change it's title...
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
no..i just copying the from windows font folder to any directory.
like i copy Arial Black font then its file name is "ariblk.ttf" but i want to give its title as Arial Black.
|
|
|
|
|
no..i just copied font file from fonts folder.like i m copying Arial Black file then i got its name as "ariblk.ttf" but i want set "Arial Black" as its Title instead "ariblk.ttf".
|
|
|
|
|
Im not aure its your answer or no but you can use of EnumFontFamilies or EnumFonts.
|
|
|
|
|
i tried to use it but it is not working..
i need more suggestions.
Thanks,
-Asha
|
|
|
|
|
Why you couldnt? where's problem?
|
|
|
|