|
That's way too much code for pretty much anyone here to look through
Are you using MFC for your app's UI? If so, you shouldn't need to change anything
to build the app for CLR.
None of that MFC UI code is going to work if the MFC message loop isn't running or
messages are not being forwarded to MFC from another message loop.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello,
Its ok, But I want to reuse the MFC class in my CLR project.
ie, I have an MFC class for create a CTreeView. I want to use this same class for create a tree view in CLR. That is my problem. I create a form using CLR and I want to add the MFC treeview in to that form. How can I do it?
|
|
|
|
|
Hi, I'm using Visual Studio 2005 C++/CLI. I have setup a zoom function that uses a Matrix class. Changing the Scale of the matrix will cause the image on the screen to zoom in or zoom out. On the zoom in function the upper left corner of the screen (0,0) is anchored so it appears that you are zooming in on the upper left corner. I can't seem to find the correct way to change the bounds of the screen because all of the Screen class properties seem to be read only. Is a screen class the right approach? Ideally I want the zoom functions to zoom relative to where the mouse is clicked on the screen.
Thanks,
Buck Brown
|
|
|
|
|
|
Hi,
I'm wrapping a native DLL with a managed wrapper(DLL) and I'm mimicking some inheritance like follows:
public ref class ManagedBaseClass abstract {
...
internal:
UnmanagedBaseClass *GetBase(void);
...
};
public ref class ManagedDerived : public ManagedBaseClass {
...
internal:
UnmanagedDerived *mWrappedObject;
UnmanagedBaseClass *GetBase(void) { return mWrappedObject; }
...
};
In the C++ DLL, UnmanagedDerived inherits from UnmanagedBase. When I hit the GetBase() method in ManagedDerived, I get a System.AccessViolationException at the return. I add a test before I return to call mWrapperObject->SomeFunc() and I still get the exception. mWrappedObject is non NULL and I'm calling other methods. Any idea what might be wrong?
Thanks,
-Mike
|
|
|
|
|
Sorry, I figured this out. There was an error somewhere else in my code
|
|
|
|
|
i am trying to create an application whis has one more forms and i have problem,
how can i declare a variable, which can be reached and changed by different form
controls(not the same time)?
i mean one of forms change the value of variale and the other form reach it create a process dependent this variable.
--always comes daylight after night-----
|
|
|
|
|
create a public property in a form and by setting its property you can change the value
//declaring property in CForm1
private: int abc;
public :
property int ABC
{
int get()
{
return abc;
}
void set(int value)
{
abc = value;
}
}
// using property in CForm2
#include "Form1.h"
CForm1^ frm = gcnew CForm1();
frm->ABC = 123;
Nigah M Manzoor
|
|
|
|
|
hai
I am using window form application.
Using richtextbox i am going to create a text editor.
when i am typing something in the text editor i want to change the font style, for that which eventhandler shall i use(Textchange or keypress).
thanks,
|
|
|
|
|
you have to use both event handler
in OnKeyPress you know which key has been pressed
and in OnTextChanged you can set the font and other things.
Nigah M Manzoor
|
|
|
|
|
Hi,
I want to have a StatusStripLabel in the StatusStrip display a bubble formatted ToolTip. The problem I'm having is that the SetToolTip function takes a Control, and the StatusStripLabel is not a control; StatusStrip is, but then the ballon will not appear at the label, it'll just appear where ever.
One answer I've heard to this is in an 'OnHover' event for the label to add the StatusStrip to the Tooltip, making it only appear when the mouse is hovering over the label. The problem I have with this is that I want the Tooltip to appear when an error occurs in the application, and not when a cursor hover is taking place.
Does anyone have any suggestions?
|
|
|
|
|
I was able to solve this problem by implementing the ToolTip.Show function and putting in the coordinates manually. But I've run into an issue with the "stem" of the bubble pointing in the wrong direction, (pointing up when the bubble is above the point) and I cannot move the bubble down to manually line up the stem with the point of intrest as it is at the bottom of the application, and the window is maxamized (like an icon in a tray). Any thoughts?
|
|
|
|
|
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...
|
|
|
|