|
Thanx! I didn't think I could do that.
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
|
[edit] well, I'll be dammed... Thanx![/edit]
Chris Losinger wrote:
you're so close!
// assuming hHeader is a zero-terminated string
szHeader = (const char *)hHeader;
FreeResource(hHeader);
WTF! I can DO THAT?! I guess I don't quite get the concept of a "handle"... Is a handle always a bald pointer like that?
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
No, not always. They are often an index into a look-up table.
|
|
|
|
|
ouch. i misread your code.
there is one more little thing you need:
HRSRC hSrc = FindResource(NULL, MAKEINTRESOURCE(IDR_HTML_HEADER), RT_HTML);
HGLOBAL hHeader = LoadResource(NULL, hSrc);
const char *pData = (const char*)LockResource(hHeader);
szHeader = pData;
UnlockResource(hHeader);
FreeResource(hHeader);
gotta Lock after the Load
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Ah yes, the Lock to get the pointer.
I was thinking you had missed something and I couldn't remember what it was.
|
|
|
|
|
All,
Does anybody know where I can download a copy of this SDK as Microsoft have taken it off their website (and replaced it with the latest version which does not support VC 6.0) and now expect users to purchase a CD with it on (CD if free postage is $15.95)
At my company getting a purchase order for such a small amount takes days therefore I want to download it.
Any help anyone can give would be nice.
Thanks
Users.
Can't live with 'em, can't kill em!
|
|
|
|
|
The disc is 356MB. I guess you could have it e-mailed to you a piece at a time.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Interesting site.
How do they make their money ?
...cmk
Save the whales - collect the whole set
|
|
|
|
|
No idea. But the site's a very popular alternative to bittorrent in sharing large files - such as videos/movies.
|
|
|
|
|
Hi..
is there a Windows Lawyer who knows if there is a document which says that the standard Windows Tree - Control is opening its branches when it's double-clicked. (Hope everybody understands what i mean).
And if there is such a document.. if there is a link to this document.
I'm fighting with some guys, telling them that this is the standard user experience and that everybody would be confused if it didn't expand the branch (with double-click).
All the label says is that this stuff contains chemicals "... known to the State of California to cause cancer in rats and low-income test subjects." Roger Wright http://www.codeproject.com/lounge.asp?select=965687&exp=5&fr=1#xx965687xx
|
|
|
|
|
i am reading the header of shape file but after reading the values which have byte order little are correct but the values which have byte order big are not correct.any body tell me how to resolve this problem.
|
|
|
|
|
read the numbers using the correct byte order.
there's no way to tell which order is correct from just looking at a set of bytes, though. the information about which numbers are in which order has to come from something external to the bytes themselves. do you have a spec for the file format?
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
yes i have spec of file format
Position Filed Value Type ByteOrder
byte0 filecode 9994 Integer Big
byte4 unused1 0 Integer Big
.
.
.
byte24 FileLength filelength Integer Big
byte 28 version 1000 integer Little
.
.
after reding i got coeect values which have byte order little but incorrect for which have byte order big
bcoz file code should be 9994 and i retrieved 1783600 like .
|
|
|
|
|
then you need to change the byte order on the big-endian values after reading:
void SwabLong(int &v)
{
int t;
BYTE* cp = (BYTE*)&v;
t = cp[0] << 24;
t |= cp[1] << 16;
t |= cp[2] << 8;
t |= cp[3];
v=t;
}
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
when i used that function i got error 'initializing' : cannot convert from 'void' to 'int'
|
|
|
|
|
|
thnx Charis now it works correct.thnx 4 ur concern.
|
|
|
|
|
My minimized program doesn't display when an alarmfunction in the program call ShowWindow(hwnd, SW_MAXIMIZE);
What's mising?
|
|
|
|
|
could you be more explicit ? maybe you should try
ShowWindow(hwnd,SW_SHOW)?
"Go as far as you can see,and when you get there you'll see further" - Unknown
|
|
|
|
|
I have done a windows prg with an alarm function (checking date and time), then i minimize the prg with the MINIMIZEBOX and the prg should activate and display the window at correct time and date, but it doesnt.t work, I have tried all kind of ShowWindod codes, i think there is something else i'm missing.
|
|
|
|
|
can you show the code ?
"Go as far as you can see,and when you get there you'll see further" - Unknown
|
|
|
|
|
void checkalarm()
{
getTime(date);
if (notesamling.alarmchecknotesamling (date))
{ShowWindow(hwnd, SW_SHOW);}
}
This is the part of the code that should activate and display the window.
|
|
|
|
|
i think the problem is no in the ShowWindow(..) function, i'd suggest you to replace it with simple MessageBox("") function just to check that these functions alarmchecknotesamling(..) , getTime(..) are correctly implemented.
void checkalarm()
{
getTime(date);
if (notesamling.alarmchecknotesamling (date))
{
MessageBox("Whatever");
}
}
"Go as far as you can see,and when you get there you'll see further" - Unknown
|
|
|
|