|
Mark,
Thanks for that. It would be preferable to have a CStatic inheriting class that encapsulated all of this GDI stuff from me, or perhaps worked in a different way, and allowed me to use resources, because the images's(currently a CStatic) position is currently dictated by a third party class that changes the position of widgets as the application's main window is resized, to keep their relative position - I need to maintain this.
All I want is a CStatic with dithered transparency - Is there a more expedient way to get this effect?
Regards,
Sternocera
|
|
|
|
|
Sternocera wrote: It would be preferable to have a CStatic inheriting class that encapsulated all of this GDI stuff from me
You can do the rendering from anywhere you want.
Instead of GDI+, you could create the bitmaps with a background of a certain color
like RGB(0x00,0xFF,0x00). That color can then be used in the TransparentBlt() API
to render a bitmap or to create a masked imagelist from the bitmap which can be rendered
on the control.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark,
That sounds like a good solution. I'll investigate it. Thank you very much,
Sternocera
|
|
|
|
|
I have a class which has 2 access functions thus:
std::vector<const MyClass *> Function() const;
std::vector<MyClass *> Function();
and I am trying to do an assignment from another non const member function of the class like this:
std::vector<const MyClass *> variable = Function();
By default the compiler always tries to use the non const access function and gives me a type mismatch. Is there any way apart from creating a temporary const pointer to myself to force the compiler to resolve to the correct const version of the function which returns the correct type?
If you vote me down, my score will only get lower
|
|
|
|
|
This is how I attempt to do that for subscript operators...
CSomeObject& operator [](int nSubscript);
const CSomeObject& operator [](int nSubscript) const; // Readonly subscript operator
I'm not sure if this will work in the context you provided but it's worth a shot. Got this out of "Professional C++, by Solter and Kleper" Page 446 (Providing Read-Only Access with operator[])
|
|
|
|
|
Hi,
I' need to perform a conversion from wav file to double array. In particularly I'd like to catch only the chunk relative to data information (I would to filter out any info about bitrate, frequency,etc).
How can I do this?
Thank in advance.
|
|
|
|
|
Parse the WAV[^] file, and for each sample, convert the sample to a
double.
Which part of that are you having trouble with?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
have a look at this[^] for a description of the WAV format.
You will need to read in the different headers to know where and how to read the data "chunk"; then, simply read and
add each "sample" to you array, be carefull of the left and right channels.
AFAIK (and understand it), the sample is not a double value.
|
|
|
|
|
Visual C++ 2003, MFC, Doc/View...
I have a need to ensure the CView::OnPaint method and subsequently the CView::OnDraw gets called in certain situations, even without an invalid region. According to the documentation, RDW_INTERNALPAINT should be used within a RedrawWindow() call to force at least one WM_PAINT regardless of whether an invalid region exists or not.
This seems to work only when RDW_INTERNALPAINT|RDW_UPDATENOW are combined. However, I don't want to force the refresh immediately, it would be better to allow the message to be processed in it's normal fashion so I'd rather not use RDW_UPDATENOW.
If I use RDW_INTERNALPAINT by itself, the CView::OnPaint never gets called. What am I doing wrong?
|
|
|
|
|
I bought 16 channel video card that i want to use to build a surveillance system. The software that the company provides is pretty much overkill for what i want use it for. Also the package weighs in at 2gb and doesn't have any option to install only the components that i need. I'd like to develop my own software to communicate with this card directly. Does anyone know if it would be possible?
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
teejayem wrote: I'd like to develop my own software to communicate with this card directly. Does anyone know if it would be possible?
Doesn't the fact that the card is delivered with software for communicating with it answer your question?
You may consider item #2 in the list provided in this post[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
The software is a separate download. All i want to make is a viewer and i don't think i should have to install a 2gb file (that probably expands to 4gb) just to use their viewer.
As far as your item #2 comment, I don't believe that i asked anyone to provide me with any code for my question. I simply asked if there was a way to communicate with the hardware if the drivers were installed on the machine. How much more specific do i need to be?
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Does the hardware company offer a 3rd party development. kit ?
|
|
|
|
|
yeah they do however, they only provide video streaming through tcp/ip to a server they provide.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
teejayem wrote: As far as your item #2 comment, I don't believe that i asked anyone to provide me with any code for my question.
No, you did not. But item #2 says "be specific".
teejayem wrote: I simply asked if there was a way to communicate with the hardware if the drivers were installed on the machine. How much more specific do i need to be?
It depends on how specific answer you'd like.
Given the information you've provided so far my answer can only be "yes, it's possible".
Of course you'll need to know "how" to communicate with the card, what protocol it uses and so on. But you didn't provide any info that can be used to guide regarding this. Perhaps you can find it in the documentation for your card.
Somehow I find it hard to believe that you want a simple 'yes' or 'no' to be able to continue your work to the question "if it's possible".
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
If the drivers are installed then you could try out some video capture program to see if it can use those drivers (i think you can try Media Player Classic to open capture devices for input) and if you can then it is possible to write your own progrqm using DirectShow, PROBABLY.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks for the info. I'll test this out.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Try DirectX. I think in DirectMedia or DirectShow there are tools to capture, play ...
|
|
|
|
|
HI
I want to insert in between two cells...I.e i want to overwrite a data in cell in excel using excel automation.
Cany anyone suggest me any idea?
thanks
gany
|
|
|
|
|
CodeProject has the magic article's search engine [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
HI All,
I have a ftp server address.I need to connect with ftp server and download the files in tree control with MFC(I need in C++ not VC++).
I need some idea for this.
Pls help me..........
Thanks & Regards
Anitha
|
|
|
|
|
|
I can also suggest to use FTPClientSession class in Poco C++ library. (it does not depend on MFC).
|
|
|
|
|
Also I can advise you to find in Ultimate TCP/IP package (no dependance on MFC). (it is availbe here in CP)
Good luck.
|
|
|
|
|