Jump to content
Tuts 4 You

Keygen Template in C


Cyclops

Recommended Posts

Nice job. I like how you kept all your code clean and abstracted :)

And the skin plain rocks. Great work! Its nice to see another C/C++ coder around these parts....

Link to comment
  • 1 year later...
  • 4 weeks later...

This is great as I've been wanting to learn more Win32 API programming and haven't found many good examples. At quick glance I'm a bit confused about your variable hwnd. I'm guessing it is there to hold the string the user enters? However, i'm not following where it first reads it. Maybe you can comment...

Link to comment

This is great as I've been wanting to learn more Win32 API programming and haven't found many good examples. At quick glance I'm a bit confused about your variable hwnd. I'm guessing it is there to hold the string the user enters? However, i'm not following where it first reads it. Maybe you can comment...

HWND is just a handle to a window, or another similar type of object. It's a Windows defined type, defined as:

typedef HANDLE HWND;
Link to comment

Cyclops,

First thanks for the great keygen template, I have a question regarding your source base and a modification...

I made the following adjustment to make the background textboxes transparent

case WM_CTLCOLORSTATIC:  
ret = (HBRUSH)GetStockObject(NULL_BRUSH);
SetBkMode((HDC)wParam,TRANSPARENT);
SetTextColor((HDC)wParam, RGB(255, 255, 255));
return (LRESULT)ret;
break; case WM_CTLCOLOREDIT:
ret = (HBRUSH)GetStockObject(NULL_BRUSH);
SetBkMode((HDC)wParam,TRANSPARENT);
SetTextColor((HDC)wParam, RGB(255, 255, 255));
return (LRESULT)ret;
break;

But as a result, whenever the text is updated on the forum, its like overlapping and mushing together, im not sure what causes it but was hoping you might know.

Thanks !

Link to comment
  • 3 weeks later...
  • 1 month later...
  • 6 months later...
  • 8 months later...

Why not use LoadResource, that's as simple as it gets. That is if you don't care about people ripping the xm, but unless the xm is actually yours I don't see the point.

Edited by Killboy
Link to comment

I personally use bin2c to embedd the stuff as a array. Much easier to do, if your library supports loading music from memory.

Another way is to including the sound by nasm and incbin directive as object with a global.

Then playing from memory, if lib is supporting that.

works with c++,masm,nasm...

Link to comment
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...