|
i have HBITMAP and destination HDC how use Scretchblt
|
|
|
|
|
1. Create a memory DC. Preferrably one compatible with the target DC.
2. Select your bitmap into this DC.
3. Blit.
Done (modulo cleaning up after yourself).
|
|
|
|
|
Also, if the result looks bad, call SetStretchBltMode on the target DC, with a value of COLORONCOLOR.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Could anyone who is going to get irrational about me quoting their posts here please insert the following notice into their signature:
I am a whiny pussy
|
|
|
|
|
Is COLORONCOLOR better than HALFTONE ?
--------
Have you hugged your monitor today? --Shog9 --
|
|
|
|
|
To be honest, I can't tell the difference, but I could not remember HALFTONE and I could remember COLORONCOLOR. In theory, one is better, but I can't see it.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Remember that amateurs built the ark. Professionals built the Titanic.
|
|
|
|
|
Look:
HANDLE h=CreateMutex(NULL, FALSE, "q123");
WaitForSingleObject(h, INFINITE);
h is used only in this piece of code - from some MFC dialog based application - with no effect.
Any ideea why?
rechi
|
|
|
|
|
Bogdan Rechi wrote:
Any ideea why?
Yes. From MSDN
The state of a mutex object is signaled when it is not owned by any thread.
that is, since you created it with FALSE (not owning the mutext) it has nothing to wait upon since no one currently owns it. Alas, it returns immediately.
What have happened to the art of reading docs?
|
|
|
|
|
The mutex is in fact a binary semaphore. Owning means working with it in non-signaled state as no other thread to have access to the shared resources.
I've used it before in the same manner and it worked.
And by the way: if what you say is true, how could you gain the ownership to the thread, once it is created with FALSE?
rechi
|
|
|
|
|
Bogdan Rechi wrote:
I've used it before in the same manner and it worked.
If you say so. Then it must be either the global name or something else in your setup that has changed. I mean, since you already have used it, it has got to work. Right?
And by the way: if what you say is true,
It's not me saying this, it's the MSDN documentation. If that's wrong (wouldn't be the first time), we all know what company to blame and also how much use it is complaining to them.
how could you gain the ownership to the thread, once it is created with FALSE?
Ehhh, say again? You haven't created no thread that I've seen, you've created a mutex.
It seems to me there's something you're not telling us here...
|
|
|
|
|
It has to work, of course. I use mutexes in the same application for some modules and it works ok. That's why it seems so strange to me. I begin to question myself on that stuff.
About your last two sentences: you allways have the main thread in every Windows program.
rechi
|
|
|
|
|
Hi,
I'm trying to write a program that will make real time dsp of cd audio songs (something like the winamp dsp plugins that make
surround sound).
1. How can i 'capture' the sound signal before it comes to the sound card?
2. Where can i find tutorials regarding this prob and subject?
tnx
|
|
|
|
|
Eran wrote:
How can i 'capture' the sound signal before it comes to the sound card?
I assume you neither have the source-code nor a plugin-interface to/for the player, in case this would have been a non-issue.
For sounds going "out" from an application and to the soundcard, you can't. Well, at least not without writing a (kernel mode device-) driver to do it. Actually, This is exacly what Microsoft wants to prohibit anyone from doing by "locking down" Windows and make everything "DRM enabled" (i.e. taking over your machine and taking away your rights).
|
|
|
|
|
Well, what about message hook?
Can i use this stuff?
Anyway, It can be done, cuase non Microsoft's programmers did kind of stuff.
How can i make real time dsp of cd audio?
Any idea?
|
|
|
|
|
Well, what about message hook?
For real-time stuff like audio data?! LOL. No, seriously, I don't think this is anything to suggest (especially since IIRC thread switching is done at most every ~10ms, Win95 is even worse at about 250ms).
Anyway, It can be done, cuase non Microsoft's programmers did kind of stuff.
Where? Really, I'd really like to see a plain application that can intercept any other applications wave audio output to any Win32 exposed wave-audio device (not to mention replacing that output with its own modified signal).
How can i make real time dsp of cd audio?
Now you're switching to a completely different matter; real-time modification of sound input.
What direction of stream is it you really want to intercept? Please try to be as specific as you can be.
|
|
|
|
|
files of cda format (*.cda).
I'm not sure but, does the player convert it to wav?
|
|
|
|
|
You just could have told this in a more clear way from the beginning.
You just have to read the plain CDDA wave audio from the CD. Check how e.g. CDRecord's cdda2wav does.
|
|
|
|
|
Sorry.
I'm kinda new to this sh*t...(dsp)
Can u point me to any good tutorial that will give me some more info?
tnx
|
|
|
|
|
I need to remove macro's from excel file.
Does anyone know the excel file format ?
Me
|
|
|
|
|
It's like everything else "Office" based upon OLE storage. Look up StgOpenStorage and go from there.
|
|
|
|
|
...but I'll have to ask anyway
How to I import functions from a dll that don't have name decoration?
If I do a __declspec(dllimport) void __stdcall MyFunc I get something like __imp__MyFunc@4 ,
if I do a extern "C" void __stdcall MyFunc I get C name decoration: _MyFunc@4
and all this results in unresolved external symbols.
The Win32 API does it by I can't get it to work... anyone plz?
Cheers, Marc Click to see my *real* signature
|
|
|
|
|
Look up stdcall (or maybe __stdcall). Basically it's PASCAL calling conventions that Win32 uses. Draw your own conclusions re. the history of Windows (though that its linker initially needed a switch to _obey_ case sensitivity rules might be a hint ).
|
|
|
|
|
|
Originally, I intended to link to the DLL statically (at compile time), but it turned out to be slightly more tricky than I thought, so I had to fall back on a wrapper class that links to it at run-time, as you suggest it.
Cheers, Marc Click to see my *real* signature
|
|
|
|
|
If I do an AddNew in ADO recordset in the middle of the recordset. Where will the record appear, and will it visible to me ?
|
|
|
|
|
At the end of the recordset and it will be visible. Remeber to call Update to save the data after calling AddNew and modifying the new fields, unless you have opened the recordset in a BatchUpdate mode...but I'll let you read baout that.
Have a mess around in VB on this to get a feel, or try a good (and amazingly cheap) book like SQL Sever and ADO Programming from Sybex, which covers SQL, T-SQL and ADO. A really good reference book, and covers these kinds of issues.
|
|
|
|