Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Question] C++, Why use hwnd?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
407
Master Cheater
Reputation: 0

Joined: 25 Oct 2007
Posts: 357

PostPosted: Sun Aug 05, 2012 7:31 pm    Post subject: [Question] C++, Why use hwnd? Reply with quote

Hi,
I'm trying to understand Windows API, and I'm wondering what hWnd does, and how it is different from a regular variable.

In this guide I'm reading, the author writes

Code:
HWND hWnd = FindWindow(0, "notepad");
if(hWnd == 0)
cout << "error, could not find notepad" << endl;


Is there anything I should know about hWnd, or should I just understand that some functions return hWnd type?
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Aug 05, 2012 8:18 pm    Post subject: Reply with quote

all you need to know is that HWND is a type that represents a handle to a window. in the current sdk, HWND is defined to HANDLE. this in turn is defined to PVOID. i say in the current sdk because HWND might be defined to something else in the next version of the sdk. this is why it is important to use HWND instead of HANDLE or PVOID directly for example
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites