1. Help with win32lib.ew

I was trying to do some simple windowing stuff and found that the
refresh on the win32lib.ew doesn't.  When you type something into a window
after doing some action with a button...you can't just print to the window,
"I'm done" or some such...the window doesn't refresh.  I noticed that
WINMENU.E by Jacques Deschenes does have a variable in it that relates to
window repainting, but how is it done with win32lib?  Any help would be
appreciated...

thanks in advance...
(PS I know very little about C, windows programming, or machine code)
Monty in Oregon

new topic     » topic index » view message » categorize

2. Re: Help with win32lib.ew

At 21:20 18-02-98 -0800, you wrote:
>    I was trying to do some simple windowing stuff and found that the
>refresh on the win32lib.ew doesn't.  When you type something into a window
>after doing some action with a button...you can't just print to the window,
>"I'm done" or some such...the window doesn't refresh.  I noticed that
>WINMENU.E by Jacques Deschenes does have a variable in it that relates to
>window repainting, but how is it done with win32lib?  Any help would be
>appreciated...
>
>thanks in advance...
>(PS I know very little about C, windows programming, or machine code)
>Monty in Oregon
>
Hi Monty,

   You can force a window redrawing by calling UpdateWindow() function
It need the handle of the window to refresh.

example:

atom user32
atom iUpdateWindow

user32 = open_dll("user32")
iUpdateWindow = link_c_proc(user32,"UpdateWindow",{C_INT})

c_proc(iUpdateWindow,{hwnd}) -- hwnd is the handle of the window to repaint.




Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at globetrotter.qc.ca

new topic     » goto parent     » topic index » view message » categorize

3. Re: Help with win32lib.ew

Hi, Monty.

Jacques is correct. I'm in the process of re-writing the code. My refresh
mechanism is not right, and the wPuts had some bugs in it. I won't promise
a release date for the next version - I'm being torn in a lot of directions
- but I'll try to shoot for the next couple of weeks.

If I get the font thing worked out (again, I think Jacques nailed it with
the byte alignment), it may be sooner than that.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

4. Re: Help with win32lib.ew

Jacques,


>user32 = open_dll("user32")

                                      /\  this is the name of a dll?


>iUpdateWindow = link_c_proc(user32,"UpdateWindow",{C_INT})


This handle would be the name of a window                             /\
, like CloseWindow below, right?


                               constant CloseWindow =
   create( Window, "name of window", 0, Default, Default, 640, 480 )

Kind of similar to how you talk to a file, right?  atom = open{"file","ub"}

atom would be the handle to the file...

Monty

new topic     » goto parent     » topic index » view message » categorize

5. Re: Help with win32lib.ew

At 22:01 20-02-98 -0800, you wrote:
>Jacques,
>
>
>>user32 = open_dll("user32")
>
>                                      /\  this is the name of a dll?

  Yes it is.
>
>>iUpdateWindow = link_c_proc(user32,"UpdateWindow",{C_INT})
>
>
>This handle would be the name of a window                             /\
>, like CloseWindow below, right?
>
>
>                               constant CloseWindow =
>   create( Window, "name of window", 0, Default, Default, 640, 480 )
>
>Kind of similar to how you talk to a file, right?  atom = open{"file","ub"}
>
>atom would be the handle to the file...
>
>Monty
>

No. iUpdateWindow is a dll function id. it is used to call that function or proc
edure in this case.

  c_proc(iUpdateWindow,{hwnd}) -- call dll procedure.


It's not a handle like a file handle or window handle or display context handle.
 It is a unique identifier to a C procedure or function.
But the syntax is similar to what you do with file or others handle.
Personnaly I prefer to write wrapper around it, this is why I put an 'i' before
the name so I can use the win32 api name for the wrapper. like this:

global procedure UpdateWindow(atom hwnd)
   c_proc(iUpdateWindow,{hwnd}) -- call win32 api procedure
end procedure

NOTE: DLL means Dynamic Link Library, These are files containing functions,
      procedures and  resources (icon,menu,bitmaps)  that can be called at run
                 time. Windows api is contained in many dll, "user32.dll", "gdi3
2.dll",                         being the most frequenly used.




Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at globetrotter.qc.ca

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu