|
That doesn't work.
I am looking for something by which the blue highlight will stay on the list item.
|
|
|
|
|
Donguy1976 wrote: I am looking for something by which the blue highlight will stay on the list item. Yes, that is what that property does for you. Actually, it should be shown as gray, not blue to indicate the does not have focus, but at least it shows the selection.
Do you by any chance override the list control styles during initialization? If so, you should include LVS_SHOWSELALWAYS.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
I want it to be BLUE and not GRAY.
Anyone know how to do that?
|
|
|
|
|
Things like that are normally done by overloading the list controls OnCustomdraw() . To do this, you use your own class derived from CListCtrl . If you want more information on that, check this (or you can Google):
http://msdn.microsoft.com/en-us/library/ms364048(v=vs.80).aspx[^]
Here is an OnCustomdraw() I copied from existing code and modified to do what you want it to do (hopefully). It is untested, so I don't actually know if it will work correctly (or even compile), but go ahead and try it out.
void CYourListCtrl::OnCustomdraw(NMHDR* pNMHDR, LRESULT* pResult)
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );
*pResult = 0;
if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
{
*pResult = CDRF_NOTIFYITEMDRAW;
}
else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
{
if (IsWindowEnabled())
{
int nItem = (int)pLVCD->nmcd.dwItemSpec;
if (GetItemState(nItem, LVIS_SELECTED | LVIS_FOCUSED) != 0)
{
pLVCD->clrText = GetSysColor(COLOR_HIGHLIGHTTEXT);
pLVCD->clrTextBk = GetSysColor(COLOR_HIGHLIGHT);
*pResult = CDRF_DODEFAULT;
}
}
}
}
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
Hello all,
I am working on a C++ application using MFC in VS 6.0
There's one dialog with 4 edit box controls and 1 check box, they are -
Name
Age
CheckBox
Height
Weight
Now when the dialog first open up only the Name & Age controls and CheckBox are shown to user.
Now if the user clicks on CheckBox then it should show the remaing 2 edit boxes, weight & height
So basically, if the CheckBox is checked then the dialog should resize automatically and show the remaining 2 edit controls.
Is it possible to do that with in 1 dialog itself?
If yes, how?
Please explain.
Thanks in advance.
|
|
|
|
|
|
See if this helps.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hi all,
I want to print image.
I have a paper size and the num of image to be print on page.
if one image print over the page its working fine
but how can I identify the size of new image to print on page if multiple num of image print over the page,
like: if 40*40 is image size its print on 40*40 paper finally if only one image print over 1 page, if 2 image print on the page the image size should be 20*20 each print perfectly on page and occupy the whole area of page.
and also tell me how to arrange the images in printing like left to right or top to bottom ,to occupy the whole paper area by providing num of images on page.
please help me for this,
thanks.
|
|
|
|
|
|
can u please provide me any sample please if possible.
|
|
|
|
|
|
Hi all,
I want to know how to create manifest for my c++ private assemblies. What I have done now is keeping a static manifest file(as show below) and embed it into the dll. The down side of this approach is that I cannot update the version number in the manifest file. I want to update the version in the manifest file with the version of dll.
Please advice me if anyone knows some details on creating manifest for "private assembly"
="1.0"="UTF-8"="yes"
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="MyCompany.MyDll" version="1.0.0.0"
processorArchitecture="x86" ></assemblyIdentity>
</assembly>
|
|
|
|
|
Hello,
I would want to write a small chat program allowing to communicate across the Net.
But I only found classic Winsock samples with 1 server/clients, where clients need an ip address to connect with the server.
Isn't it possible to have only clients (which would probably be also servers for others clients) ?
(if I just have 2 executables on 2 different PCs, I cannot know the ip of the other client exe)
Thanks.
|
|
|
|
|
|
jeff6 wrote: Isn't it possible to have only clients (which would probably be also servers for others clients) ?
Yes, but then the client must be also a server, that is you should replicate (in the client) the server functionality you find in the 'classic Winsock examples'.
Veni, vidi, vici.
|
|
|
|
|
i want code for which software ,when i install on a pc then aal pdf document of that pc should be deleted ?
raj suthar
|
|
|
|
|
1. nobody is going to give you source code here.
2. especially not source code that would do what you're asking.
|
|
|
|
|
why ?we can make anything through code ?
|
|
|
|
|
|
raj suthar wrote: i want code
Then you have a few choices:
- Search Google for samples.
- Search CodeProject articles.
- Write it yourself.
- Pay someone else to write it for you.
- ...
Use the best guess
|
|
|
|
|
maybe github and sourceforge.... will help
Pravinda
the Magician
|
|
|
|
|
What code have you put together so far?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
You forgot the 'joke' icon.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
maybe you too
Pravinda
the Magician
|
|
|
|
|
He got as far as opening a new cpp file....
==============================
Nothing to say.
|
|
|
|