Sign in to follow this  
Fixxer

resource trouble

Recommended Posts

Fixxer    100
I cannot get my icon and cursor to work! Here is where I am setting the icons and cursor
	winclass.cbSize = sizeof(WNDCLASSEX);
	winclass.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
	winclass.cbClsExtra = 0;
	winclass.lpfnWndProc = WindowProc;
	winclass.cbClsExtra = 0;
	winclass.cbWndExtra = 0;
	winclass.hInstance = hinstance;
	winclass.hIcon = LoadIcon(hinstance , MAKEINTRESOURCE(ID_ICON1));
	winclass.hCursor = LoadCursor(hinstance, MAKEINTRESOURCE(ID_CURSOR_CROSS));
	winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
	winclass.lpszMenuName = NULL;
	winclass.lpszClassName = WINDOW_CLASS_NAME;
	winclass.hIconSm = LoadIcon(hinstance, MAKEINTRESOURCE(ID_ICON1));

Here is the header file with the resouce defines
#define ID_ICON1			101
#define ID_CURSOR_CROSS		201

and here is my resource file:
ID_ICON1 ICON icon.ico

ID_CURSOR_CROSS CURSOR cursor.cur

Share this post


Link to post
Share on other sites

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

Sign in to follow this