Conversation started Apr 8, 2011 at 13:47.
Apr 8, 2011 13:47
@tina sounds like you have to have a pointer to the first pixel and then XOR the color values of each pixel, move on to the next pixel
so you need start by defining a pixel
I don't know, I don't see how interfaces can completely replace p-impl. In the worst case scenario I'd have to write an interface for every class, and that's just cumbersome.
@tina seems like I misunderstood what you were saying
contain(EVAL(container,is_rvalue), is_rvalue )
Where EVAL is a macro that... well, consider that a function that will return a pointer to the container, and in the process modify the second argument with true/false depending on whether `container` is an l/r-value. The result of that second argument is passed to the `contain` function as second argument... without the `const&` trick, the second argument could be copied *before* it is set
@tina honestly you should post a question on SO proper, with ALL the data in it
@tina You want to draw an HCURSOR onto an HBITMAP?
so. 1. create a bitmap with CreateCompatibleBitmap or CreateDIBitmap
2. load the cursor and icon as an cursor and icon.
3. call GetIconInfo (and GetCursorInfo) that will fill in a struct containing the HBITMAP representing each of them.
4. BitBlt the HBITMAPS obtained in step 3, onto the HBITMAP created in step 1.
this does look like a Q for SO proper.
Als
Als
Apr 8, 2011 13:55
What would be a better book to start learning more about Standard template library? The C++ Standard Library by N Josuttis or Effective STL by Scott Meyers?
Q=Question. sorry
6 mins ago, by Tony
@tina honestly you should post a question on SO proper, with ALL the data in it
It'd probably be easier to use DrawIconEx instead of extracting icon/cursor bitmaps.
@tina link seems not to work
Apr 8, 2011 14:32
Ok, so you are actually trying to generate an HCURSOR with an image you define yourself?
Er, that's Xlib, not WinAPI.
@tina you need to specify WHICH API you're using? Xlib is NOT equal to WinAPI!
1. thats xlib, not windows. but perhaps you are trying to port an x app to windows?
2. why not just create a cursor resource for each cursor
then ljust load them using LoadCursor(hXlibDll, xlibresid);
HFONT win_XCreateFontCursor(unsigned int shape){
  static HMODULE hXCursorDll = LoadLibrary(TEXT("xcursors.dll"));
  return LoadCursor(hXCursorDll,shape+1);
}
HFONT win_XCreateFontCursor(unsigned int shape){
  static HMODULE hXCursorDll = LoadLibrary(TEXT("xcursors.dll"));
  return LoadCursor(hXCursorDll,MAKEINTRESOURCE(shape+1));
}
This function assumes that you have used the resource editor to create a resource dll called xcursors.dll, that contains cursor resources for each x resource, with an id that maps to that header+1
sbi
sbi
How C++ is like teenage sex:
1. It is on everyone's mind all the time.
2. Everyone talks about it all the time.
3. Everyone thinks everyone else is doing it.
4. Almost no one is really doing it.
5. The few who are doing it are: A. Doing it poorly. B. Sure it will be better next time. C. Not practicing it safely.
3
Apr 8, 2011 14:50
version 2 had the MAKEINTRESOURCE(shape+1)
that converts an integer resource it into a string resource id
What do singles and married men have in common?
They both think that the other is getting all the sex.
return LoadCursor(hXCursorDll,MAKEINTRESOURCE(shape+1)); // use this line
@tina sorry if I offended you, it was not my intention, it was just a joke related to the previous (linked) comment
sbi
sbi
@DavidRodríguezdribeas And what does this have to do with C++? :)
@tina It's a chat room, so give us some leeway. :)
@tina Why? Sure, off-topic, but c'mon.
Apr 8, 2011 14:56
@sbi she's getting pretty serious on us, getting worried :)
Oh, my... what have I done... now against the wall... "I won't mention the s word" 100 times
sbi
sbi
There was a time here, when we jumped on every C++-related discussion that tried to raise its ugly head. :)
@DavidRodríguezdribeas There's Europeans here, so: sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex sex
@tina So?
@tina so does that make sex an indiscussible subject?
@sbi: Wow, did you copy and paste the whole lot?
It's also the Internet, it's pretty much made of it.
Apr 8, 2011 14:58
lol
difficult to suggest that this chat room is, in fact, not made of Internet
@PiotrLegnica what would internet be without it? prob not worth much
sbi
sbi
@DeadMG Of course, I typed it. Sex needs to be painful. Oh, wait...
lol
@DeadMG the internet isn't just made of sex
sbi
sbi
@tina Yep, happy. Thanks.
Apr 8, 2011 14:58
There's also quite a lot of hitler, and kittens
@sbi joyful you meant... lol
lol
@jalf lolcatz
honestly
sbi
sbi
@Tony Without sex, the Internet would be a much cleaner place.
Apr 8, 2011 14:59
there's something disproportionately funny about Hitler
I don't know what it is
@sbi yea but it keeps us on our toes... :)
but so many of those Hitler parodies on YouTube just crack me up
sbi
sbi
@Tony Ah, that was the word. Escaped me, momentarily...
@sbi it'd also be able to fit into the ipv4 address space pretty much forever ;)
 
Conversation ended Apr 8, 2011 at 14:59.