Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data binding on controls in VC++ 6.0

Status
Not open for further replies.

edifreak

IS-IT--Management
Apr 7, 2003
74
AU
Hello all,

I would like to know whether it is possible to bind a control (say textbox) by right clicking on the control and selecting the data source in their properties section?
Can this be done in VC++ enterprise edition or does it have to be manually coded using the void BindProperty( DISPID dwDispID, CWnd * pWndDSC );

Thanks
 
Well...a textbox (called CEdit in MFC) has no such property.

So the answer is no - you have to code it.

/Per
[sub]
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."[/sub]
 
thanks for the tip Per. How about list control and combox boxes? i don't see a property where i can set the data source to be the ADO control?!? do i have to hard code that too?
 
Yeah, but hard coding it isn't all that hard really.

/Per
[sub]
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."[/sub]
 
sorry to bother Per, it wuld be a good help if u know any web links that has some sample code?

TIA
 
Hard to say exactly what's best for you since I don't know much about your application.

If you're starting from scratch you can let the AppWizard aid you with connecting to ODBC source etc.

New->MFC AppWizard(exe)->SDI or MDI->Database with/without file support etc

Search the MSDN...

/Per
[sub]
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top