Hi, I was wondering how you could change the head bar of a window in windows API.
This is the line of code that I want it to change:
CAPTION "Spanish Conjugation Quiz"
Hi, I was wondering how you could change the head bar of a window in windows API.
This is the line of code that I want it to change:
CAPTION "Spanish Conjugation Quiz"
asked how to change the window "head bar" (caption) that was set in a resource CAPTION line. correctly pointed toward changing the title at runtime, but in raw Win32 the proper, documented ways are to set the window name when creating the window or to change it later with the window-text APIs or messages.
If the caption comes from a dialog resource, the resource sets the initial title; change it at runtime (for example, while initializing the dialog) by calling the Win32 API that sets a window's text or by sending the WM_SETTEXT message to the dialog window. For a top-level window created with CreateWindow/CreateWindowEx, supply the lpWindowName parameter initially or call the same window-text API later to update the caption. Note the ANSI/Unicode variants (SetWindowTextA/SetWindowTextW) and use the correct form for the project character set.
Common pitfalls and tips:
Lookup for the function setWindowTitle()
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.