How do I update my ListBox or window?

Posted on 1999-07-04
Medium Priority
Last Modified: 2010-04-16
I want to update my listbox or is it the window I have to update. How do I do that ?
Question by:bert1
  • 2

Accepted Solution

JensUniweb earned 30 total points
ID: 1199113
The list box has a handle. In plain windows you just do InvalidateRect( handle,NULL,true ); This tells the system that the listbox needs to redraw. And to force this you can do a UpdateWindow( handle ).

Maybe this was not what you meant. But I hope soo.

 Jens Yllman

Author Comment

ID: 1199114
Yes it worked with GetHandle(); UpdateWindow();

But my window unaccessable when I add strings to the ListBox. What do I need to do, to be able to move the window while the program are adding string to the listbox?

It says program not responding when it add strings. But it's ok when the program has finished adding strings.

Expert Comment

ID: 1199115
I'm not sure I understand what you mean. Have you created the ListBox with CreateWindow()??? If so you have the handle to the listbox. Then use that handle.

Maybe you have the listbox in a dialogbox where you don't create the listbox. You can still get the handle for the listbox.

Anyway, I'm not sure I know what you're trying to do.

 Jens Yllman

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question