3 Replies - 1789 Views - Last Post: 18 July 2011 - 10:13 AM Rate Topic: -----

#1 SWEMike  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 09-December 10

Set a windows form title on runtime

Posted 18 July 2011 - 08:33 AM

I'm using Visual Studio 2008 on Windows 7 x64.

I'm trying to make a function that changes the form title when it's used, but I have no idea how to change the title. I have googled a lot but not found anything that seems to help me. I'm pretty new to C++, the Win32 API and things like that so I might just have missed something.

Thank you in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: Set a windows form title on runtime

#2 jjl  Icon User is online

  • Engineer
  • member icon

Reputation: 1046
  • View blog
  • Posts: 4,449
  • Joined: 09-June 09

Re: Set a windows form title on runtime

Posted 18 July 2011 - 08:52 AM

setWindowText
Was This Post Helpful? 0
  • +
  • -

#3 SWEMike  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 09-December 10

Re: Set a windows form title on runtime

Posted 18 July 2011 - 09:10 AM

Okay, so, what do I need to do? I know I must add some namespaces or import DLLs and stuff as usual... Sorry, I really am not too experienced with the API.

EDIT: Oh, I included the required afxwin.h, but I still need to get the window handle for the form, how would I do that from the window's .cpp file?

This post has been edited by SWEMike: 18 July 2011 - 09:15 AM

Was This Post Helpful? 0
  • +
  • -

#4 #define  Icon User is offline

  • Duke of Err
  • member icon

Reputation: 1276
  • View blog
  • Posts: 4,396
  • Joined: 19-February 09

Re: Set a windows form title on runtime

Posted 18 July 2011 - 10:13 AM

You can have a look at Aphex19's tutorial, see if that is of any use.

Intro to the Windows API Part 3: Creating and using controls
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1