1. Re: Child windows with Win32Lib

Thanks!  =|:o)  Well, I've been programming for almost 4 years now (in DOS), and
Windows programming was impossible for me to do, unless I did it through VB,
heheheh.  I was never able to write Windows programs in C, but after I taught
myself the Win32 API through Euphoria, everything started to make sense, and I
was able to write Win32 programs in C........Hehehe..  The funny thing is that I
haven't wrote any programs in C in about 4 months since I've been learning this
stuff.  Speaking of C, I need to get back to working on ABSprite v2.0..  Sorry
it took so long to reply..  I've been goofing off with my email lately..  Heheh.

   Austin Cathey (aka The AfterBeat)

P.S. Some stuff for everyone (they probably already figured this stuff out.)

-- #1 start --

include dll.e

constant
   dll_kernel32 = open_dll("kernel32.dll"),
   api_GetModuleHandle = define_c_func(dll_kernel32, "GetModuleHandleA",
{C_POINTER}, C_POINTER)

-- Get the program instance handle --
atom hInstance
hInstance = c_func(api_GetModuleHandle, {NULL})

-- #1 end --

-- #2 start --

include machine.e

--------
-- reallocate
--------
global function reallocate(atom oldblock, integer nbytes)
   -- Reallocates a block of memory --
   atom newblock

   -- Allocate space for the new block --
   newblock = allocate(nbytes)
   if not newblock then
      return 0
   end if

   -- Copy the contents of the old block --
   mem_copy(newblock, oldblock, nbytes)

   -- Free the old block --
   free(oldblock)

   -- Return a pointer to the new block --
   return newblock
end function

--
-- You all probably knew that one..  If not, well, now ya know.
-- There's probably a better way to do that, but, I'm not sure.  Heh.
--

-- #2 end --

Daniel Berstein wrote:

> At 05:40 PM 02-03-1999 , you wrote:
> >Heh....   Well, I just learned how to create MDI windows yesterday, and I
> >had so much FUN learning how to do it *sarcasm*....  Heh.  I don't know how
> >to do it in Win32Lib, but I know how to do it using the Win32 API...  I'm
> >using the API wrappers that I made..  If anyone's curious why I'm making my
> >own set, it's because I find it easier to teach myself the Win32 API this
> >way..  Well, here's the code..
>
> You are on the right way to learn Win32 programming Austin. Congratulations!
>
> Regards,
>          Daniel  Berstein
>          [daber at pair.com]

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu