|
This problem is a part of a larger study problem I have for my college project.
I am basically experimenting with all the calling conventions etc...and this will finally be used in code for XEmacs, which is a unix originated text editor.
|
|
|
|
|
How can I implement an application to send data over a network (by using a custom-made OLEDB provider) the same way commercial DBMS communicate with data consumers?
Ernesto Moscoso Cam
|
|
|
|
|
Hi All,
I have a BSTR string variable via ADO Recordset Getstring method. In the BSTR string has null
character('\0'). How can I get rid them of in a common way(Of course I can loop from start of
BSTR, but I want a directly way).
Thank you.
chenzhu
|
|
|
|
|
Hello, the codegurus around the world.;)
In fact, I don't understand your question a little bit.
Do you want to take off "NULL" word from Column (display)?
Or do you want to take off '\0' from all strings in Column?
Or I miss something?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Dear Masaaki Onishi,
The last effect is my desire. I get a BSTR string has '\t' separator between columns and '\n'
between rows. But int the string has excaptional '\0' just before a '\t'. I can not transform
it to CString by W2A or WideCharToMultiByte functions directly because these annoying '\0'.
Thanks.
chenzhu
|
|
|
|
|
Hello, the codegurus around the world.;)
Do you try to use ADO in MFC or COM(ActiveX)?
If you use ADO in MFC, we can use DataGrid control and this member function to display the data.
As a result, we don't need to care about each data string.
I often use Datagrid for ADO in MFC.
Actually, MSDN has a good example called AdoDataGrid(?).
However, if you want to use CListView or something to display your data, you may need to work
your problem.
Anyway, I want to sleep now.
So, someone migh help you, or if I have a time....
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Dear Masaaki Onishi,
Thank you very much. Yes, I want a control to display the data. Actualy I am making a ATL control and the ATL control hold one Grid that accept format string in that pattern. The
common usage is a VB project, which is the client of ATL COM control, opens one database
and get one recordset, and then pass it into ATL control. Of course I can loop through whole
recordset, read variant from every fields and assemble a CString by myself, but that is
too tiresome.
If you have waked up now has have a good mood, give me a advice.
thank you.
chenzhu
|
|
|
|
|
Hi do anyone know how to link a file in C++ whith a line of code like #pragma or something... I don't want to set it in the project settings box...
|
|
|
|
|
Try this:
#pragma comment(lib,"something.lib")
|
|
|
|
|
|
can you help me to add an icon to a CFileDialog
|
|
|
|
|
Hello, the codegurus around the world.;)
We can derive CMyFileDialog from CFileDialog class, and
put the some code to create icon in CMyFileDialog::OnInitDialog().
Good luck.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
hi all,
I am using VS-FlexGridPro Version 7 (A product from VideoSoft & Bunka Orient Corp.) in my project. This is an ActiveX Control similar to MSFlexGrid but it provides more facilities than MSFlexGrid.
i have a problem in this, i have to add check boxes in first column of the Grid Control. but there is no property to set for check boxes.
if anyone know aboout it then please reply asap.
Thanks
Nitin
|
|
|
|
|
I think you must define the column type as boolean.
VsflexGrid will display check boxes.
|
|
|
|
|
Hello Erik,
To continue on the topic of dynamic toolbands and XML:
As I told you, I'm writing a similar app. The problem is with parsing the XML. I tried to use Ben Bryant's CMarkup class, but it says that XML is not well formed no matter what I do.+ I'm a COM programmer and would like to use MSXML parser to parse the XML. I do have a XML parsing class, taken much after Stingray's OTL toolkits XML class. The problem is in searching the XML tags. It can only find the first matching tag but not beyond it. Look, I know you must be very busy writing a gadzillion of articles for guys like me, but I would like you to lookover my XML class and suggest improvements. Of course I can't post it to you right away, but well, I give you fair warning!
Anyway, for the toolband the general idea is to create a toolband and embed a toolbar(rebar)in it. On OnCreate of toolband, I create my buttons with relevant icons and text. This occupies half of the toolband's area. In the other half I would like to dynamically create buttons based on XML data. After the toolband's created it retrieves an XML file from the web server and parses it. Then in accordance with the data it creates buttons(links really). on clicking buttons I just call Navigate()on the interface I get from SetSite() to navigate to the appropriate url. I'm using a stl class to store URLs.
Is this what you are doing too?
Also, if you have seen Yahoo companion, you'd know the kind of dropdown buttons I'm talking about. basically dropdown with tracks states too. Is there already any class like this here at CP? I really don't wanna code the button class from scratch,unless I have to. What's the easy way out?;P
TIA.
|
|
|
|
|
Since you're doing just simple parsing, you can use MSXML 1.0+ which ships with IE5+ (Maybe even IE4,IE4.01). To check to make sure you have valid XML just open the file in IE and see if it loads properly. Dynamic and static buttons are both obtainable. You can simplify it with 2 toolbars or fanagle it with 1 toolbar making sure not to overlap button ID's. How you are planning to do it is the way I have already done it.
As for the yahoo companion question about menu states, I don't have any information on that.
-Erik
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
For your XML parsing problem, have you checked out the IXMLDOMNode::selectNodes() method?
|
|
|
|
|
How can I tell from an add-in to code to save the active docments and/or to save all the documets in Visual C++?
Thanks,
Vitalu Belman
|
|
|
|
|
To Save ALL :
Call the get_Documents method on IApplication which returns IDocuments, then call Item(nIndex) on IDocuments to get IGenericDocument and then call the Save method on the IGenericDocument ptr.
To Save Active Document:
Call get_ActiveDocument on IApplication ptr which returns IGenericDocument and then call Save with appropriate methods.
HTH
Jignesh
|
|
|
|
|
I search for a method in MFC to define a toolbar button will have a drop-down arrow, but not as a separate section.
There is a feature like this in "Core Draw".
Thank you
dana
|
|
|
|
|
Give the toolbar the TBSTYLE_EX_DRAWDDARROWS extended style, and button the BTNS_WHOLEDROPDOWN style. Note that this only works with version 5.80+ (IE 5+) of the common controls.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
Thank You!
I have in my computer the IE-5 but the name BTNS_WHOLEDROPDOWN style is not recognized by my Visual C++ compiler. How I can update my Visual C++ include files for this version ?
Thank you
Dana
|
|
|
|
|
You'll need to download the latest header files from MS, they're in the Platform SDK.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
doe sanyone know how to implement a function such that it changes a number (which can be in any of the 3 formats: hex, bin or dec) to its equivalent in one of the 3 formats.
pls help...
|
|
|
|