Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-12

Win32 Question

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tim Gustafson

Hello

I am starting a project called "Tsuris" and I want to make it as portable as possible. To accomplish this, I have created an abstract TBaseSystem type that handles all the routine stuff that stays the same from platform to platform, and then I've begun implementing a TSystem class that overrides the TBaseSystem and adds whatever functionality that is platform-specific. For the purposes of this example, I have created a TSystem class that works in a Win32 environment. I copied a lot of the code in the WinHello.pp demo that was distributed with the compiler. Everything seems to work fine except for the redrawing of the window. For some reason, it seems that the application is never receiving the WM_PAINT message, and therefore the screen is never being repainted. I would really appreciate a second set of eyes looking at the code (it's pretty straightforward at this point) and telling me what I'm missing. I've uploaded the source code to:

http://timmerca.com/tsuris/

for anyone who would be so kind as to give it a look.

Thank you very much in advance!

Tim

Reply by email

Hans Mårtensson
to Tim Gustafson
you wrote
For some reason, it seems that the application is never receiving the WM_PAINT message, and therefore the screen is never being repainted.

I had the same problem once, and the solution I got from this mail list was to add the following call:
invalidaterect(window,0,true);
because the system must have the information that the window needs repaint. (The 0 means all the window. Alternatively a rectangle can be specified.)

Hans Maartensson

Reply by email

Timmer
Show quoted text 5 lines
I had the same problem once, and the solution I got from this mail list was to add the following call: invalidaterect(window,0,true); because the system must have the information that the window needs repaint. (The 0 means all the window. Alternatively a rectangle can be specified.)

The only problem is that this was working exquisitely in the WinHello.pp demo and it was working well in the program I published until I moved some things around and now it seems to be broken. :(

Tim

Reply by email