|
hi everybody,
i've been trying to display one of my flash animation on a windows form, but i havent succeed so far.
can someone help me?
--always comes daylight after night-----
|
|
|
|
|
Adnan Merter wrote: i've been trying to display one of my flash animation on a windows form
How? Using the Flash ocx? Using a web browser control?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
(OCX)i added a shockwawe flash object to my form but still i cant display my animation.
how i can use this object?
--always comes daylight after night-----
|
|
|
|
|
|
hello
I want to know whether NTL package works in the VC++.NET 2005 enviroment . and how ?
|
|
|
|
|
Member 4125584 wrote: I want to know whether NTL package works in the VC++.NET 2005 enviroment . and how ?
It doesn't, according to this[^]
led mike
|
|
|
|
|
I am using Visual c++ NET 2005 Version.
I have this:
double salary ;
double^ salarym;
My problem is to convert for example double^ type to double. According to above lines, i need to do salary = salarym.
The second problem, I read from a file, how to convert for example
double salary = adapt->GetDouble(1);
|
|
|
|
|
mikobi wrote: My problem is to convert for example double^ type to double. According to above lines, i need to do salary = salarym.
You can use the same syntax used to dereference a C++ pointer:
salary = *salarym;
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I've got a problem using managed c++ and opengl.
The thing is that i'd like to have an opengl instance inside a form, i've tried tutorials like "OpenGL on a windows form" posted in this webpage, but when i compile it it doesn't work, many null references are found... googleing for hours and i haven't found what i'm looking for, help would be really apreciated!!!!!!!
So the first problem is that when I call wglCreateContext for the first time it returns a NULL value,calling GetLastWin32Error it returns 2000. Calling it twice returns a graphics context, i don't know if its the correct context even...
There's the code (GLwin is a Picturebox, it returns a valid Handle as you see it's forced to create it's Handle with CreateControl() ).
PIXELFORMATDESCRIPTOR pfd = {<br />
sizeof(PIXELFORMATDESCRIPTOR),
<br />
1,
<br />
PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, <br />
<br />
PFD_TYPE_RGBA,
<br />
32,
<br />
0, 0, 0, 0, 0, 0, 0, 0,
<br />
0,
<br />
0, 0, 0, 0,
<br />
32,
<br />
24,
<br />
0,
<br />
PFD_MAIN_PLANE,
<br />
0,
<br />
0, 0, 0
<br />
};<br />
<br />
<br />
this->Glwin->CreateControl();<br />
HDC mhDC = GetDC((HWND)this->Glwin->Handle.ToPointer());<br />
<br />
<br />
int iPixelFormat = ChoosePixelFormat(mhDC, &pfd);<br />
SetPixelFormat(mhDC, iPixelFormat, &pfd);<br />
<br />
HGLRC mhGLRC=0;<br />
mhGLRC= wglCreateContext(mhDC);<br />
<br />
if (!mhGLRC)<br />
{<br />
int err=System::Runtime::InteropServices::Marshal::GetLastWin32Error();<br />
System::Windows::Forms::MessageBox::Show(err.ToString(),"Error",Windows::Forms::MessageBoxButtons::OK,Windows::Forms::MessageBoxIcon::Error); <br />
}<br />
else<br />
{<br />
System::Windows::Forms::MessageBox::Show("Ok","Ok!",Windows::Forms::MessageBoxButtons::OK,Windows::Forms::MessageBoxIcon::Information); <br />
wglMakeCurrent(mhDC, mhGLRC);<br />
}<br />
<br />
So if the code ends up with a correct context created, when i try to call
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
i get a "System Violation Exception".
|
|
|
|
|
Lets say that I compiled a simple C++ program that outputs 'Hi there world!!!' into the console window.
Now, how would I make this program bootable (like convert it to an .iso) so that I can burn the iso onto a CD, boot from that CD, and see 'Hi there world!!!' on the screen?
|
|
|
|
|
h1he2 wrote: Lets say that I compiled a simple C++ program that outputs 'Hi there world!!!' into the console window.
Now, how would I make this program bootable (like convert it to an .iso) so that I can burn the iso onto a CD, boot from that CD
You can't exactly do that because that's not how computers work. Try reading this[^].
led mike
|
|
|
|
|
"Create a bootable floppy disk that has all required driver and start-up software on it. You will need a CD driver in order to use the CD in a conventional manner once the system has finished booting. It is wise to use a generic CD driver if you plan on using it in a few different systems."
How do I hope to accomplish this?
Any man who reads too much and uses his own brain too little falls into lazy habits of thinking.
|
|
|
|
|
hey every one...i have a prob.....i am making a program which will generate an exe...i want when i run my program....it should make a text file which is not a problem and one exe file...which is some other program that i built......not the same as the program from which im making this exe....what should i do for that??? i just had a random idea in my mind...i though every file is a file...why not try like text file..so i changed the extension of the exe(that i want to generate by running other one i.e. exe that i want to produce) in txt...then copied that into fputs("all the converted file contents here", outfile)....then tried to run...changed all escape seqence and all( like " changed to \" )...but didn't work as i expected....i knw its a very lame idea.... ...can someone tell me how to do this....any idea guys??/
there are 10 type of people in the world...
01 who understand binary.
10 who don't...
|
|
|
|
|
Don't post the same question twice, it's rude.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hi
How can I get list names of all devices that contain my system (without WMI functions)?
|
|
|
|
|
Hi all,
I created a managed C++(CLR) dll say D. In it Iam using a native C++ file say C.cpp.
I created C* Cobj in my D.cpp. On building I got some link errors. So I included C.cpp and C.h in D's workspace.
But now I am getting some compilation errors :-
error C3861: 'CreateWaitableTimer': identifier not found
CreateWaitableTimer is used in C.cpp. Also in C.cpp, I did like below :
#define _WIN32_WINNT 0x0500
#include <stdafx.h>
#include <windows.h>
#include <stdio.h>
Still I am getting the above compilation error on CreateWaitableTimer...
Pls help me..
Regards,
Vidhya
|
|
|
|
|
What's in your stdafx.h file?
Member 3331059 wrote: So I included C.cpp and C.h in D's workspace
What do you mean by this?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hai
I am trying to change the color of a word, while typing itself, for that i wrote the code as follows.
private: System::Void keypressevent(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e)
{
array<String^>^ keyword = gcnew array<String^>{"#include","#define","struct"};
int length = keyword->Length;
String ^ strRTF = this->richTextBox1->Rtf;
this->richTextBox1->Clear();
int iCTableStart = strRTF->IndexOf("colortbl;");
if (iCTableStart != -1)
{
int iCTableEnd = strRTF->IndexOf('}', iCTableStart);
strRTF = strRTF->Remove(iCTableStart, iCTableEnd - iCTableStart);
strRTF = strRTF->Insert(iCTableStart,
"colortbl ;\\red255\\green0\\blue0;\\red0\\green128\\blue0;\\red0\\green0\\blue255;}");
}
else
{
int iRTFLoc = strRTF->IndexOf("\\rtf");
int iInsertLoc = strRTF->IndexOf('{', iRTFLoc);
if (iInsertLoc == -1) iInsertLoc = strRTF->IndexOf('}', iRTFLoc) - 1;
strRTF = strRTF->Insert(iInsertLoc,
"{\\colortbl ;\\red128\\green0\\blue0;\\red0\\green128\\blue0;\\red0\\green0\\blue255;}");
}
int len = strRTF->Length;
String^ tempst;
String^ result;
String ^key;
int keylen;
int iRTFLoc;
bool found = false;
bool starcomment = true;
int nlen = strRTF->Length;
for(int nchRTF = 0;nchRTF < nlen;nchRTF++)
{
if(strRTF[nchRTF] == ' ')
{
for(int nkeyword = 0;nkeyword<length;nkeyword++)
{
key = keyword[nkeyword];
keylen = key->Length;
iRTFLoc = tempst->IndexOf(keyword[nkeyword]);
if(tempst == key)
{
found = true;
break;
}
}
if(found)
{
if(starcomment)
{
int location = 4+iRTFLoc+keylen+1;
tempst = tempst->Insert( iRTFLoc,"\\cf3 ");
tempst = tempst->Insert( location,"\\cf0 ");
}
found = false;
}
tempst = String::Concat(tempst, strRTF[nchRTF]);
result = String::Concat(result,tempst);
tempst = String::Empty;
}
else
{
tempst = String::Concat(tempst,strRTF[nchRTF] );
}
}
result = String::Concat(result,tempst);
tempst = String::Empty;
this->richTextBox1->Rtf = result;
}
Now my problem is when i am typing the code in the richtextbox it will be displayed like "diov" instead of "void". I
i think its cursor position problem. can you tell me how to recover this.
|
|
|
|
|
What does the cursor have to do with any of this code?
I'm curious if you know what any of this code does or if you're just
using snippets of code obtained from others without knowing how it works...
If you post code in a readable format (use the PRE tags!) you may
get more and/or better responses here.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I'm trying to dynamically load a mixed managed and unmanged assembly developed using VS2005 C++.Net. The code is as followed.
Assembly assembly = Assembly.LoadFile(@"c:\temp\classlibrary1.dll");
The dll was compiled on a machine with VS2005 installed and then copied over to another machine with VS2008 installed only. When I tried to step through the code, I encountered an error on the above line. Following is the exception thrown.
{"Could not load file or assembly 'ClassLibrary1, Version=1.0.2992.40807, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)":"ClassLibrary1, Version=1.0.2992.40807, Culture=neutral, PublicKeyToken=null"}
May I know whether a mixed managed and unmanaged dll developed using VS2005 has compatibility problem when copied over to machine with VS2008 installed only? I noticed a pure managed dll compiled using VS2005 C# will not have the same problem. I've tried installing the Visual C++ 2005 redistributable and the problem persists.
chew
|
|
|
|
|
this code read a some data from file and send to all computer by repeat ring synchronized.
but this code dont work .becuase this code make Thread very much .
i think existed a way for this work but i don't know.
<br />
do<br />
{<br />
Packet=gcnew TcpPacket;<br />
Len=file->Read(Packet->data,0,4096);<br />
Packet->Length=Len;<br />
for (int ClientNumber=0;ClientNumber<SocketsCount;ClientNumber++)<br />
{<br />
Thread ^ThreadUdp =gcnew Thread(<br />
gcnew ParameterizedThreadStart(this, <br />
&SendBuffer));<br />
<br />
info->Add(Packet);<br />
info->Add(ClientNumber);<br />
<br />
ThreadUdp->Start(info); <br />
}<br />
}while(Len>0);<br />
<br />
<br />
private:void SendBuffer(Object ^obj)<br />
{<br />
ArrayList ^arr=(ArrayList ^)obj;<br />
TcpPacket ^packet=(TcpPacket ^)arr[0];<br />
int ClientNumber=(int ^)arr[1];<br />
SendPacket(packet,ClientNumber);<br />
}<br />
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
hi,
i have a code in win32 platform in Vc8 using gmtime to convert localtime to UTC time. but when i was converting the VC8 code to Win Mobile, i wasnt able to do with gmtime. please help out of this situation.
thanks,
Mohanraj
RAJA
|
|
|
|
|
What in the effing world does your question have to do with C++/CLI?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hai,
Hai
I am creating a text editor. My problem is when i was selecting a word, the cursor should point the end of the selected word. I can able to select a word but i don,t know how to place the cursor at the end of the word position.
I am using MC++ (windows form application).
Can you tell me how to do this.
Thanks.
|
|
|
|
|
rose196 wrote: I am creating a text editor. My problem is when i was selecting a word, the cursor should point the end of the selected word.
The mouse cursor? Or do you mean the Caret?[^]
led mike
|
|
|
|