|
Are you using DDX_ routines in DoDataExchange, or rather you've done data transfer yourself?
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
Hello:
Thanks for the reply. DDX_routines? I think I heard about those but I don't think I'm using those in my application. I was going to do data transfer my self but looks like DDX_ routines is the best way, I guess. Is there any resource over the internet that I can find about DDX_routines?
Thanks,
Luis E. Cuadrado
)
|
|
|
|
|
Ok, I'll try to keep it simple. Did you use ClassWizard to associate some variable with combo box? Or you're just calling Get/SetCurSel?
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
Yes, I used ClassWizard to add a variable to the ComboBox. With that variable I call GetCurSel(). Sorry if my questions sound kind of newbie. I'm starting with MFC not long ago ).
Thanks,
Luis E. Cuadrado
)
|
|
|
|
|
Luis E. Cuadrado wrote:
With that variable I call GetCurSel().
Variable is 'control' (CComboBox) or 'value' (int)?
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
I want to convert emf to jpeg,png or gif.
So pl refer some urls. so i need dll
|
|
|
|
|
Chris Losingers company
http://www.smalleranimals.com/
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
I've never heard of 'emf' but I'm guessing its an image file format, so check out the Free Image project: http://www.6ixsoft.com[^]
Dylan Kenneally
London, UK
|
|
|
|
|
If you close the connection object, is the recordset stil available for use. My rs is generated like so:
m_pRecordsetPhoto->Open ((IDispatch *) m_pCommandPhoto, vtMissing, adOpenKeyset,
adLockOptimistic, -1);
I know very little about databases> does this declaration above indicate anything about its persistence when the conn is closed. I feel that if I close te conn, then later I cant go and quiz the database for something like rs->fields->item->value etc. because theres no connection.??
Thanks,
ns
|
|
|
|
|
hi,
Look at article: ADO at a glance on this website
for better understanding
DanielO
|
|
|
|
|
For the Gurus out there, is this code legal?
(class declarations have been stripped down)
<br />
class a<br />
{<br />
};<br />
<br />
class b : public a<br />
{<br />
};<br />
<br />
a *pa = (a*)new b;
<br />
Thanks,
James
Drinking In The Sun
Forgot Password?
|
|
|
|
|
I'd suggest you'd end up with the b constructor being called, then the class being downcast to an a*. I don't think you need the C style cast, it should work implicitly.
I'd write some code that outputs messages in the constructors and try it to see.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
b::b will be called. You don't need the cast. You'd need the cast if you'd derive b using private/protected inheritance.
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
As mentioned this is perfectly leagal and often usefull, especially in conjuction with virtual functions.
[James Pullicino] wrote:
Which constructor will be called?
The answer is both. b's constructor is called which then imediately calls a's.
class a<br />
{<br />
public:<br />
a() {cout << "A's Constructor\n";}<br />
};<br />
<br />
class b : public a<br />
{<br />
public:<br />
b() {cout << "B's Constructor\n";}<br />
}
If you are in doubt about some feature it is always a good idea to use print statements or better yet step through the code with a debugger. Posting your question on a message board is also a good idea.
|
|
|
|
|
i have an unsigned char array which has certain data. I want that data of the array to be displayed in hexadecimal format in CListCtrl. For ex. if i have ch[0]=0x10,it should be displayed as 10 in the list control. can anybody help?
Here is my code, but it displays l in the list control.
******************************
unsigned char DataMsg[32];
LV_ITEM lvitem;
CString dataText= (CString)DataMsg[0];
lvitem.mask = LVIF_TEXT | 0;
lvitem.iItem = iItem;
lvitem.iSubItem = 0;
pStrTemp1= dataText.GetBuffer(dataText.GetLength());
lvitem.pszText = pStrTemp1;
m_listCntrl.InsertItem(&lvitem);
***********************************
Rsh
|
|
|
|
|
You could use an ostringstream and I think the modifier is hex() to make it display as hex.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Use CString::Format with %x or %X
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
Hello,
I have created a CDialog. Inside it I have put a CComboBox and have added items to it. Whats happening is that when i click the drop down arrow it clips the drop list inside the dialog only showing the number of items that will fit above the bottom of the dialog. Is it possible to get it not to clip the droplist within the dialog ?
Thanks ReX
|
|
|
|
|
Dialog shouldn't clip the dropdown part of combo. Make sure that dropdown rectangle is big enough - click on dropdown arrow in resource editor and adjust the rectangle height.
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
The size of the dropdown rectangle is correct adjusted in the resource editor. If I size the dialog bigger, the the full dropdown list is shown (because dialog bottom is far enough)
ReX
|
|
|
|
|
Strange. I've never seen this behavior. Are you doing dirty tricks with subclassing the dropdown part?
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
I want to replace the last character of a string represented by std::string with comma. How can i do so ??
Example:
std::string mystring("Hellow World");
I want to replace last character of "Hellow World" i.e 'd' by comma "'"
|
|
|
|
|
I wrote this function for this purpose. I hope this helps.
inline void Replace(std::string* pstr, const char old_char, char* pnew_char)
{
if(!pstr->empty())
{
int n = 0;
while((n = pstr->find(old_char)) != -1)
{
*pstr = pstr->erase(n, 1);
*pstr = pstr->insert(n, pnew_char);
}
}
}
Usage:
Replace(&mystring, 'd', ',');
For the last character only you can take:
mystring.erase(mystring.length(), 1);
mystring.append(',');
Greetings ReX
|
|
|
|
|
That's also a way to burn CPU cycles. Another (possibly better) way to do it could be
std::replace(string.begin(), string.end(), 'a', 'b');
to replace all instances of 'a' with 'b'.
|
|
|
|
|
*mystring.rbegin() = '.';
it works
nobody is perfect
|
|
|
|