|
Create a Basic __gc class and declare a String or int or whatever you want in it. Ex
String *whatToPass;
|
|
|
|
|
Well. thanks that worked. But how can call Function (In parent Window) from Child Form
|
|
|
|
|
Put the function in the Class so both formms can use it. You could also make it static.
|
|
|
|
|
Thanks for the help. That realy helps a lot.
|
|
|
|
|
Please,
How I get Full File Name(PATH and File Name) from HANDLE of API "CreateFile"??
Help...!!
|
|
|
|
|
With TextBox i wan't to type Interger only.
I know to override key event. if i press a letter, i know how to handle it, but i don't know how can i block it
|
|
|
|
|
This is not a managed C++ question.
You need to catch the keyboard events, and (from memory ) then return TRUE instead of calling the base class. Then this tells MFC that you handled the event. There are actually controls that do this all over the web, including on this site.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
This is managed c++ question.
I am using .net framework 1.1. I don't use MFC application
|
|
|
|
|
Saksida Bojan wrote:
I am using .net framework 1.1. I don't use MFC application
Well, if you're creating a windowed MC++ app ( and the whole world would be wondering why ? ), then the answer is the same, the same messages are being sent and you need to intercept them just the same.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
private: System::Void txtID_KeyDown(System::Object * sender, System::Windows::Forms::KeyEventArgs * e)
{
}
1. This is KeyEvent. I can intercept the messege, but how to block it.
2. How can i return True and event handel has Void for returning.
3. When i press, this event is fired. But when this event is over, it add a char. i can't block that adding.
i found something on this webpage, but i don't want to write a dll.
Is this even posible. I had VB6 and was posible with this method. I prefear MC++
|
|
|
|
|
Saksida Bojan wrote:
How can i return True and event handel has Void for returning.
Obviously, you're using MC++ events, not the events that C++ supports natively.
KeyEventArgs has a property called 'Handled'. Set it to true. This will in effect do exactly what returning true in pure C++ would do, I would hope. If it's already true, then you need to catch the event further down, but I would hope not.
Saksida Bojan wrote:
i found something on this webpage, but i don't want to write a dll.
LOL - I don't see why you'd need to do that.
Saksida Bojan wrote:
Is this even posible. I had VB6 and was posible with this method. I prefear MC++
Yes, it's possible, but I was giving you pure C++ advice, and you're using .NET events. I've not used MC++, I don't see the point. Sorry if we muddled a bit to get to what I hope is the right answer.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you for the help. But i noticed that Handled event is working in KeyPress Only. But it doesn't work in KeyUp and KeyDown EventHandle
|
|
|
|
|
i'm a new programmer in VC++.
recently,i was troubled when establishing a new CTreeView class in my project.everytime i establish a new Class based on CTreeView,an error display:error C2504: 'CTreeView' : base class undefined.
meanwhile,when selectting the CTreeView,a corresponding infomation shows from automation:
the base class does not support automation.
since this,a correponding error C2504 show,what can i do?
|
|
|
|
|
#include "afxcview.h"
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
Hi,
i wanna read text file .
my text file contain double value ! i wanna read this
double value & copy them in array of double in MC++ .
But i can not understand.
is anyone help me?
Best Regards.
|
|
|
|
|
Proper C++ will do this for you, iostreams allow you to specify what you expect to read. I'm not sure if the System.IO namespace does this, or if you need to parse the string yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
Thanks a lot.
I use StreamReader and then readLine() then parse string !
But i found i can open file in binary ,then select which
type i wanna read.
Best Regards.
Mostafa
|
|
|
|
|
I have written an application using MFC CSocket.
I have done some test.
It seems that OnReceive processing waits the end of the OnIdle method. OnReceive don't interrupt OnIdle!!
Is it true ?
Thanks.
Emanuele Reverberi.
|
|
|
|
|
I was wondering how large applications are put together when you have various people working on them. I would imagine that each person would have classes that they are incharge of creating and then making them a dll file.
I am working on an application that has several parts. I created each part as its own project. I can not figure out how to combine them into one application.
For instance, I created an app that creates and formats some text. This is using the .net forms. The main application has a button that opens an instance of this text formating app. How can i get the text formatting app into my main program. I am not sure how to compile it as a dll because it always compiles into an exe. Any advise or resourses would be great. Thanks!
|
|
|
|
|
Anonymous wrote:
I am working on an application that has several parts. I created each part as its own project. I can not figure out how to combine them into one application.
They need to be dll's except for the display layer.
Anonymous wrote:
I was wondering how large applications are put together when you have various people working on them.
Source control, partial classes, discipline.
Anonymous wrote:
How can i get the text formatting app into my main program.
That's not how it works. You should create an application that contains all the UI for your project. Then you can abstract business logic into a dll if you want to, but in C++ unless you use COM, it can be a pain ( not sure about MC++ ). You specify that you're building a dll when you create a project.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you for the reply.
So I do not want to creat separate forms and then compile them into a dll and use that in the main application. Instead, I should do all the UI work in the same project and use dll's to support them? I think i see what your saying. Thanks Chrisitan your always willing to help out =P
|
|
|
|
|
So pretty much i cant make the ui in several different projects then make them dlls for the main project. I should instead creat all the UI in a single project and use classes in dll's to support them, correct? Thanks for the Help Christian =P
|
|
|
|
|
Anonymous wrote:
So pretty much i cant make the ui in several different projects then make them dlls for the main project. I should instead creat all the UI in a single project and use classes in dll's to support them, correct?
Yes, that's right. I suspect you could put UI stuff in dlls, but it's not the way to go, it stops the forms from dealing with each other, and promotes a fragmented approach where lots of dlls mix business logic and the UI. The point of using dlls is to layer the business logic apart from the UI. More than one dll may make sense if there are different parts to your business logic that have narrow fields of interaction, but the UI is best kept in one place.
Glad to help.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Well i have this perfectly terible text type game that, for testing purposes i want to have a DOS version of. (At the moment its just a console app, not DOS compatible)
Here is a sample of the code, and yes its pretty much all like this:
********************************************************************
//The text based carrot game brought to you by me
#include <iostream>
using namespace std;
int main()
{
char a [50];
char b [50];
char c [50];
char d [50];
char e [50];
char f [50];
char g [50];
char h [50];
char i [50];
char j [50];
char k [50];
cout <<"This game was written by Some Guy on forrandomjunk at freewebs\nHELLO and welcom to the CARROT ADVENTURE TRILOGY wich contains all 3 carrot advantures. Enjoy.";
cout <<"\n\nYou are a carrot with no family and no friends and are rather quite lonely, have a look for an inanimate abject to be your new friend, what can you see?\n";
cin.getline (a,50);
cout <<"\n\nCONGRATULATIONS you have found the ";
cout <
|
|
|
|
|
If i get it right, you want to hawe DOS native.
1. .NET framework doesn't support DOS. Command namespace is for framework
2. For cout application use #include <iostrean>
3. Visual Studio will not compile DOS application
4. If you realy want. get DOS c++ compiler, or get like MASM, DASM, TASM assemblers.
|
|
|
|