|
hello can any body tell me whether there is ne library in c++ using which i can display a jpg image in c++ output window.or send me ne code for this program.
thanx
|
|
|
|
|
http://www.codeproject.com/bitmap/cximage.asp
|
|
|
|
|
Hi all,
I'm trying to show a form using show but I'm getting some odd behaviour. Here's the code,
<br />
SplashScreen* splash = new SplashScreen ();<br />
splash->Show ();<br />
<br />
if ( ! BCM->ValidateConfigurationFile () )<br />
{<br />
return 0;<br />
}<br />
else<br />
{<br />
if ( BCM->RunLoginScreen () )<br />
{<br />
Application::Run ( new NetworkView ( BCM->getAccessLevel () ) );<br />
}<br />
return 0;<br />
I want the splash form to stay open until it is closed in the RunLoginScreen () method. The form however doesn't open until the login method opens a login screen. Can anyone tell me why I'm getting this behaviour.
Thanks in advance guys.
|
|
|
|
|
Right, new probelm.
Apparently it wasn't a problem with the show method, it's a problem with the pictureBox. I can't seem to use a pictureBox whilst using the form->Show () method. If I use ShowDialog () then alls good but this isn't what I need to do.
Does anyone have any idea why I can't use, or more correctly, why my pictureBox images won't show when I use form->Show (); Or an alternative way to go.
|
|
|
|
|
Given the declaration. int *a; The statement. a = new int [50]; Dynamically allowcates an array of 50 components of the type?
int, int*, pointer, address?
|
|
|
|
|
You get a pointer to an array of 50 unique integers.
|
|
|
|
|
int* a; declares a as a pointer to an int .
a = new int[50] allocates an array of 50 int , and then returns the address of the array in memory into a.
then, you can code a[1] to access the 2nd cell on the array.
if you wanted an array of pointers to int, you should write this :
int* a;
a = new int*[50];
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Not quite. That would be:
<br />
int **a = new (int *)[50];
<br />
int *b = a[0];
<br />
int c = 0;
<br />
b = &c;
<br />
a[0] = &c;
<br />
*b = 5;
<br />
*(a[0]) = 5;
(Note: I wrote this code in the input box and didn't compile it to double-check if it works, so if I got something wrong please correct me.)
Like the other posters said, the code "int *a = new int[50]" allocates an array of 50 integers on the heap and assigns a to the address of the beginning of that array.
|
|
|
|
|
Thank You very much I wish I would of found this site Last year because I Graduated today from Farmingdale suny I thank all comrades of this site Thank You
|
|
|
|
|
Question:
typedef void (* FUNCTION_PTR) (float*, float**); //.h
float InArray[10];
float* OutArray[5];
float first_element, second_element;
(*FUNCTION_NAME)(InArray, OutArray); //Calls the function
OutArray_first_element=??????????????//how do I access Out Array elements?
OutArray_second_element=????????????//how do I access Out Array elements?
Thanks, Mike
|
|
|
|
|
OutArray[0][0] gets the first element.
OutArray[0] gives you the first array, then the second [0] indexes it. You have an array of arrays there. The real question is how do you know the dimensions.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
OutArray has a size of 8 and all are floats.
InArray's (float) size I control. I can only access the
app through this DLL, so I can't see their dimensions and typing.
I see the first OutArray element
just fine. I've tried many dereferencing and array
indexing tricks and I still see no data on the other elements,
assuming I'm hitting them. Any other ideas?
Can you assume an dimension and give me an example
to be sure I've got it right?
Thanks, Mike
|
|
|
|
|
Well, you need to do OutArray[0][x], because it's a ** ( assuming that it's an array of 8 dimensions that was passed in as a pointer ). If that doesn't work, then something else is broken.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
I've got an application that I've added language capabilties by means of resource files and cultures. This works ok and I have no problem with it what-so-ever. I now want to add another resource that holds all the images my application will use. My problem comes whenever I try to use the resource. My app complains about the images resource or when I manage to sort that problem it complains about the language resource.
I have had both working on occasion but it seems to be very flakey and sometimes chooses not to work for no apparent reason other than the project being closed over night. Could someone explain to me the exact way in which to add .resX files to projects and what setting should be set in the project configuration because I think I may have misunderstood the process somewhere along the road.
Thanks in advance.
Richie
|
|
|
|
|
I've been reading about this recently in Chris Sells book, "Windows Forms Programming in C#". He has a 30 page chapter on the subject in which he describes in detail how to embed resources into a .NET Framework executable.
The process is a little different in C++, and. in all probability, depends on which version Visual Studio .NET you are using.
If you haven't tried it already, what happens when you open the compiled executable in Ildasm.exe? The manifest should show your resources and the associated namespaces. This is from Chris's book: "To check that a file has been embedded properly into your project's output assembly, you can use the .NET Framework SDK tool ildasm.exe. This tool shows all embedded resources in the Manifest view of your assembly".
Depending on the method that you used to embed the resource, he goes on to describe the process that Visual Studio .NET uses to assign the default namespace and the actual path to the resource. He also points out that building your project causes the .resx data to be embedded as nested resources, which are resources grouped into a named container. He then goes on to describe several methods for loading these resources.
You don't say in your post, but, how are you attempting to access these resources?
|
|
|
|
|
Thanks for the pointer. I think it was to do with the project configuration. I went through it and changed it where required and it seems to be ok (for now...). I had to change the resource output file names in configuration. I now know to use the ildasm.exe to see if they are being embedded correctly.
Thanks again.
Oh and I was using the ResourceManager class to access them.
|
|
|
|
|
I have C++ libraries which i want to use in C application.
Please help.
Lata Agrawal
|
|
|
|
|
|
hi,
I have a set of avi files how I can I read one avi and write the video and audio assoiated with that avi to another new avi(to be created).
and also let me know how to join to avi,s in c++(vc++/borland c++)
regards
shaan
|
|
|
|
|
DirectShow has a number of APIs desined specifically for this purpose.
You'll find that it's not really a simple, intuitive process, though.
If you can locate the SDK tools that come with the DirectX SDK, there should be one known as: GraphEdit.exe
Using DirectShow[^]
|
|
|
|
|
How does one go about playing an audio file in C++? Is there any way to use mp3's?
Candz
|
|
|
|
|
http://www.codeproject.com/audio/mp3player.asp
|
|
|
|
|
what about more advanced features? e.g. how do you continuously play a file? I found mciSendCommand(), but cannot work out the device id (i am not a multimedia programmer thus not familiar with these stuff )
with wav file functions, you can ask the system to play the sound in a loop...
|
|
|
|
|
If you just want to play a simple wav file, try ::PlaySound(...). very simple
include file:
<mmsystem.h>
|
|
|
|
|
I was just playing around with the VC++ Express, mixing up template code and managed classes. I wasn't able to figure out how to write a template class (managed or unmanaged) that can work with both managed and unmanaged classes. Is it even possible?
There are obvious syntactic differences, for eg, it's T * for unmanaged and T ^ for managed classes.. I tried specializing the template for managed classes, but then couldn't figure out how.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|