|
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
|
|
|
|
|
|
Chris Losinger wrote: what you need is some kind of Source Control system (ex. SourceSafe)
Or, if you really insist in a working one, CVS.
"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.
|
|
|
|
|
could you briefly tell me how to use CVS? how do i insert it in my project?
thanks.
|
|
|
|
|
francescot wrote: could you briefly tell me how to use CVS?
The CVS-Client I used was WinCVS[^]. There is a lot of documentation about setting up CVS and accessing the repository on that Website.
CVS itself, coming from the Unix side, is rather console-heavy. But in normal use you do not need to use the console if you do not want to.
"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.
|
|
|
|
|
Thanks, I'll check it out. Incidentally, do you know how to arrange Edit boxes in a matrix without having to copy and paste them and use your eyes to figure out if distances between them are all the same?
|
|
|
|
|
francescot wrote: Incidentally, do you know how to arrange Edit boxes in a matrix
HoHum - I think I would close the IDE and edit the rc-file myself. The coordinates are in there, and you can change them as you like.
But this is still tedious work.
The whole concept of the WIN32-resource management is very old fashioned - which is why they started Vista in the first place.
"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.
|
|
|
|
|
but then how do I know which box was the one that was edited? where do I keep track of that?
|
|
|
|
|
these might come in handy:
#define GetMemberID() \
( (GetCurrentMessage()->wParam) & 0x0000ffff )
#define GetMemberWnd() \
( FromHandlePermanent( (HWND) (GetCurrentMessage()->lParam) ) )
(found em via Google)
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
|
|
I still haven't been able to figure out how this works. I can't assign a vector to the edit box because DDX_Control doesn't accept that.
Is there anything else you can suggest?
|
|
|
|