|
Mark Salsbery wrote: Force Code wrote:
Consider that with a windows icon, it will store a black and white mask to be used in masking the background. How is that mask accomplished behind the scenes except via BitBlt with ROP codes?
Do you mean with GDI+? I believe when you load an icon into a GDI+ Image/Bitmap
it is converted to 32-bit ARGB so it uses alpha blending instead of the mask
(based on experience, not documentation...try it ).
Mark
So everything that can be accomplished with ROP codes can be done w/ alpha blending? I know what alpha blending is, and used it in an application I'm developing, but the concept of it as a complete replacement for bitwise logical ops on bitmaps is new to me. Would someone attempt to do away with C's bitwise operators - and then replace it with what? I don't get it. How would you replace the ROP code 0x00AC0744 (which I actually use somewhere). How do you replace SRCAND or SRCPAINT, for that matter. I guess I need to find out however, because none of the modern programming environments seem to have anything but alpha. Don't suppose you know of a primer that would get me up to speed. (Well, it looks like you implied above that rop codes are still needed - still slightly confused - why wouldn't actionscript have either bitwise AND or OR for bitmaps given all the myriad stuff it can do.)
|
|
|
|
|
Force Code wrote: but the concept of it as a complete replacement for bitwise logical ops on bitmaps is new to me.
Isn't it only partial. I'm not versed in graphics by any measure but doesn't GDI+ cover everything by providing DrawImage (which you can use multiple times) with Effects objects and ImageAttributes?
|
|
|
|
|
Thanks i'll look into this
|
|
|
|
|
Force Code wrote: So everything that can be accomplished with ROP codes can be done w/ alpha blending?
I never stated that anywhere. I attempted to answer a specific question -
the one I quoted from your post. If you weren't referring to GDI+ (which I
asked), then you can disregard the comment.
Again, if you want to use the ROP codes, use GDI. There's nothing wrong
with that....it's still fully supported.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Force Code wrote:
Consider that with a windows icon, it will store a black and white mask to be used in masking the background. How is that mask accomplished behind the scenes except via BitBlt with ROP codes?
Do you mean with GDI+? I believe when you load an icon into a GDI+ Image/Bitmap
it is converted to 32-bit ARGB so it uses alpha blending instead of the mask
(based on experience, not documentation...try it ).
Mark
Not sure what the mere fact its converted to ARGB indicates. It seems a bitblt could still be performed on the lower 24 bits. How would you make a bitmap background transparent only using the source, destination, and alpha blending (with no mask bitmap).
OK I'll answer my own question, by using the alpha channel as the mask bitmap.
|
|
|
|
|
Force Code wrote: Not sure what the mere fact its converted to ARGB indicates.
Then I guess you weren't referring to GDI+, so you can disregard my comments
about how icons are converted when brought into the GDI+ world.
Force Code wrote: How would you make a bitmap background transparent only using the source, destination, and alpha blending (with no mask bitmap).
With GDI or GDI+? With GDI+ I don't need to be concerned with the destination.
All I need to be concerned with is the source bitmap and the Graphics object's
compositing mode.
Any pixel in the bitmap that has an alpha-channel value of 0 will be transparent.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: With GDI+ I don't need to be concerned with the destination.
All I need to be concerned with is the source bitmap and the Graphics object's
compositing mode.
Does "compositing mode" mean the alpha channel or something else?
|
|
|
|
|
In a GDI+ Graphics object, the compositing mode determines how
a source color is blended (composited) with a destination color.
The alpha channel, if present, is used in both currently supported compositing
modes.
See Graphics::SetCompositingMode[^] for more details.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello guys!
I have a test to do and I don`t know where to start from:
I have a Pocket PC (FS Loox N560) with USB Host. In a future application I will have to get data on this USB cable from another device, but that device sends data on a Serial port. So, having to test if I can receive that data, I got a module that goes from USB to Serial.
Now, more specific:
I have to use the usb port of my device to send some data (random data). If this is successfull, a led will start blinking on that module, telling me that data is received to it (and will convert it to serial, in my future application).
I`ve been given a link to some drivers for this:
Virtual COM Port Drivers. On this page, the ARMxScale Processor: Driver 1.0.2.9
I`ve been told to use a virtual driver to simulate my usb port as a serial port and simply send some data through it. I must say that I have 0 experience in creating drivers (or using them) and very little experience in using the serial port. I know it`s physical principle (i`m studying at the university of electronics and telecomunications), and that you receive/send data by defining it as a file and reading/writing from/to this file.
I`m very grateful for any link,suggestion,snappet etc.
-----
If I`m posting in a wrong section, I`m sorry.
If I`m not allowed to post links like the 2 provided above or they are considered advertisment, I`m sorry and I`ll ask a moderator to delete them. Thanks!
-----
Let the led blink!
Shpid3r
|
|
|
|
|
Well, normally you shouldn't develop the driver yourself, it should be provided with the USB-to-serial module. But it is possible that there is no driver for it for PocketPC, you have to look at it. Otherwise, I don't think you'll be able to develop it yourself (you need to know how to interact with the module itself).
And if everything is fine and you have a PocketPC version of the driver, then it is quite easy to work with: you just open it as a standard serial port (you'll need to know on which port number though).
EDIT: BTW, maybe the module is already supported so you can just try and plug it in and see what happens.
|
|
|
|
|
10x Cedric, for your fast reply
The module is a non-profesional one, which was created by my supervisor from a scheme (so as a wild guess Plug&Play won`t work). It`s built around a specific chip that does this conversion (USB -> Serial). The same person instructed me to use that driver (from the links I gave in the 1st message) to make it work.
I suppose I'm here:
Cedric Moonen wrote: And if everything is fine and you have a PocketPC version of the driver, then it is quite easy to work with: you just open it as a standard serial port (you'll need to know on which port number though).
I just wonder.. how to determin the number ? Simply trying all of them ?
Are you aware of a link to some serial project (designed for WinCE) ?
|
|
|
|
|
Ok, so I suppose the driver will work (of course, you'll have to take the version for PocketPC). Just install it and plug your module to see if everything is ok (if it doesn't say that it is an unrecognized device, it should be ok).
shpid3r wrote: I just wonder.. how to determin the number ? Simply trying all of them ?
I know that you can get it from a key in the registry but as I never did it myself (and never played with the registry before), I won't be able to help you.
After a little search on codeproject, I found this[^]. You should test it and see if it works on your platform (it should normally). You can also have a look in the same category to find other articles about that.
|
|
|
|
|
I'm found this library at http://sourceforge.net/projects/bluelib/[^]
But I'm have problem with creatinh email extension library in VS 2005
I'm got 23 linker erros like this one:
unresolved external symbol "__declspec(dllimport) public: __thiscall <br />
blue::common::Array<struct<br />
blue::ext::email::Headers::field_info>::Array<struct<br />
blue::ext::email::Headers::field_info>(void)" <br />
(__imp_??0?$Array@Ufield_info@Headers@email@ext@blue@@@common@blue@@QAE@XZ)<br />
<br />
referenced in function "public: __thiscall<br />
blue::ext::email::Headers::Headers(void)"<br />
(??0Headers@email@ext@blue@@QAE@XZ)
Please help me to solve this
|
|
|
|
|
did you forget to specify a .lib file in your linker settings ?
|
|
|
|
|
Have you tried to email the author or post this on the Blue forums (assuming they have any)? You'll probably get a more accurate answer there.
Never mind, the project looks dead, the last release was 3 years ago, the forums are full of spam, or old (the last author post was 4 years ago), and the site's online docs are defacaced/hacked
Bummer
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
out of curiosity ...
What is a general purpose library and why should one use it instead of what is already available when developing with Visual Studio ?
Why would you need to use it ? does it have something in particular ?
|
|
|
|
|
I'm "googled" this out searching for free IMAP library
and found many C# things bun tot so many for good old C++
YAP, this is wery dead project...
Thanks to wverybody anyway
|
|
|
|
|
I am a begginer in vc++, I am slowly working through a manual
can I driectly draw from the Onidle or call the cview-ondraw
can I do both? how do I go about this?
also, each time the onidle function is called, I would like to update
a variable and invoke this when I do the drawing methods
where do I declare this variable? I presume it to be a global
Please help, I'm stuck and i'm not very bright!!!!
simon
|
|
|
|
|
simon alec smith wrote: also, each time the onidle function is called, I would like to update
a variable and invoke this when I do the drawing methods
The best way is to update your variable and if you need to redraw, then call Invalidate()
This way, a WM_PAINT-message is sent, and automagically MFC calls your OnDraw() . And there (and only there!) you draw on the screen.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Hi !
I have a small problem with CArray.
I have some different places ( number not available ) where I measure temperatures every minute.
Now I want to store these temperatures in a CArray.
class CTempReader
{
struct GRAPH_POINTS // Holds the information of Temperature, Time and Date
{
int Temperature;
CString Date;
CString Time;
} St_Graph_Points;
struct TEMP_POINTS // Holds all temperatures of one place
{
CArray<graph_points,graph_points> TempZone;
} St_Temp_Points;
private:
CArray<temp_points,temp_points> TempZone; // The different places
}
If I try to compile these I get the following error:
C:\Programme\Microsoft Visual Studio 8\VC\atlmfc\include\afxtempl.h(272) : error C2248: "CObject::CObject": Kein Zugriff auf private Member, dessen Deklaration in der CObject-Klasse erfolgte.
C:\Programme\Microsoft Visual Studio 8\VC\atlmfc\include\afx.h(553): Siehe Deklaration von 'CObject::CObject'
C:\Programme\Microsoft Visual Studio 8\VC\atlmfc\include\afx.h(524): Siehe Deklaration von 'CObject'
Diese Diagnose trat in der vom Compiler generierten Funktion "CArray<type,arg_type>::CArray(const CArray<type,arg_type> &)" auf.
with
[
TYPE=CCSVReader::GRAPH_POINTS,
ARG_TYPE=CCSVReader::GRAPH_POINTS
]
Any idea how to solve ?
This is the last part of a big program and I dont know how to solve it.
Thanks
Stefan
|
|
|
|
|
StefanRMB wrote: Any idea how to solve ?
Your post misses the < and > because codeproject thought they belong to some HTML-Tags and filtered them.
Please change your message to use the pre-tag.
Or better:
Use std::vector<GRAPH_POINTS> .
CArray is some sort of malformed older brother of the vector.
It is mostly hidden in the dark, because Microsoft is so ashamed of it. They had to invent it back when teir compiler only barely handeled templates.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
You seem to have omitted some important code, or this is a VS200x-specific problem.
I compiled this with VS6 just fine:
#include <afxtempl.h>
class CTempReader
{
struct GRAPH_POINTS
{
int Temperature;
CString Date;
CString Time;
} St_Graph_Points;
struct TEMP_POINTS
{
CArray<GRAPH_POINTS, GRAPH_POINTS> TempZone;
} St_Temp_Points;
private:
CArray<GRAPH_POINTS, GRAPH_POINTS> TempZone;
};
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi again,
I found out that these code is not the problem. The problem is the following:
TEMP_POINTS MyTempPoints;
for( int i=0; i < MaxPoints; i++ )
{
TempZone.Add( MyTempPoints );
}
Any idea why ?
Regards
Stefan
|
|
|
|
|
Hi Stefan,
I think that CArray can only works with CObject. Can you try to derive youre structures like TEMP_POINTS from CObject.
But like the jhwurmbach said, you should try to use std::vector instead.
codito ergo sum
|
|
|
|
|
StefanRMB wrote: TempZone.Add( MyTempPoints );
Since TempZone is a member of TEMP_POINTS and CTempReader , its Add() method must be called in the context of one of them. What you've shown here does not.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|