Using greeks characters and sub-superscript in Win32 with C [closed] - c

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I need to set some labels in an engineering software GUI using greek characters and sub or super-scripts.
Could someone explain me how to do this programming in C with Win32?

You will need to instantiate either a web browser control (very heavy, but understands HTML, which is easy,) or a read-only rich text control. (Which is more lightweight but you will have to learn how to format text in it.)

If you've got a label, say, HWND static, you can set its text via SetWindowText(static, L"Unicode_text_ффф");. You might want to explicitly use SetWindowTextW, which is the Unicode version of the function.

Related

Why doesn't assert do anything? What do I need to do to get it to work? [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have experienced a strange problem when using assert in my program.
The program does not terminate even when I add a line of codeassert(false).
But the assert works when I write several lines of sample code. Anybody know why it happened?
If you have:
#define NDEBUG
this turns all assert's into nop's.
If you have differing behaviour, depending on the amount of code, then I guess you don't have NDEBUG defined and I would guess the compiler is simply compiling out the redundant code.
More details about environment are required, however, you give a definitive answer.

Count amount of words, characters, newlines in C [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I know it is not recommended to post code as an image, since I am getting a formatting error when trying to post code on here. Anyway, I am trying to write a simple C program to count number of words, characters, newlines using do while loop. However, the output is not as expected. Please help!
Instead of a do-while, you should try using while. Since your code starts off by checking whether a is any of your if cases, it goes to the else case, and increments the New line variable. If possible, could you share the output screen.

Converting a character into a space in C arrays [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
So lets say I have received a message that resembles the following
"L2N5*8R10!11T0A1K3Y14#4W7O6O9C12R13"
and I am expected to sort out the characters in accordance to the numbers succeeding them and change the characters that are not letters into a space. I have no problem doing the sorting out part, I am only having a trouble while trying to write a function that will change those characters into space.
The out put should be something like this
TALK NOW OR CRY
but I am getting
TALK#NOW*OR!CRY
Can anyone help me figure out what my function should look like so that I can be able to change the characters into space??
Unless you show your code, we'll only be able to guess!!
However, as a general suggestion, I would recommended, you should check each entry against isalpha(). In case you got a return value of 0, replace the entry with a .

Entering text with gtk in C language [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Improve this question
Why am I getting Your Aggregate is(null): in the dialogue I created.
I used gtk_entry_get_text, can anyone point out what I am doing wrong here.
Please be quick as I have to submit my project soon.
Any good tutorials link will also be appreciated.
The pointer returned by gtk_entry_get_text() is temporary and not owned by you, but by the GtkEntry itself. By the time show_info() is called, that pointer will have been made invalid. If you alter the GtkEntry in any way, that pointer may also be invalid. And finally, if the GtkEntry never triggers its activate signal (by you pressing Enter), the global variable will still be NULL.
Fix this by not saving the return from gtk_entry_get_text(). Instead, call it directly from within show_info(). It is up to you how you will give show_info() the GtkEntry to pass to gtk_entry_get_text().
Another way is to use g_strdup() in enter_callback() to make a copy of the entry text. You will need to manually g_free() the string when you are finished with it. You still have to make sure enter_callback() is called.
I fixed the problem by making entry1, entry2 and entry3 as global variables.

C editor with text formatting and context awareness [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am looking for a .c editor that has:
1) text formatting, for example to set some line to bold/italic or different color
2) context awareness
For example I would like to automatic highlight for a code section.
For example between the call to function A and the call to function B to have a different background color.
If I call function A
Or if I am using a local variable that is not initialized to have the variable name marked in red.
Do you know any editor with such features?
Thank you.
I could suggest you a hell lot with syntax highlighting.Sublime on linux,windows notepad ++ on windows,visual studio etc.
But when considering your second requirement I realise that not many editors satisfy the condition and it is better for you to use vim and modify it accordingly.
A few links i can post which will help you achieve the same C/C++ ide using vim
Another one to refer is this question from SO itself Vim for C
Thanks
Or if I am using a local variable that is not initialized to have the variable >name marked in red.
That actually sounds like Intellisense or some other smart code checking.
You can try Microsoft Visual C++ Express and just save files as '.c' instead of '.cpp'.
You can try as well CodeBlocks, CLion (commercial), Code (not as smart, but lightweight and cross-platform).

Resources