Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Get HWND of Ressource

Get HWND of Ressource

Get HWND of Ressource

Hi there,

I am a VC++ Newbie. More than once I have tried to learn VC++, but I failed because MFC was too complex for me. I am a programmer who wants to know every written line in the code. When I start a Hello World tutorial in VC++, there are to many lines of code, which i don't understand.

So I have discovered Win32. I think Win32 is a library, which includes all base functions of Windows. Please tell me if I am wrong.

So I learned to create a Window by code, using WNDCLASSEX, CreateWindow() and ShowWindow(). Thats pretty fine, but it is not easy to design a window by code. So I want to add a window resource into my project, put controls on it, and then use the ShowWindow() function at any time to display my window. But to use ShowWindow, I need a HWND. How do I get the HWND of a window Resource?

When I'm adding a resource into my project, I choose add dialog. Have I to add the dialog resource to use a window, or is there a "WINDOW RESOURCE" anywhere in the VC++ IDE?

Or is there any other way to display such a window resource.
I am not sure, if I am in the right forum, but I decided to post my question here, because its about Win32.

Thanks a lot,

RE: Get HWND of Ressource

  If you are using Microsoft's Visual C++, Check out LoadResource in the help files.  However, I'm not certain that you can use resources for windows; Dialogs, yes; Windows, Idunno...  try it and see.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close