|
|
Template are out from my current knowledge but ill take a look at them asap.
But, do u think can do the following using the post i paste before:
new funcHashT[i].funct (true);
????
|
|
|
|
|
fickdb wrote:
I think its ok for pure c functions, but my prob is that i need to make a new object only knowing his name (or his constructor name). same problem as above except that foo and bar are classes...
The word you're looking for, I suppose, is Reflection. This is not possible in C++ for the same reasons as I mentioned before.
But you can of course work around the limitations, to do so requires a solid knowledge of the language and tools.
If you know, and understand, COM, you will realize that the interface IDispatch is invented for just that reason. Again, if you really need the feature, you could either use COM and IDispatch, or you could copy the technique.
What it all comes down to though, is that you're probably better of using C# for your project.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
I find a workaround:
typedef void (*FCT_PTR)( bool pText);
struct MyStruct
{
char * name;
FCT_PTR funct;
};
void wrapper_foo (bool pText) { new foo(pText); }
const MyStruct funcHashT[] =
{
{ "foo", wrapper_foo }
}
class foo
{
public:
foo(bool pBool)
{
// Code
}
}
I tested this code in a very simple c++ project and it works fine.
|
|
|
|
|
This solution should work. Nice idea
|
|
|
|
|
Hi,
How to create a GUI based application for example dialog based which will except the paramters. Actually our .exe will be called from VB application and 5 paramters are passed to that application.
Thanks in Advance.
Azghar
|
|
|
|
|
In dialog Based application in the CYourApp::InitInstance
call the function GetCommandLine and then parse the parameters
Regards
vikrant_kpr
|
|
|
|
|
hi,
I want to do Insert ,delete actions in a SQL Server Database using C++/MFC.
Can any body please tell me how to do that or give me the URLs?
thanks in advance..
|
|
|
|
|
Try reading about CRecordset, if you want to use MFC, along with CDatabase.
Alternatively, you can use ATL helper classes and use OLEDB, in which case CDataSource, CSession and CCommand/CAccessor stuff is what you want.
Steve S
Developer for hire
|
|
|
|
|
I have a old project, written by BC++4.5. Now I want to convert it to VC++, How can I do??
Thanks!
|
|
|
|
|
an activex control is about to embeded in IE,if the activeX control access the oracle ,but demands the client don't want setup oracle's client ,how to realize it ?please tell me som .thanks a lot!
|
|
|
|
|
ahh can you rephrase this question?
You're saying you have an activex control which is embedded in IE
and that the control needs access to Oracle
the user doesnt want the activex control to talk to oracle and you want to know how to tell the active x control not to use oracle?
is this correct?
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
sorry,I scratched your head over.I revoice it now.
I have a c/s program which acess oracle .now it was demanded to insert on webe page.I decided to make a ACTIVEX control.i wish client don't need to setup oracle's client,it can download the activex and use it .but don't konw it can be realized or not.
|
|
|
|
|
Hi ,
I was planning to take the brainbench visual C++ test . Has anyone here taken it ? any suggestions or areas that they focus on . And which book do they recommend for practice ?
Thanks
|
|
|
|
|
Seriously, who cares ? What good will it do you ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Basically im in the process of looking for a new job and this is the company's requirement . Apart from that is there a good book that can help me prepare for this ? Ive worked with MFC for past 3 yrs but cannot say that my knowledge about MFC is complete . ive worked on a small subset of components that MFC provides .
Thanks
|
|
|
|
|
The company requires you to take the test there, or show them your result ?
Do the test, and have google in another window to look things up.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
show the result . yup thats a thought . though i d like to go over the concepts myself .
|
|
|
|
|
Yeah, I'd absolutely recommend reading up on anything that comes up which you can't answer yourself.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
ctiveX Controls
MFC
Properties/Events/Methods
General C++ Language
By Reference vs. By Value
Classes and Objects
Exception Handling
Inheritance/Encapsulation
Keywords/Operators
Pragmas
Virtual Functions/Overloading/Polymorphism
General Visual C++
16 bit vs. 32 bit
DLL Debugging
DLL Exporting Methods
DLL Loading/Unloading
DLL Regular vs. Extension
Portability Issues
General Windows Programming
Clipboard usage
Common Controls
Common Dialog Boxes
Device Context
Dialog Boxes
GDI
Graphics
International Considerations
Memory Management
Menus
Message Handling
Multitasking/Multithreading
Printing
Registry
Resources
Text/Fonts
Timers
Window Management
Window Painting
MFC
Calling Win SDK Functions
Common Base Classes
Database Access
Document/View Architecture
Drag/Drop
File I/O And Serialization
FTP/Sockets
General
Helper Macros
Message Handling
Property Sheets/Property Pages
Toolbars/Status Bars
Utility Classes
Worker Threads/User Interface Threads
OLE/COM
Aggregation/Containment
Apartments
Automation
CLSID / Prog ID
DCOM / Security
Interfaces/ IDL
Interfaces/IDL
Marshalling
Servers/Containers
Singleton
Surrogate/EXE/Inprocess vs. Out Of Process
Using ATL
Visual C++ IDE
Add Ins/Macros
Class Wizard
Debugging
Environment Settings
Project Creation
Project Customization
Source Browser
Utilities/Tools
Seems like an ocean
|
|
|
|
|
Wow - there's a fair bit there that I never learned. You need to know all of this ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Can I quote that? It applies to so many things in life...
Steve S
Developer for hire
|
|
|
|
|
I've been building a GUI for an embedded meter test environment. Its getting very crowded, when all of the sudden
I can't create buttons or fields from the tool bar. I also can't create them by copy and paste. I have to go in and modify the source to create the objects. Anyone seen this.
|
|
|
|
|
It's a Visual Studio limitation - you can have up to 256 controls on the dialog, and then you can't add any more.
[That must be one very complicated GUI]
|
|
|
|
|
Hi
I have create program for some operation's on bitmap ,but when using GetPixel And SetPixel program apprare slow.
then i need some help for Retrive RGV valuse without GetPixel and SetPixel.
Thanx to you.
adnan
|
|
|
|