|
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?
|
|
|
|
|
we are giving support to japanese language for our product. Iam able to dispaly the Japanese string in the MessageBox.But I dont know how to show(override) OK and Cancel buttons in Japanese.
your Advice, will be very helpful to me.
|
|
|
|
|
If your product is UNICODE enabled you won't need to take care of this. The Japanese OS will display the text on the buttons properly.
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank u so much Boss.
This is Unicode supported product. But till now we are testing in English OS. So we are able to show all menus Dialogbox strings in Japanese.But Only this Yes NO Cancel in MessageBox are displaying in English.
So now i will test this Application in Japanese OS installed system.
Once again Thanks for sharing ur Knowledge.
Royal.
|
|
|
|
|
Hi,
I want the Connect As dialog to pop up on click of a button. I tried using the WNetDisconnectDialog() in VC98 but get the following linker error error LNK2001: unresolved external symbol _WNetDisconnectDialog@8
Included the following in stdafx.h
#undef _WINNETWK_
#include <winnetwk.h;
but then I get the following errors.
error C2011: '_NETRESOURCEA' : 'struct' type redefinition
error C2011: '_NETRESOURCEW' : 'struct' type redefinition
error C2011: '_CONNECTDLGSTRUCTA' : 'struct' type redefinition
error C2011: '_CONNECTDLGSTRUCTW' : 'struct' type redefinition
error C2011: '_DISCDLGSTRUCTA' : 'struct' type redefinition
error C2011: '_DISCDLGSTRUCTW' : 'struct' type redefinition
error C2011: '_UNIVERSAL_NAME_INFOA' : 'struct' type redefinition
error C2011: '_UNIVERSAL_NAME_INFOW' : 'struct' type redefinition
error C2011: '_REMOTE_NAME_INFOA' : 'struct' type redefinition
error C2011: '_REMOTE_NAME_INFOW' : 'struct' type redefinition
error C2011: '_NETINFOSTRUCT' : 'struct' type redefinition
error C2011: '_NETCONNECTINFOSTRUCT' : 'struct' type redefinition
Can anyone help me solve the problem.
Thanks
Ninoshka
|
|
|
|