res protocal for point to swf resource file

J

John

Can some one please help me with this code?
I've spend 2 days on it. And I see the question all over the place but
I do not see the answer. No on is answering the question I am about to
ask.

I am trying to (inside my c++ exe file) include a resource (my swf)
file and open it the Create Window command I found at the following
url.

http://www.codeproject.com/useritems/FlashGui.asp

This page showed me how to display my SWF file from my c++ program with
just 3 lines of code that. It's a miracle because everywhere I
checked they made it see so hard; using 100's of lines of code. And the
example didn't even work. This page is really great. I haven't tried
the other part of the code. But supposedly with another 10 lines of
code he shows you how to get messages from flash.

Find this code was such a relief, but they the author says very
casually:

"Also worth noting is fact that you can insert swf file as resource and
have everything in one executable. Path to your flash (second param to
createwindow) would be then in this format
res://YOUR_EXE_PATH/YOUR_RES_NAME"

Several people have questioned him on this but he has not answered
them.

Can some one from this group go to this URL and answer this question.

I think I've been able to add my SWF file as a resource.

I am using the following code with the res protocol to get to the swf
but its not working:

CreateWindow("AtlAxWin", "res://C:\Documents and
Settings\kourosh.keshavarzi\My Documents\Visual Studio
2005\Projects\runXApp\debug\runXApp.exe/#135",
WS_VISIBLE|WS_POPUP,0,0,GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN),0,0,0,0);

I've tried several variation of this but none work.

May be I created my resource wrong. I'm not sure how to get all these
ids.
I've only been trying to learn and do c++ for a couple of month now.

Thanks for any help anyone can give me.

Kourosh
 
J

Jim Langston

John said:
Can some one please help me with this code?
I've spend 2 days on it. And I see the question all over the place but
I do not see the answer. No on is answering the question I am about to
ask.

I am trying to (inside my c++ exe file) include a resource (my swf)
file and open it the Create Window command I found at the following
url.

http://www.codeproject.com/useritems/FlashGui.asp

This page showed me how to display my SWF file from my c++ program with
just 3 lines of code that. It's a miracle because everywhere I
checked they made it see so hard; using 100's of lines of code. And the
example didn't even work. This page is really great. I haven't tried
the other part of the code. But supposedly with another 10 lines of
code he shows you how to get messages from flash.

Find this code was such a relief, but they the author says very
casually:

"Also worth noting is fact that you can insert swf file as resource and
have everything in one executable. Path to your flash (second param to
createwindow) would be then in this format
res://YOUR_EXE_PATH/YOUR_RES_NAME"

Several people have questioned him on this but he has not answered
them.

Can some one from this group go to this URL and answer this question.

I think I've been able to add my SWF file as a resource.

I am using the following code with the res protocol to get to the swf
but its not working:

CreateWindow("AtlAxWin", "res://C:\Documents and
Settings\kourosh.keshavarzi\My Documents\Visual Studio
2005\Projects\runXApp\debug\runXApp.exe/#135",
WS_VISIBLE|WS_POPUP,0,0,GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN),0,0,0,0);

\ is the escape character. I.E. "\n" is a newline. If you actually want
to put a backslash inside of a quoted string you have to put two. "\\"
becomes "\"

Try changing all the \'s in your path name to \\ and see if it works.

Other than that, this is windows specific.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top