POV-Ray : Newsgroups : povray.programming : Invoking POV-Ray via GUI Extension : Re: Invoking POV-Ray via GUI Extension Server Time
29 Jul 2024 00:35:13 EDT (-0400)
  Re: Invoking POV-Ray via GUI Extension  
From: Friedemann Schmidt
Date: 7 Mar 1999 20:40:27
Message: <MPG.114d4849c34510d7989680@news.povray.org>
[Dieser Folgebeitrag wurde in povray.programming plaziert und eine Kopie 
wurde an den zitierten Autor gesandt.]

Hi Ryan,

in my GUI extension (Visual C++ 4.0) I declared the variables which have 
to be accessed from POV-Ray and the external program by

  // Global variables which could be read by POV-Ray (as client) 
  // and also the server program
  #pragma data_seg("TVPOVCOM_GLOBAL")
    HWND hPOVWindow_g = 0;
    HWND hAppWindow_g = 0;
    BOOL boEnabled_g = FALSE;
    char acRenderFile_g[_MAX_PATH] = "\0";
    ...
  #pragma data_seg()

In the DEF-file I included the following:

  SECTIONS 
    TVPOVCOM_GLOBAL READ WRITE SHARED

I didn't get a shared InitStruct working for myself. So, if I want to 
start a rendering by my program, I call a function StartRender(filename) 
which stores the filename in acRenderFile_g. Then it drags a (hopefully) 
none existing file "tvpovcom.StartRender" to POV-Ray. POV-Ray then calls 
the DragFunction in which you can start the render process of 
acRenderFile_g if DropType==dfRealDrop and the name of the dragged file 
is "tvpovcom.StartRender".

I know, this is a bit circumstantial, but it works fine.

Bye,
Friedemann
-- 
Friedemann Schmidt
F.S### [at] fhtw-berlinde
Raytracing-Gallery: http://www.rz.fhtw-berlin.de/~s0049669/indexe.html
TextureView: http://www.rz.fhtw-berlin.de/~s0049669/software.html


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.