Skip to main content
GameDev.net gamedev.net
🔒 Locked

Window Class

Started by Smacker_626 Oct 13, 2003 at 8:59 AM 1 replies 350+ views
Original Post
Smacker_626
Smacker_626
I need help with SetWindowLong() and GetWindowLong(). My Window Class Basically works, But in my WndProc Function when I try to Store or Retrieve the UserData from the Window it doesnt work, ive used GetLastError() with FormatMessage() to see what was wrong but it said "The operation completed succesfully". Can anyone tell me howto fix this? And also I would like to know why CWindow::Create() exits the program when i use throw CWindowException(string, __FILE__, __LINE__); it never even does the code in my catch block, it just closes the program. Any help would be appreciated. CWindow.h/CWindow.cpp/main.cpp are here - www.dragonruins.com/CWindow.h - www.dragonruins.com/CWindow.cpp - www.dragonruins.com/main.cpp BTW im using Dev-C++ (www.bloodshed.net) with Mingw/GCC 3.2, with Enable exception handling on in the Project Options
Smacker_626
Smacker_626
Heh, Ive been copying code from other programs to try and get SetWindowLong() to work I guess I forgot to add "this" to CreateWindow() somewhere along the way.

Thanks alot, It works now

-EDIT: I took the files off of my site.

[edited by - smacker_626 on October 13, 2003 12:16:26 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.