|
Selected by any means, it is always gray.
|
|
|
|
|
I have just built a version of my test project using a CScrollView as the parent of the CListCtrl. It exhibits the same behavior as the dialog-based app and the CFormView-based app. That would seem to point to the images or the ImageList object that I am using. However, I have used this same ImageList & bitmaps in another project, but the selection behavior is correct.
|
|
|
|
|
Just to be safe, does explorer highlight in blue when you select a file? Its possible to have your "scheme" have the highlight color set to gray.
As another thought, is your ListView (or ListCtrl) derived from anything, meaning did you use a class from an outside source? Just wondering if perhaps you or that class might be using NM_CUSTOMDRAW to override painting.
Also, what styles are being used on the view, single selection, full-row selection, show selection always, owner data, owner draw?
Personally I've never seen a basic ListCtrl ever paint incorrectly without some kind of interference from code.
|
|
|
|
|
Yes, Explorer highlights in blue, as it always has. Also, a TreeCtrl in my app which is a sibling of my ListCtrl selects correctly with a blue highlight.
|
|
|
|
|
Oh, um, are you using a manifest under VC6? I know when you use manifests (to get the XP style look), imagelists behave differently. I think, but not certain by any means, that the newer compilers handle this without problems, but I'm fairly sure VC6 won't. I've found CImageList won't work quite right, I had to use the macros like ImageList_Create for it to work right.
|
|
|
|
|
No, I am using VC7 unmanaged code.
|
|
|
|
|
VC7 has an option during project creation for including a manifest for C++ apps that defaults to "ON". Check your project or project/res directory for a .manifest file. If you have one, then its probably being used. Try turning it off.
|
|
|
|
|
How do I do that? My test app project has a manifest file, but my real project does not. With both projects exhibiting the same behavior, one has a manifest and the other does not, I can't believe that is the problem. Anyway, I can't find a setting in the project configuration for turning it on or off. I also searched the vcproj file for a hidden setting.
|
|
|
|
|
Ah, sorry, too many different compilers/languages on my system. It'll be in the resources of the project, you'd have to delete it from there.
|
|
|
|
|
I deleted the manifest file and rebuilt my project. No change in behavior.
|
|
|
|
|
Bummer. I'm fresh out of ideas. I'm sorry I couldn't figure it out for you. Hope something clicks and it works out.
|
|
|
|
|
Thanks, I appreciate your efforts on my behalf. When I get a fix, I will post it here. I have asked Microsoft for help on this one.
Royce
|
|
|
|
|
I have found a fix for this problem, but I can't as yet explain why it works the way that it does. I am now creating my ListCtrl like so:
DWORD dwStyle = WS_CHILD | WS_TABSTOP;<br />
dwStyle |= LVS_ALIGNTOP | LVS_AUTOARRANGE | LVS_ICON | LVS_SHOWSELALWAYS | LVS_SINGLESEL;<br />
if ( bVisible )<br />
dwStyle |= WS_VISIBLE;<br />
<br />
HWND hWnd = ::CreateWindow( "SysListView32", NULL, dwStyle, <br />
rcTree.left, rcTree.top, rcTree.Width(), rcTree.Height(), <br />
m_hWnd, NULL, AfxGetInstanceHandle(), NULL );<br />
m_ctlComponents.Attach( hWnd );
Problem is fixed.
|
|
|
|
|
I was wondering if there is a way to call java code from a c++ program in the same way you can call c++ code from java using JNI
pplshero54 gives his thanks
|
|
|
|
|
Java is not producing binary code - lik DLLs or libs - that can be called via a C(++) interface.
Like .NET needs the runtime, it needs its bloated JVM to run.
There are JavaToBinary compiler (like GNU GCJ), but I have no idea how well they work.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I'm playing around with a client/server app that uses winsock/iocp to send/receive data via a simple protocol. A backend database is basically being queried by the clients over the TCP connection.
I would like to return results to the client using ADO's GetRows method on the server and passing the SAFEARRAY that GetRows returns as a buffer over the TCP connection. No, I'm not using COM/DCOM, straight TCP, so I need to send a buffer.
Currently I'm using ADO's GetString to create a buffer, passing then, and then parsing it on the client. I'd like to use GetRows and pass a SAFEARRAY directly. This allows improved concurrency because of the asynchronous capabilities of GetRows, and would also remove the need to parse the data on the client.
From what I understand, a SAFEARRAY consists of an array descriptor and then a buffer of data. I assume that the data buffer is very pointer-centric, but if I can get the size of the buffer and pass it, perhaps I could "fix-up" the pointers on the receiving end or something (based on an offset of the pointer to the start of the buffer on the server vs. the start of the allocated buffer on the client)?
Thoughts?
Mike Stephenson
|
|
|
|
|
hi
i have a problem and i dont know how to solve it,
i want to record wave file as long as my application is running and while recording i want to split the wav recorded (continuous word)into isolated words(split at the silence)into wav files
and this must be real time problem
sorry for disturbing
thanks in advance
|
|
|
|
|
By "record", do you mean "write to hard disk" or "capture in memory"?
The standard C WaveIn functions can be used to capture audio to blocks of memory, where each "block" is a series of samples. Each sample is a value (0 to 255 for 8-bit or 0 to 65535 for 16-bit.)
You could capture (say) blocks of 50 milliseconds, then a simple check for "silence" would be to calculate the sum of the difference of each sample from 128 or 32768. If this sum is below some threshold (determined by trial-and-error), it is "silence", i.e. the break between words.
As far as I remember, the FISTER http://www.codeproject.com/audio/fister.asp[^] application was a good starting point.
|
|
|
|
|
I need to premise that I'm a novice in visual C++.
Having said that, I'm creating an interface which requires over 200 edit boxes (that return numeric values). By creating 200 edit boxes, however, I get over 200 OnEnChangeEdit###() functions. I would like to have all the edit boxes point to a single function that knows which element of the matrix has been edited. How do I do this?
Thanks,
Francesco
|
|
|
|
|
at the top of your dialog class's .CPP file, you'll see a lot of ON_EN_CHANGE(IDC_*, On*) macros that map change events to functions. change all those to point to the same function.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thanks a lot!
while we're at it, do you know if there's a way to progressively build updates/releases, so that I don't have to edit on previous (working) versions of the program, risking that it WON'T work anymore?
Thanks again!
|
|
|
|
|
also, and i hope this is the last question, is there a way to automatically insert say 200 edit boxes all of the same dimensions in an nxm matrix instead of manually having to copy and paste them all?
thanks for all your help!
|
|
|
|
|
and any ideas on how to automatically insert say 200 edit boxes all of the same dimensions in an nxm matrix instead of manually having to copy and paste them all?
|
|
|
|
|
francescot wrote: ...is there a way to automatically insert say 200 edit boxes all of the same dimensions in an nxm matrix...
This sounds like a grid control.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|