|
Thanks for help
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
In addition to swinefeasters' advice (gotta love a handle like that), check out this thread where I've explained step by step how to do this.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Hello Master. Tom Archer,
Thanks alooot for example, it is my honor that someone like you answer me
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
|
|
|
|
|
You're very welcome. Let me know if you need any further assistance.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Hi there,
For example i want to put Flex Grid activex in CView ...
How could i do that ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Haven't test it before but I guess you can do it with Create() function of that ActiveX.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Hi, i would like to give my toolbar buttons the IE6 look. Well, is this a style i should set, are they owner draw??? Any idea
Thanks
Gabriel
don´t worry drink happy
|
|
|
|
|
Look through the Buttons classes available on this site. I highly recommend CButtonST. That guy rules.
|
|
|
|
|
Hello!
I'm trying to record a metafile under Gdi+ somehow into MEMORY, but all the constructors for Gdiplus::Metafile require a filename!
There is however one constructor which allows the metafile to be recorded into an IStream interface. I was thinking that perhaps such an object could be written that would stream the data into a memory buffer via an IStream interface.
<br />
Metafile::Metafile(IStream* stream, HDC referenceHdc, Rect& frameRect, MetafileFrameUnit frameUnit, EmfType type, WCHAR* description)<br />
<br />
Creates a Metafile object for recording to an IStream interface.<br />
Does anyone know how this is possible? Perhaps some atl / com code? I need this for a Visual C++ 6.0 Mfc app.
Thanx a bunch! I really appreciate your help .
Cheers,
swinefeaster
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
Does anybody know how can i get the menuitem information and then draw it into a CWnd, of course this using a Crect to draw the menuitem, this is all that i need to make my own fakemenu, pls help.
|
|
|
|
|
I am creating a template class, with different functionalities. Some of them can work only with numeric types(short, float, double). But the user can still instantiate objects using non-numeric types such as "char" (To use the functionalities which need not require numeric types). I want to know how I can tell the user in run-time that certain operations are not applicable to a particular data type.
How do I check the data type instantiated in the object and let the user know that what he is trying to do is not possible?
I will be very grateful for suggestions?
(This is a simple C++ class and I am not using MFC)
|
|
|
|
|
I use the templatized MFC collections myself. However, one place to begin would be the beginner-level STL tutorials. I think those will help you get started with templates.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Tom Archer wrote:
I use the templatized MFC collections myself.
Really ? Why ? Don't you ever require things like sorting ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Try this:
#include <iostreamᡊe9ac73-238b-46be-991d-0f050c37248d#include <typeinfoᡊe9ac73-238b-46be-991d-0f050c37248d#include <stringᡊe9ac73-238b-46be-991d-0f050c37248d
using namespace std;
<br>
template<class Tᡊe9ac73-238b-46be-991d-0f050c37248dclass MyClass
{
T _data;
enum _DataType {
enShort,
enInt,
enFloat,
enDouble,
enOther
};
_DataType _Type;
bool _TypeAllow() {
return _Type != enOther;
}
public:
MyClass(T val)
{
string sType = typeid(val).name();
if(sType == "short")
_Type = enShort;
else if(sType == "int")
_Type = enInt;
else if(sType == "float")
_Type = enFloat;
else if(sType == "double")
_Type = enDouble;
else
_Type = enOther;
_data = val;
}
void Function() throw() {
if(!_TypeAllow())
throw (typeid(_data).name() + ((string)" not allowed!"));
cout << "Processing...\n";
}
};
void main()
{
MyClass<string> obj("");
MyClass<int> nobj(3);
try {
nobj.Function();
obj.Function();
}
catch(string& sMsg)
{
cout << sMsg.c_str() << endl;
}
}
Maxwell Chen
|
|
|
|
|
hello!
I have a dialog window with a bunch of buttons drawn into it. Is there a way I can create a CButton array and asociate it's members with the controls in the dialog?
thanks a lot!
marcela bovio
|
|
|
|
|
Ok, I found GetDlgItem and it's pretty much what I was looking for!
But I have a problem now, I declared my button array in the dialog like this:
CButton* buttons[9];
I run the program and everything's fine, but when closing the application I get an unhandled exeption error. I'm doing absolutely nothing with this pointers, they're just declared...
any thoughts why this happens?
thanks!
marcela bovio
|
|
|
|
|
I doubt very much that this is causing your problem if you never actually reference (or allocate) these pointers. What happens when you remove the pointer array?
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
thanks for your reply!
well I don't know what I did but the error is no longer there...
hope it doesn't come back
marcela bovio
|
|
|
|
|
marcela wrote:
thanks for your reply!
You're welcome.
marcela wrote:
hope it doesn't come back
We're here if it does
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Yeah, some newbie questions
I'm having some strange behaviour in my visual studio. It's the first time that I experience such problems.
CString string("test");
MessageBox(string);
This code gives following error:
'MessageBoxA' : function does not take 1 parameters
And the inline autofill doesn't work anymore for mfc classes, but I touched nothing in the preferences. Autofill for my own classes works fine.
Bluute tette!
|
|
|
|
|
MessageBox takes four parameters, you want AfxMessageBox.
What do you mean by inline autofill ? If you mean autocomplete, you should try visual assist from www.wholetomato.com anyhow, it's heaps better.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
|
I think that question is answered by the fact that he's using CString
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Tom Archer wrote:
I think that question is answered by the fact that he's using CString
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
You know I'm playing with you Nish
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|