WINAPI32 - How renew, refresh text in Edit (controls) after initialization? (+)

Started by socia, April 29, 2010, 04:19:19 AM

Previous topic - Next topic

socia

WINAPI32 - How renew, refresh text in Edit (controls) after initialization?

I initializate Edit with text.

After i need alter this text on new. But when i use function
Edit_SetText it`s not redraw text in Edit window. After i add functions
SetWindowRedraw and ShowWindow, but that not help so too. What functions needed using for worked text definition(renew, refresh) in Edit(controls) window?

Thanks for answer.

Socia. socia@tut.by

DMac

Try this handy macro.
#define Refresh(hwnd) RedrawWindow((hwnd), NULL, NULL, \
    RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW)


Use it as follows:

Edit_SetText(hwndCtl,"Refresh Me");
Refresh(hwndCtl);

No one cares how much you know,
until they know how much you care.

socia

Thanks.

But i find in Pelles C includes and not "see" that method in headers defenition PellesC\Include *.h

If possible - How apply(include) this method (compiler error :
POLINK: error: Unresolved external symbol '_Refresh'.
POLINK: fatal error: 1 unresolved external(s).)

Thanks.

Socia.

TimoVJL

You must use that 1.st macro what DMac gives.

This might help too:
InvalidateRect(hwndCtl, NULL, TRUE);
May the source be with you

socia

Thanks, all worked.

It`s a i not understand what was be need.

So too thanks for full quotes, i so true not alerty(attentionely) read - more speedly.

Thanks.

Socia.