|
AFAIK, floodfill exists in GDI and not GDI+, so I'd assume you're not using C++/CLI and if I'm right, you're in the wrong 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 )
|
|
|
|
|
hi all
how can i do something like:
System::Type^ a = int::typeid;
int b = (a^) c;
|
|
|
|
|
What are you wanting to do? I see your pseudo-code but I'm not sure why you think a cast is
necessary.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I'm trying to learn c++ with the goal able to program 2D games like pacman and stuff like mario bros and final fantasy I. Although C++ is new to me, I have done several other object oriented programming languages, like java. However, I never programmed games before.
I read an article about game programming, saying that I need a game engine, it recommended SDL (http://www.libsdl.org/).
When I looked up for some demo's of SDL, I didn't like the program going full screen all the time. Does anyone know if it's possible to make stuff run in a windowed mode with this engine? Also, is this a good game engine to start with and will I need more advanced engine later on?
|
|
|
|
|
I am new to window programming and I need to do a task which is to know whether all the child dialogs have been exited before closing the main dialog. Can you please direct me, how can i do it?
Further explanation is the main dialog should not exit of ESC key unless all the child dialogs are properly closed.
Thanks in advance.
S.S
-- modified at 8:58 Tuesday 12th June, 2007
|
|
|
|
|
Iterate through them and check their Visible property.
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 )
|
|
|
|
|
in my project is asp.net with c# project but my vss schedular is asp.net with vb.net.
Every this schedular is running on night 12.00am .
In that schedular i have somany doc files and excel files,.pdf files.
So while schedular running time html paths and actual document paths but some times it automatically stopped then i want do if any document contains problem then schedular ignore's that document and goes to next document.For this i want code. Iam sending some of the classes of the my project.
<pre>
public function get vss connection()
Public Function PopulateProject() As Boolean
Private Function PopulateSubProject(ByVal sParent As String, ByVal ItemIsDeleted As Boolean) As Boolean
Private Function Traverse(ByVal sProjectPath As String, ByVal SWFPath As String)
Private Function PopulateFiles(ByVal sParentID As Long, ByVal sProjectPath As String, ByVal sFolderPath As String) As Boolean
Private Sub InsertMenuRights()
Private Sub InsertDocNames()
Private Sub CreateFolder(ByVal Path As String)
Private Function GetNWExt(ByVal FileName As String) As String
Public Sub Conversion()
Private Function GetHTMLPath(ByVal FilePath As String)
Private Sub DocToHTML(ByVal FilePath As String, ByVal HTMLPath As String)
Private Sub PptToHTML(ByVal FilePath As String, ByVal HTMLPath As String)
Private Sub PDFToHTML(ByVal FilePath As String, ByVal HTMLPath As String)
Private Sub ExcelToHTML(ByVal FilePath As String, ByVal HTMLPath As String)
Private Function GetTPath(ByVal DocPath As String)
Private Function GetTruncPath(ByVal HTMPath As String)
where i will mention code in this classes.Please help me.
</pre>
samrama
|
|
|
|
|
Then why are you asking in the C++/CLI forum ? Don't cross post, pls.
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 feel like a bit of a newbie asking this, but I have never had to access elements on the main form from outside it before.
So here it is: I need to access a textbox from a cpp file .... the textbox is on the main form which is initialized in the main function ... with the usual Application::Run.
in the main cpp file:
..........................................
#include "Form1.h"
int main(array ^args)
{
Application::Run(gcnew Form1());
Form1::textBox1->Text = "some text";
}
...........................................
This doesn't work of course, because I am referencing the header class itself, and not the form instance .... but what is the form instance ????
now ... I know I could use ...
Form1^ myForm = gcnew Form1;
myForm->ShowDialog();
except that gcnew objects cannot be declared globally, and I need to access some of the form elements from other parts of the code, not main().
So I'm stuck .... any help would be appreciated.
Thanks
Aaron
|
|
|
|
|
aaron_leese wrote: I have never had to access elements on the main form from outside it before.
Good, you don't want to... check out the Model-View-Controller[^] design pattern.
|
|
|
|
|
yeah I know, but I still want to ... it is not always desirable to have a couple layers of indirection between interface and data.
|
|
|
|
|
It's never desirable to have anything until it is desirable to have it. That is the entire point.... never mind.
aaron_leese wrote: yeah I know, but I still want to
Of course you do... I don't know what got into me.
|
|
|
|
|
aaron_leese wrote: int main(array ^args)
{
Application::Run(gcnew Form1());
Form1::textBox1->Text = "some text";
}
...........................................
This doesn't work of course, because I am referencing the header class itself, and not the form instance .... but what is the form instance ????
Hmm...seems to me this also doesn't work because Run() doesn't return until you exit the app by
closing the form.
Form1^ myForm = gcnew Form1; would work but it makes no sense to access controls in the form
before it's created.
Do you have a better example of what you're trying to do?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
sure .. here is all the grubby details....
I have a multithread program .... one thread monitors the gui events, the other looks for incoming midi messages.
There are certain midi messages that trigger subroutines .... and there are buttons that do the same. The gui appearance need to change to reflect when certain subroutines are running, etc.
most of the subroutines change some global variables, and the gui just polls those variables to determine the state of affairs and appear accordingly.
BUT ... sometimes this is not appropriate, and I need to get some of the subroutines to alter the gui directly. No problem is a button is pushed .... big problem if it's a midi command .... because that thread does not have access to the form elements.
so ... succinctly .... how do I get a thread to access a form which is running on another thread.
I think I can do it if i only knew the correct instance name of the generated form.
any thoughts ?
Aaron
|
|
|
|
|
Hi Frnz,
I need to find the version details of my exe file. My exe code is in C++. Can anybody help me for the same in C++ to find the Version of any exe.
Thnz in advance
poojaaa
|
|
|
|
|
First of all, please post non-managed C++ questions on the Visual C++/MFC board[^].
If your EXE has a VERSION resource, you can get it with the help of these APIs:
GetFileVersionInfoSize()
GetFileVersionInfo()
VerQueryValue()
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
can a reflected methode not return gcnew System::Windows::Forms::TextBox()
but just base types like INT ???
if not mean it can return TextBox
where do i go wrong ?
myType = SampleAssembly->GetType("Memory.What");
myObj = System::Activator::CreateInstance( myType );
myMethod = myType->GetMethod("Name");
myMethod->Invoke( myObj , nullptr ); <<<--- here is the error
i have a MessageBox::Show in Memory.What.Name wich is fiered and also shows TextBox->ToString() corect which shoud by returned
(ToString is for testing in the messagebox dont get confused)
An unhandled exception of type 'System.NullReferenceException' occurred in WhatsUp.exe
Additional information: Object reference not set to an instance of an object.
|
|
|
|
|
|
hi all
System::Reflection::Assembly^ SampleAssembly;<br />
System::Type^ myType;<br />
System::Activator::Object^ myObj;<br />
<br />
try {<br />
SampleAssembly = System::Reflection::Assembly::LoadFrom( Path );<br />
}<br />
catch (System::IO::FileNotFoundException^ catchException) <br />
{<br />
Form->_TabCon->_PageStatus->StatusText->Text += catchException->ToString() + System::Environment::NewLine;<br />
return 1;<br />
}<br />
<br />
try {<br />
myType = SampleAssembly->GetType("Memory.What"); <br />
if (!myType) throw (System::String^) "Can´t locate Base Function [incompatible plug ???]";<br />
} <br />
catch (System::String^ catchException)<br />
{<br />
Form->_TabCon->_PageStatus->StatusText->Text += catchException + System::Environment::NewLine;<br />
return 1;<br />
}<br />
myObj = System::Activator::CreateInstance( myType );
<big>What^ W = (What^)myObj;</big>
how can i cast to "What^" ?
i tryed to have a .h .cpp file whit the same declaration as in "Memmory.what" but i get an error
An unhandled exception of type 'System.InvalidCastException' occurred in WhatsUp.exe
Additional information: Unable to cast object of type 'Memory.What' to type 'WhatsUp.What'.
|
|
|
|
|
Try this:
What^ W = safe_cast<What^> (myObj);
|
|
|
|
|
unfortunaly no
same error
this is where i am in the moment :
myType = SampleAssembly->GetType("Memory.What");
myObj = System::Activator::CreateInstance( myType );
System::Reflection::MethodInfo^ mi = myType->GetMethod("Ver");
mi->Invoke(myObj , nullptr );
so i can call the methode but its not to elegant there muss by some other way
so that i can call it like :
LoadedDLL->Ver();
|
|
|
|
|
hi i am new in c++, just developed one c++ dll(win32) from VS2005.
I just want to know how can i use that dll from a simple console c++ application.
or from C#.
please help
[&]&&
My small attempt...
|
|
|
|
|
An unmanaged C++ question which mentions C#...posted on the managed C++ board.
Please take your question to the appropriate board, before I call security...
Visual C++/MFC[^]
C#[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I’m trying to figure out what the best way is to learn C++. Book, on-line course etc. Has anybody here had any good or bad experiences with anything? I’m leaning towards some sort of self paced book.
I have some VB.NET background and one beginner level C++ class years ago. I remember nothing about the C++.
I need to learn enough to be able to take (and pass) a required upper level C++ class so that I can finish a degree that I’ve been working on for 10 years. Plus some C++ knowledge would be nice for my job.
Any help and or suggestions would be appreciated.
Thanks
Brad
|
|
|
|
|
This is the C++/CLI forum. C++/CLI would be easier for you, seeing as it contains the .NET framework that you already know. But, if you want to learn C++, I recommend a book, and if you have any questions about c++, I recommend 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 )
|
|
|
|