本文介绍了C ++ GUI STATIC的标签更改为HELP!?!?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我有一个与此相似的脚本:

Hey folks!

I have a script similar to this:

void newThread(void* none){
    
    buff = "New changed text!!"
    Some script that changes texthwnd to buff;
    texthwnd.label = buff;                   //<---- This is what i want!
}


int winmain(blah,blah,,){
    Making window structure...
    
    still making window structure...

    hwnd = CreateWindowEx(blah, classname, windowname, blah);
    ShowWindow(hwnd, something);

    _beginthread(newThread, 0, 0);            //<--- IMPORTANT!

    while(1){
        some important while loop for messages;
    }
}

LRESULT CALLBACK WindowProcedure (blah,blah,blah){
    switch (message){
	case WM_CREATE:
	    texthwnd = CreateWindowEx(0, "STATIC", //<---- Creating the texthwnd.
            "Random Text",
            WS_CHILD | WS_VISIBLE | SS_SIMPLE,
            10, 10, 100, 100, hwnd, 0, 0, 0);
	    break;
		
		
        case WM_DESTROY:
            PostQuitMessage (0);
            break;
        default:
            return DefWindowProc (blah,);
    }

    return 0;
}



我想要的是更改"texthwnd"的文本?

怎么!?!!?!?

我已经大量搜索"了!

我是GUI编程的新手,这是我使用GUI的第一个项目.

这是我第一次在互联网上的任何地方发送问题,所以让我知道是否有我错过的事情!

谢谢!



The thing I want is to change the text of the "texthwnd"?

How!?!?!?

I''ve been "googling" alot!

Im new to GUI programming and this is one of my first projects with GUI.

This is the first time i send a question anywhere on the internet so let me know if there''s something i''ve missed!

Thanks!

推荐答案

SetWindowText(texthwnd,_T("Hello World"));



最好的祝福,
-David Delaune



Best Wishes,
-David Delaune


SetDlgItemText(texthwnd, 0, "Some teext!!!");



还是非常感谢!



Well still thanks alot!!


这篇关于C ++ GUI STATIC的标签更改为HELP!?!?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 17:36