|
The CListCtrl class only allows you t edit the one column, you probably want some sort of grid control.
|
|
|
|
|
use BOOL SetItem(
int nItem,
int nSubItem, // index of column that you need to edit.
UINT nMask,
LPCTSTR lpszItem, // value that you need to change.
int nImage,
UINT nState,
UINT nStateMask,
LPARAM lParam
);
good luck!
i love vc!This will appear at the
end of messages you post
to the Code Project
|
|
|
|
|
Hello!!
When I try to select an item using comboName.SelectString(-1, str) then different item which is before str but starting with the same characters of str is selected.
How to fix it?
Any help will be greatly appreciated!!
Thanks & Regards,
Suman
code:
----
m_cmbConfig.SelectString(-1,configName);
where configName = "IF2115b"
it selects IF2115br95br instead of selecting IF2115b
-- modified at 19:10 Tuesday 14th November, 2006
|
|
|
|
|
MSDN:
Searches for a string in the list box of a combo box, and if the string is found, selects the string in the list box and copies it to the edit control.
A string is selected only if its initial characters (from the starting point) match the characters in the prefix string
So what you describe seems perfectly legal from the CComboBox point of view...
Use FindStringExact and then SetCurSel using what the find function returned to avoid that behaviour.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Hi all
I am confused to know the basic and important difference between the Regular DLLs and Extension DLLs generated by VC++ and ActiveX DLLs by VB6.
Is there any other difference between them other than :
1. ActiveX needs Registeration and others dont
2. ActiveX DLL when viewed in dependency viewer only shows Register/un-Rgister functions as exports while others show all.
3. ActiveX DLLs always export class while others can exports both class and functions Hope somebody will reply me soon
Thanking in advance
bye
pitchu
|
|
|
|
|
VC6 can generate ActiveX/COM dlls as well.
So, in essence, VB6 can only generate a subset of what VC6 can. ActiveX needs registration, but can then live anywhere on the system.
|
|
|
|
|
That's what I've heard:
The main difference is that VB6 DLLs do not actually contain executable code, they contain special VB byte-code that is dynamically compiled while execution. This compilation requires VB component to be installed on the system. VC++ DLLs are faster because they contain native processor code and do not require any components installed on the system.
|
|
|
|
|
Thanks Christian and Alexandr for sharing it
Is this the reason that VB6 DLLs show only 4 functions as export as rest is in byte-code
bye
pitchu
|
|
|
|
|
Hi all,
i'am working on a service application which is containing socket programming, as TCPSPY will not work for services, is there any other tool to trace the sockets in SERVICES.
mpk1979
|
|
|
|
|
If you just want a list of the ports, try "netstat -nab" from the command line.
Any sufficiently gross incompetence is nearly indistinguishable from malice.
|
|
|
|
|
Dear All,
I am working with Visual Studio 6.0 UNICODE programming.
Here I am gettin this below error .
LINK : fatal error LNK1104: cannot open file "mfc42ud.lib"
What is the cause of this error ?
Kindly Help me .
Thanks
|
|
|
|
|
|
Sakthiu wrote: What is the cause of this error ?
This is what may be a reason.
The default installation options of Visual C++ v6.0 don't install the Unicode libraries of MFC, so you might get an error that mfc42u.lib or mfc42ud.lib cannot be found. You can fix this either by installing the Unicode libs from the VC++ install CD, or by going to Build | Set Active Configuration and selecting one of the non-Unicode configurations.
Found this here.[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Sakthiu wrote: What is the cause of this error ?
Other than this?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How do I get the white background from an imported bitmap to not show? (I am using Visual Studio .NET 2003, VC++.)
|
|
|
|
|
When you draw it to the screen, try using the TransparentBlt function. But that will make every white area in the image transparent, which may or may not be what you want. And on Win9x (or maybe just 98) the function has a gdi leak. A workaround is present, though, in the function's msdn article.
An alternative is to use an imagelist - create two bitmaps: one is your normal bitmap, the other is black everywhere you want the background to show through, white everywhere else. This is your mask bitmap. When you add the image to the imagelist (via ImageList_AddMasked off the top of my head) you can specify both handles.
A pain, yes, I know.
Mike
|
|
|
|
|
Thanks Mike,
I am trying to use it as an icon in an MDI application (i.e. for my tool bar and menu images). I import it using the Add Resource menu option. How do I set it to Transperent. To my knowledge, it is just resource ID.
Thanks,
BP
|
|
|
|
|
In that case a lot of the hard work is already done for you.
To show it in the toolbar IIRC you have to put it into an imagelist. In that case you can specify a transparent color when you do that. If you don't do anything with imagelists, look for a toolbar control message to set the transparent color.
Of course, if you have white areas in your image that you want to keep, you can't use white as your transparent color. In that case, change the background color to something garish that you wouldn't use, such as bright magenta (RGB 255 0 255). Specify that as your background color.
Mike
|
|
|
|
|
What format are the source bitmaps? BMPs don't have a notion of transparency but a 32 bpp BMP
has an extra byte you could use as an alpha blending value. GDI+ can work with transparency.
|
|
|
|
|
Thanks Mark.
The bitmaps were converted from PNGs or GIFs using Corel Draw. In Corel, the background is removed and doesn't show. Then when I choose to export it and use it in Visual Studio, it will show a white background when it is used in the software.
How do I do the things you mentioned?
BP
|
|
|
|
|
Although 32 bit bitmaps do contain an extra bit, there is nothing in GDI or GDI+ which uses this as a transparency mask. Your best bet is to pick a color to be transparent, set your border to this color, and use TransparentBlt. If you're using GDI+, you can set a transparency range, but you shouldn't need to do that.
|
|
|
|
|
Thanks Christian,
Can you point me to an example of TransparentBlt in usage?
Thanks,
BP
|
|
|
|
|
Any of the hits I got when I typed 'transparentblt' into google would have done, but this one is on MSDN, which is where you should generally look for this sort of info:
Here
|
|
|
|
|
Thanks Christian, I saw that but I don't know where to get all the values for that function's arguments, where to place it in the software (i.e. CMainFrm, CView), when to call it, etc... Do you know if there is a project here that uses it so that I can see how to use that function? Since I import it as a resource, I don't know how to get a hold of it or even adjust it's transparency setting.
Thanks,
BP
|
|
|
|
|
There is no transparency setting, you specify the color that is to be transparent. You can use LoadImage to load a bitmap from resources. You most probably want to paint it in your WM_PAINT event handler.
Where you call it depends entirely on where the code is that is drawing the icon, which depends on where the icon is being displayed.
|
|
|
|