|
__gc struct hello{
int x;
int y;
};
void main()
{
hello* st[]= new hello* [5];
st[0]->x=199;
}
|
|
|
|
|
You have simply created an array. But you haven't created the individual array members yet! Use the following code :-
__gc struct hello
{
int x;
int y;
};
int _tmain(void)
{
hello *st[]= new hello*[5];
for(int i=0; i<5; i++)
st[i] = new hello();
st[0]->x = 100;
return 0;
}
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
please provide the link of different comprehancive examples of com and com+
and a little help how to run it?
r00d0034@yahoo.com
|
|
|
|
|
if i have hwndle (Intptr)of parent window and hwndle of child window then how to get the point and rectangle of child window with respect to its parent window ?
how to convert HWND into intptr?
r00d0034@yahoo.com
|
|
|
|
|
Hi,
Get the Integer from IntPtr and then get HWND from the Integer.
eg:
<br />
hWnd = (HWND)((int)iPtr);<br />
Thanks,
Firoz
|
|
|
|
|
any bode could tell if i have to point and rectangle of window using its hwndle (HWND ) with respect to its desktop window and its parent window ?
how to get using hwnd plz ans i am waiting for ur reply?
r00d0034@yahoo.com
|
|
|
|
|
Hello there,
Please introduce good book for learning VC++ .NET ...
I want to learn about .NET, writing webservers and etc by MC++ managed code ...
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Thanks
With Best Regards
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi
Can anyone tell me how to execute a activeX control application in .Net framework?
I could compile but it asks me for "which excutable" when i try to run.
Thanks
Yogi
|
|
|
|
|
ydasari wrote:
Can anyone tell me how to execute a activeX control application in .Net framework?
I could compile but it asks me for "which excutable" when i try to run.
You can't execute a control obviously. Add another project(exe) to the solution and make it the default project. In that project use the activex control you are making. Now when you take run, the program would get executed that houses the control.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Hello there !
Sorry for subject
There isn't WAR
I just want to know what is exactly diffrence between VS .NET Enterprise edition and VS .NET Proffesional edition !
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Hello David
Thanks alot for your help
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Good morning
I am trying to port c++/MFC application to .net framework using MC++. With \clr option, everything works fine. But I am not very confident that it is the way as the object are not GC compatible yet.
What i wanted to know is .....is there a way i can test with accuracy that it is going to work on any platform? (that is with out problems) Can anyone tell me how?
If not, then is re-writing the code in MC++ the only alternative (this shud take lot of time)? I mean how is it simple as MS says to convert. Iam very new to .net, or new to windows programming itself. Your suggestions will be very valuable.
Thanks
Yogi
KISS.
|
|
|
|
|
If you simply compile you app with /clr and add no __gc classes or use and __gc classes, then you haven't use the CLR at all. The /clr will add a dependancy to the application so that it won't run on a machine that doesn't have the .NET runtime installed. If all you're doing is /clr with nothing else, it's not worth using the /clr. Only use the /clr if you going to use any of the clr objects or routines.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
I'm starting to get back into trying VS.NET with regards to Managed C++. Originally I found the IDE pretty clumsy (since everything I had known and fought to learn in VS6 had moved or morphed but its starting to get a little easier to understand.
I noticed that you can specify regions of code to be managed and unmanaged using the pragma directive, and was wondering how rigorously other developers used them? Do you explicity add the unmanaged command to the top of your classes, and then if a function does call managed code, this is then declared managed before unmanaging it afterwards? I was considering going all out C#, but there does seem to be quite a slow-down (and I'm still pining for the Doc/View architecture and Windows forms equivalent support for GUI extensions).
I'm still debating over weather to use a .NET assembly for data access, and then make use of C++'s interoperability to develop a largely MFC based client, but calling into managed classes for accessing data. I presume its possible to use managed extensions with ATL too -- I'll probably end up doing one or two shell extensions, and possibly a few Office add-ins
Thanks,
Paul
--
Paul
"It's always the last drink that kills you." [a wise man]
MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446
|
|
|
|
|
Generally I leave my code managed unless there is a good reason not to (performance, easier interop, etc.)
|
|
|
|
|
how to get point(x,y) where mouse click on desktop window
how to capture mouse events which will tell its position ,what button click etc.
is there any interrupt service of mouse where we can write our procedure ? to get mouse event info?
same for keborad ?
r00d0034@yahoo.com
|
|
|
|
|
please read that code and solve mine problem
tmpProcess = new Process();
tmpProcess.WaitForInputIdle();
tmpProcess.StartInfo.FileName="f:\\mirc59t";
try{
tmpProcess.Start();
while(! tmpProcess.Responding)System.Windows.Forms.Application.DoEvents();
}catch{}
tmpProcess.WaitForInputIdle();
IntPtr hWnd=tmpProcess.MainWindowHandle;
Srm=new send_recive_messages(hWnd);
/*/////////////////////////////////////////////////////
managed public __gc class send_recive_messages constructor
////////////////////////////////////////////////////*/
send_recive_messages::send_recive_messages(IntPtr par_hwnd)
{
CString cstr="";
LPTSTR str="";
hwnd=(HWND)par_hwnd.ToInt64();
//////////////////////////////////////////////////////////
HWND h=GetWindow(h,GW_CHILD);
//////////////////////////////////////////////////////////
}
///////////////////////////////////////////
h variable recive null that's why remaining code could not run.
it should not recive zero because the process main window
contain two button and four Static members.
can any body tell why it recive 0?
and what i have to do that it should not recive zero?
r00d0034@yahoo.com
|
|
|
|
|
Could someone please tell me how I would do the following cast/conversion properly? It's late and my brain no longer functions.....
Object* oFields[] = new Object* [iFields];<br />
oFields[i] = (Object __gc* )DateTime::Parse (sData.c_str ()) ;
the compiler currently tells me
error C2440: 'type cast' : cannot convert from 'System::DateTime' to 'System::Object __gc *'
give me c# any day
Thanks
Stephen.
|
|
|
|
|
Stephen -
DateTime is a value-type; it needs to be boxed first before it can be held in an Object array:
oFields[i] = __box(DateTime::Parse(sData.c_str()));
In C# boxing is done for you by the compiler (implicit boxing). In C++, because of the performance overhead associated with boxing, boxing is an explicit operation.
Give ME the full power of C++ any day
Nick
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
|
|
|
|
|
Nick Hodapp (MSFT) wrote:
Give ME the full power of C++ any day
Cool!
Maybe I'll quote you in my next MC++ article. Last time I quoted you, you had used a newly invented word - "performant" - but this time your language was more conservative
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nishant S wrote:
Last time I quoted you, you had used a newly invented word - "performant"
I don't think he invented the word; its one of those American words that just isn't in the dictionary
Blasted dictionaries can't always be right
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|