|
Firstly, this is incorrect forum. You should have posted this here: http://www.codeproject.com/script/comments/forums.asp?forumid=1647
Secondly, here is answer to your question:
GetProcAddress()[^]
|
|
|
|
|
hi friend i want souece code of polynomial program (add,multipy,..two polynomial) and also need the source code of aoe network in graphs and source code of winner tree program please help me as soon as possible.
Sincerely yours
|
|
|
|
|
My contract rate is > $100 an hour. Alternatively, you can do your own homework, and then I'll help for free, when you ask specific questions that show you've done somethig yourself.
I suspect you meant to post this in the Visual C++ forum.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I am using sendASPI32Command for writing data to CD. But for a particular size of data sendASPI32Command returns SS_ASPI_IS_BUSY error. The error occurs when writes the last track data.
Could u pls tell in which condition this case occurs.Please help..........
Ajay
AJay
|
|
|
|
|
Have you tried MSDN ? This doesn't look like a C++/CLI question to me, have you tried the visual C++ forum ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have a window handle (HWND) obtained from a DLL (the lib creates its own dialog form and returns handle to it - /library is written using MFC - code is as follows/).
What I need to do is to 'dock' this window somehow in a TabControl of an application written in Managed C++, VS 2005 (preferrably as a new Tab).
So basically I need sth like conversion from HWND to a usable object in .NET (Control^ or TabPage^ perhaps?). What I tried to do, is use of System::Windows::Forms::Control::FromHandle() function with my Handle casted to IntPtr, but it didn't work (my guesses: it only handles controls already created using .NET, not 'simple' WinAPI windows). It's also possible, that I've missed something obvious - I'm a complete newbie to all this .NET stuff.
My 'main' application used to also be written using MFC, so I could convert this handle back to CWnd* (using FromHandle() )and act on it as on a 'normal' MFC window (in eg.: call ShowWindow(SW_SHOW) or SetParent() for it).
How to do such a thing in .NET (meaning: to get a window from HWND, place it as a child of a Windows::Forms container (like TabControl or sth else), move/resize it to client's dimensions, and then show it to the user)?
A sketch of code that creates the window:
HWND LoadDialog() {<br />
CMyDialog* pNewDialog = new CMyDialog(); <br />
<br />
pNewDialog->Create (MAKEINTRESOURCE(IDD_RESOURCE), NULL))<br />
<br />
return pNewDialog->GetSafeHwnd();<br />
}
PS. I've posted a copy of this post to codeguru
|
|
|
|
|
matmus wrote: PS. I've posted a copy of this post to codeguru
If you get a solution, please post it here I'm curious about this one.
I do know Control::FromHandle() returns the Control already associated with an HWND, not a
Control created from an HWND.
I have always wondered if you could create a control from an HWND though. At first thought,
there's alot of reasons it wouldn't work well, especially with an MFC HWND...
Thanks,
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: At first thought,
there's alot of reasons it wouldn't work well, especially with an MFC HWND...
To be honest... now I'm having these thoughts (I still hope that it's possible though, my faith is just a bit weaker - WinApi is not assembly language after all, and what I need is not a 'full object' (meaning ::Form) - I was thinking of it rather as some kind of a wrapper, to call functions on (thought it'll be easier to use embedded .NET/Managed C++ functions than go down to API level).
BTW: why do you think, that MFC HWND is somehow special? In my opinion windows after creation are indistinguishable. Till now I was convinced that (in MFC) i can call FromHandle() on every window (even windows, which I don't own) - now I'm not so sure of that.
Since I've got no answer so far, I've slightly changed my approach.
Basically the question still is:
How to place this window (having only its HWND) as a new tab page in TabControl created via Managed C++ /I get the window by HWND and have to handle/display it somehow in my application. Creation/destruction ow this window is performed by the plugin itself/
But... I no longer care if I need to convert HWND to System::Control or do the exact opposite: convert TabPage to HWND and use API functions to bind them). I just need to get it done.. somehow (if it involves mixing managed and unmanaged code - so be it however I still hope that this is avoidable ). I've considered even converting .NET object to MFC, still I don't even know if it's possible, not to mention the 'howto' part.
Could someone point me at a usable piece of code?
Thanks in advance,
|
|
|
|
|
matmus wrote: BTW: why do you think, that MFC HWND is somehow special? In my opinion windows after creation are indistinguishable.
True, HWNDs are HWNDs. The problem that comes to mind is that .NET isn't a framework specific to
Windows. MFC is. The little things MFC does with message handling may not be compatible with
what the Windows .NET implementation does. So to have an MFC window mixed in with .NET forms in
the parent/child heirarchy may or may not work.
Of course, we know that the Windows implementation of .NET is using HWNDs behind the scenes for
its "forms" but the .NET framework wasn't meant to be Windows specific.
For those of us using .NET specifically for Windows, I think it could/would be handy to be able
to create .NET Control objects from an HWND. There's the Microsoft.Win32 namespace for Windows-
specific stuff, so that would be a good place to put it IMO.
We'll see what happens with the next versions of MFC. I know there's going to be some additions
for mixed-mode programming and I'm anxious to see what they add, since that's what I do
Until then, all my UI stays MFC and I'll use the .NET framework for anything else I can leverage
from it that's non-UI related.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have some extern/global variables and want to localize them to different class which are using them.
In other words I want to move them to different classes, utilizing their functionalities.
Note: These variables are shared by all the classes.
Please suggest me a way of doing it.
Thanks in Advance
S.S
|
|
|
|
|
i make a multi-dimesion array in a class and in its private.
and i want an array of pointer to return this addresses and i want to make it multidimension.
how can i do that.
thanks
******************
******************
** Ahmed Ismail **
******************
******************
|
|
|
|
|
My managed c++ assembly has a strong name and was signed with proper certificate.
When it's hosted by IE with StrongNamemembershipCondition, it works fine.
If I use PublisherMembershipCondition instead of StrongNamemembershipCondition, it doesn't work and get the below security exception.
Unverifiable assembly '...' failed policy check
How can managed C++ be hosted by IE with PubhliserMemberShipCondition?
|
|
|
|
|
When I run my program (.exe) and something goes wrong that makes the gui disappears (program over), subsequent runs would always die the same way. I do not get an unhandled exception msg. Only after a reboot of the pc does the program work correctly again. It seems like there's a process or something left behind when the program doesn't close properly. Does a program have more than 1 process in the task manager that I may need to kill before running again?
|
|
|
|
|
The GUI may disappear but that doesn't mean the process has ended.
So, yes, there can be processes left "running".
Have you looked in task manager to see if your EXE is there?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: Have you looked in task manager to see if your EXE is there?
Yes it is right there next to the Fish Filet.
|
|
|
|
|
...and yes, I'll take fries with that.
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi...
I'm having stupid problem with pointer to member functions. The following simple test program compiles, but crashes at run-time. Can anybody help me out here?
class cTest{
public:
double rand_mt(void){
return (1000.0);
}
double rand_cpp(void){
return (2000.0);
}
double (*cTest::nrand)(void);
void init(int choice){
if (choice==1){
double (cTest::*nrand)() = &cTest::rand_cpp;
} else {
double (cTest::*nrand)() = &cTest::rand_mt;
}
}
};
void main(){
cTest a;
a.init(1);
cout << a.nrand() << endl;
}
This simple program compiles, but crashes. It works fine if I don't use a class.
Why?
Thanks for your help,
Niko
|
|
|
|
|
myhanguk wrote: , but crashes.
It is because, you are using nrand without initiazing it.
Ask such questions in VC++ forum.
Prasad
MS MVP - VC++
|
|
|
|
|
Try this (modifications marked in red):
double (cTest::* nrand)(void);
void init(int choice){
if (choice==1){
nrand = &cTest::rand_cpp;
} else {
nrand = &cTest::rand_mt;
}
}
You were just assigning function pointers to local variables in init() instead of assigning
to the member variable nrand.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
myhanguk wrote: double rand_mt(void){
blockquote>
i am beginer in c++
but i want to know what (void) refere to?
thanks
******************
** Ahmed Ismail **
******************
|
|
|
|
|
Hello,
I have a strange problem. I want to send some objectes over Ethernet (UDP One packet is one object) After that I Deserialize the data, but I get allways an exception that there is an Invalid binaryheader. I don't have any idea how I can solve it.
my code is
<br />
int size = socket.Receive(buf);<br />
BinaryFormatter serializer;<br />
MemoryStream^ ms = gcnew MemoryStream(buf,0,size);<br />
ms->Seek(0, SeekOrigin::Begin);<br />
LogMessage^ logMessage = (LogMessage^)serializer.Deserialize(ms);<br />
Console::WriteLine("{0}", logMessage->ToString());<br />
ms->Close();<br />
and the sending function:
<br />
MemoryStream^ ms = gcnew MemoryStream();<br />
BinaryFormatter serializer;<br />
<br />
serializer.Serialize(ms, logMessage);<br />
ms->Flush();<br />
ms->Seek(0, SeekOrigin::Begin);<br />
<br />
array<unsigned char>^ data = ms->ToArray();<br />
socket->Send(data);<br />
ms->Close();<br />
I have checked the MemoryStream and there is the whole data available (Sending and receiving)
Best regards
Hansjörg
|
|
|
|
|
Hi all
Please suggest me book for managed c++.
Its better if it doesn't start from basics of c++ like(control constrcts,class,object,inheritance)
It better if it is microsoft publication.
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
The best C++/CLI book is the Manning book by our own Nishant Sivakumar. It's called C++/CLI in Action.
He also answers questions here a lot, so if you read his book, you can get direct access to ask him questions.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am trying to build up a program in C++ in order to read an xml file and create an output text file (output.txt) which does not retain the xml tags and only the text in between the start and end tags.
For example for the following xml file:
*Abstract*
*AbstractText*The amino acid sequence of APP is highly conserved and age-related Ass aggregates have been described in a variety of vertebrate animals, with the notable exception of mice and rats. Three amino acid substitutions distinguish mouse and human Ass that might contribute to their differing properties in vivo. To examine the amyloidogenic potential of mouse Ass, we studied several lines of transgenic mice overexpressing wild-type mouse amyloid precursor protein (moAPP) either alone or in conjunction with mutant PS1 (PS1dE9). Neither overexpression of moAPP alone nor co-expression with PS1dE9 caused mice to develop Alzheimer-type amyloid pathology by 24 months of age. We further tested whether mouse Ass could accelerate the deposition of human Ass by crossing the moAPP transgenic mice to a bigenic line expressing human APPswe with PS1dE9. The triple transgenic animals (moAPP x APPswe/PS1dE9) produced 20% more Ass but formed amyloid deposits no faster and to no greater extent than APPswe/PS1dE9 siblings. Instead, the additional mouse Ass increased the solubility of accumulated amyloid in detergent and exacerbated amyloid deposition in the vasculature. These findings suggest that although mouse Ass does not influence the rate of amyloid formation, the incorporation of Ass peptides with differing sequences alters the solubility and localization of the resulting aggregates.*/AbstractText*
*/Abstract*
How would i used xerces parser to create an output file with only the text in between the tags?
|
|
|
|
|
I see no evidence that this is a C++/CLI question. If it's not, then standard C++ contains no DOM or SAX implimentations, but both are easy to come by on the web ( and, obviously, a DOM is even easier, if you're using Windows, there's a COM object you can use )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|