For those that are curious, I discovered a page explaining what the compiler was doing
The size of my structure is not what I expect it to be
Compiler specific pragma fixes the problem
...
Type: Posts; User: A10
For those that are curious, I discovered a page explaining what the compiler was doing
The size of my structure is not what I expect it to be
Compiler specific pragma fixes the problem
...
The size of the following struct should be 14 bytes. It appears to be 16 bytes. When I write it to a binary file, two bytes seem to be inserted after the first two bytes. The two erroneous bytes have...
After the call to CreateWindowEx() add
SetWindowLong( m_hWindow, GWL_USERDATA, (long)(void*)this);
and in the window procedure add
CMainWindow *This = (CMainWindow*)GetWindowLong (o_hWnd,...
Thanks for your response. Your rewrite was very very helpful.
Unfortunately It wasn't 100% successful. When I took a look at the file the function downloaded, It was chewed up and not necessarily...
I need to download certain files for my application. HttpQueryInfo() fails on two finals with 12150 (ERROR_HTTP_HEADER_NOT_FOUND).
I can still download the file, but InternetReadFile() doesn't...
You're going to need to hook the desktop's window procedure. Look up msdns SetWindowsHookEx() function. That should give you an idea on where to start.
EDIT: Bob beat me to it, and then some.
!!!
You proved this page completely wrong! Edit: For anyone else reading this after, your example also needed uuid.lib linked
http://msdn.microsoft.com/en-us/library/ms693724(VS.85).aspx
Unless...
Wow these have all been great responses. Unfortunately I've been away for a while as my system was rootkit-ed. It's been quite a battle to remove it. It disabled all current antivirus software and...
Well, I've been looking into libjpeg and I've found plenty of examples on how to convert a jpeg from a file into an HBITMAP but none describing how to change the source from a file handle to a BYTE...
Well that squashed all my hope :(
Do you know of any way to convert a jpg loaded as a BYTE* [] into a hbitmap?
I'm trying to convert a jpg image acquired from the internet into an HBITMAP. I'd like to be able to check the pixel by pixel values of the image (specifically I'm looking for blue pixels in a jpg...
You can use getchar() to that effect though
http://www.cplusplus.com/reference/clibrary/cstdio/getchar.html
Using the example code from that website, before the line
putchar (c);
put
c =...
You could put the dog in a class and make the function to display it dog.display()
Also animation gets complicated. You have to translate each body part for each frame. It's insane to do it by...
I had this problem not long ago, I think it was something silly but I can't recall what it was. First try inclusion guards on Mammal.hpp
#ifndef MAMMAL_HPP
#define MAMMAL_HPP
#include...
Try changing
if (x <= 59..99)
to
if (x <= 59.99)
What on earth does that sentance mean o_0
Never mind It works fine.
I've been looking at common dialog boxes, specifically how to open a file of a users choice.
I'd like to have a function that I can call that returns me the path to the file the user chose.
...
Thank you Elysia. After following your help it worked
It turns out I had another simpler problem in that in my header file I told my app to import the function and call it MyDLLFunc2 but then in...
Should I put it in front of the definition as well?
Also after I added that to the header file as if by magic a .lib file for my dll appeared.
Doing what I think was following this I added...
I'm using VC++ 2008
I've spent my day trying to learn about dll's and how to use them but there's a surprising lack of resources available on the internet.
I've been following a tutorial and...
I know exactly what your talking about. When I first tried learning winsock MSDN was by far the most helpfull resource.
I think this was it: msdn.microsoft.com/en-us/library/ms738545(VS.85).aspx
Isn't <string> just a header containing misc string manipulation functions? It doesn't actualy contain std::string does it?
Thank you so much. I've been coding few years now and the includes have been aggrevating to get to work properly. And to think the remedy was a quick post and a google search of include guards.
It...
I'm recieving strange errors that I think are being caused by how I've included my files.
If this is a incorrect way to structure my include files then please tell me a correct method.
there are...