|
Hi all,
I have this class generated by gsoap:
class SOAP_CMAC _ns1__DoCheckForProductUpdates
{
public:
std::string *productName;
std::string *productVersion;
std::string *serialNumber;
std::string *siteCode;
struct soap *soap;
then my structure:
struct RMproduct
{
RMproduct(){};
RMproduct(wstring szName, wstring serv, wstring version){m_Name = szName; m_serviceKey = serv; m_versionKey = version;};
wstring m_serviceKey;
wstring m_versionKey;
wstring m_Name;
wstring m_SerialNo;
wstring m_VersionNo;
vector<RMUpdates*>* updateList;
~RMproduct()
{
if (updateList !=NULL) {
vector<RMUpdates*>::iterator Iter;
Iter = updateList->begin();
for (; Iter < updateList->end(); Iter++)
delete *Iter;
updateList->clear();
}
delete updateList;
}
};
I cant find a way to pass the value of
wstring m_Name;
wstring m_SerialNo;
wstring m_VersionNo;
to
std::string *productName;
std::string *productVersion;
std::string *serialNumber;
thats what I need to be able to use the methods of the webservice.
Thanks,
jayjay
|
|
|
|
|
You actually need a string conversion. You may use, for instance WideCharToMultiByte [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What is the use of that string pointer (string* serialnumber)?
|
|
|
|
|
Well, the library documentation should state if you need to allocate the string object or you just nned to use it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Use W2A() macro for painless conversion. For instance,
#include "atlconv.h"
wstring WideString = L"Hello";
{
USES_CONVERSION;
string str = W2A( WideString.c_str());
}
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I have a tree tree control with check boxes corresponding to the
leaf items. How can I retrieve the zero-based index of the leaf item
when I click on their corresponding check box.
Thanks in advance
|
|
|
|
|
You may compute it traversing the childs of the selected item's parent.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I could write the following code snippet based on the suggestion to accomplish the requirement :
HTREEITEM hSelectedItem = m_pwndPageTree->HitTest(&HitTestInfo);
:
:
HTREEITEM hNextItem = m_pwndPageTree->GetRootItem();
INT nCounterForPageIndex = 0;
if (hSelectedItem != hNextItem)
{
while (hSelectedItem != hNextItem)
{
hNextItem = m_pwndPageTree->GetNextItem(hNextItem, TVGN_NEXTVISIBLE);
nCounterForPageIndex++;
}
}
Thanks for the suggestion
|
|
|
|
|
how can i select all rows in report?
ex:
m_list my CListCtrl.
for(int i=0; i<m_list.getitemcount();i++)>
{
if(m_list.GetCheck(i))
{
CString s1 = m_list.GetItemText(i++,4);
m_rezult.SetWindowText(s1);
}
}
this not work ...
i whant to do somenting like this :
col1|col2|col3|
--------------
1 | 1 | 1 |
--------------
2 | 2 | 2 |
--------------
3 | 3 | 3 |
--------------
lets say i have checked row 2 and 3 and i have this :
row 2 (col3) + row3(col3) = m_result.SetWindowText(...);
How can i do that?
|
|
|
|
|
Please
1. use code block button to surround code snippets with <pre> tags.
2. explain more clearly what do you need to do.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: 2. explain more clearly what do you need to do.
Why? What happened to your CPMRU?
|
|
|
|
|
Monday is the CPMRU rest day.
BTW (& first THHB attempt) You've enriched your Microsoft MVP profile (at least since last time I visited ). It's good, I like it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks pal, I'm glad you liked it. The "Languages and Interests" and the "My recommendations" sections had been set (by me) mistakenly as viewable only by MS and other fellow MVPs earlier. I just made them viewable by public recently.
BTW (THHB attempt 2): The latest chip from Intel is so powerful that it can execute an infinite loop in less than 7 seconds.
modified on Monday, July 28, 2008 4:32 AM
|
|
|
|
|
Rajesh R Subramanian wrote: BTW (THHB attempt 2): The latest chip from Intel is so powerful that it can execute an infinite loop in less than 7 seconds.
Well, it is dependent on the choosen reference frame.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
you would need to handle the mouse click event on the list control and get the selected items. On every selection made, you can take the selected items from the list control and put the result in the next row that is empty.
I hope that I got your question correctly.
Use CListCtrl::SetItemData instead of SetWindowText or see InsertItem
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
no ,i want to display the result from row 2(col2) + row2(col3)in m_result - CEdit
and i have another problem :
i want to display the result from col 2 for ex:
col1|col2|col3|
---------------
1 | 2 | 3 |
---------------
1 | 2 | 3 |
---------------
1 | 2 | 3 |
--------------
col2 have (2,2,2) i want to sum this and put the answer in CEdit(m_result) (2+2+2 = 6)
6 i need in CEdit
|
|
|
|
|
See CListCtrl::GetItemText. You can use this function to get values of sub items and then perform operations on the value and display it elsewhere
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
ok go on getitemtext ok but how to do that ?
|
|
|
|
|
Hi,
I downloaded CComboCompletion code and used in my application.My problem is:
I have to use this class for two seperate dialogs using combobox.
For first dailog,i used this and its perfectly working.After tht i used this in another dialog in same application, when i changed memebervarialbe type as CCOmboCompletion from CComboBox,when i run it..its shows unhandled exception.
Whther i can use this CComboCompletion class to only one dialog..IF i want to use for amother dialog wat can i use?
Because this CComboCompletion is very useful for my application.
Pls help me??
Anu
|
|
|
|
|
Did you try and debug the code?
Just check the properties of the combo box in the sample and compare them to what you have set. May be there would be some uninitialized variable.
BTW did you try to understand the logic before implementing and using the class?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
When i debug..it shows unhandled in disassembly...And also in another dialog..its working.
Anu
|
|
|
|
|
Anu_Bala wrote: When i debug..it shows unhandled in disassembly...And also in another dialog..its working.
So did you check the value of the variables where the error is displayed and try to track them
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi All,
I have a new dialog based project, in which for the dialog I have set the following resizing property -
Style: Popup
Border: Resizing.
Now when I execute the application, I dont want the application icon to be displayed in the Title bar of the Dialog.
Can you tell me how to remove that icon?
Thanks.
Priya Sundar
|
|
|
|
|
Priya_Sundar wrote: Now when I execute the application, I dont want the application icon to be displayed in the Title bar of the Dialog.
Remove SetIcon calls from OnInitDialog . And at any time to remove icon from a window call SetIcon with a NULL icon handle.
SetIcon( NULL, true );
SetIcon( NULL, false );
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
This way if i set to NULL, i get a blank command icon displayed in the Title of the dialog.
However, in the taskbar still the icon is present.
I dont want the icon or even like a blank command type of icon displayed on the Dialog title.
So please suggest some other way.
Priya Sundar
|
|
|
|