Loading data
-
This is probably a dumb question I am pretty new to ActiveX though. I built a simple ActiveX control using App wizard and got an OpenGL renderer running in my browser, but now I need to be able to load data. Can someone tell me how I am supposed to do this? I'd like to have a data file stored on the server and be able to open it in my ActiveX control. Any help would really be appreciated, Jackson
-
This is probably a dumb question I am pretty new to ActiveX though. I built a simple ActiveX control using App wizard and got an OpenGL renderer running in my browser, but now I need to be able to load data. Can someone tell me how I am supposed to do this? I'd like to have a data file stored on the server and be able to open it in my ActiveX control. Any help would really be appreciated, Jackson
-
Check
FILE
Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975 -
FILE
is a structure and you can use it to open,read, or write files with it.You said you have a data file and you want to read it from your ACtiveX. This is an example from MSDN:/* FOPEN.C: This program opens files named "data"
* and "data2".It uses fclose to close "data" and
* _fcloseall to close all remaining files.
*/FILE *stream, *stream2;
void main( void )
{
int numclosed;/* Open for read (will fail if file "data" does not exist) */
if( (stream = fopen( "data", "r" )) == NULL )
printf( "The file 'data' was not opened\n" );
else
printf( "The file 'data' was opened\n" );/* Open for write */
if( (stream2 = fopen( "data2", "w+" )) == NULL )
printf( "The file 'data2' was not opened\n" );
else
printf( "The file 'data2' was opened\n" );/* Close stream */
if( fclose( stream ) )
printf( "The file 'data' was not closed\n" );/* All other files are closed: */
numclosed = _fcloseall( );
printf( "Number of files closed by _fcloseall: %u\n", numclosed );
}Is that what you want or I misunderstood your problem? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975 -
FILE
is a structure and you can use it to open,read, or write files with it.You said you have a data file and you want to read it from your ACtiveX. This is an example from MSDN:/* FOPEN.C: This program opens files named "data"
* and "data2".It uses fclose to close "data" and
* _fcloseall to close all remaining files.
*/FILE *stream, *stream2;
void main( void )
{
int numclosed;/* Open for read (will fail if file "data" does not exist) */
if( (stream = fopen( "data", "r" )) == NULL )
printf( "The file 'data' was not opened\n" );
else
printf( "The file 'data' was opened\n" );/* Open for write */
if( (stream2 = fopen( "data2", "w+" )) == NULL )
printf( "The file 'data2' was not opened\n" );
else
printf( "The file 'data2' was opened\n" );/* Close stream */
if( fclose( stream ) )
printf( "The file 'data' was not closed\n" );/* All other files are closed: */
numclosed = _fcloseall( );
printf( "Number of files closed by _fcloseall: %u\n", numclosed );
}Is that what you want or I misunderstood your problem? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975I guess I wasn't clear, I do know how to open close and read files. My problem is getting the file. If the ActiveX control is embedded in a webpage and the file is on the server with that page how do I open that file? Basically what I am trying to setup is something like Macromedia Flash.