|
Michael Dunn wrote:
Britney Spears 2,190,000 - Erica Weichers 23
LOL !!! What's GoogleFight ? Did you try Kate Winslet ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
LOL !!! What's GoogleFight ? Did you try Kate Winslet ?
It's a humor site where you give it two key words/phrases, and it Googles for them both and reports the # of hits for each one. The one with more hits wins.
This particular fight was inspired by someone saying Britney Spears was hotter than Erica Weichers, which is of course utter bollocks, but the Web doesn't seem to agree.
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Michael Dunn wrote:
This particular fight was inspired by someone saying Britney Spears was hotter than Erica Weichers
Who would SAY such a thing ? She's pretty skanky though. My grandmother (1 190 000 results) beats her too.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
She's pretty skanky though
If you mean Erica, you'd better take it back. <homer hand-position="waving-fist">take it...</homer>
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
WEll Mike, because it's you, I'm willing to consider that it just wasn't a very good photo, but that's as far as I can go, OK ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
My grandmother (1 190 000 results) beats her too.
Lol . Some pictures of her ?
I hurt so bad inside
I wish you could see the world through my eyes
It stays the same
I just wanna laugh again
|
|
|
|
|
That's really cool. Way too many people seem to start with Windows programming without learning any C++ first.
If you're using VC6 then you hit CTRL-W to bring up the class wizard, and in the second tab, you can set variables for a class. There are two options, you can create a variable which holds a string or a number, or a control variable. If you use the former, you end up with a CString ( or an int, etc ) that holds your value. You call UpdateData(FALSE); to populate the variable, and UpdateData(TRUE); to put the variables value into the control. I prefer to create a control, which also means you can hide/move/change it, and then to get the value out you do something like this:
CString sEdit;
m_MyEdit.GetWindowText(sEdit);
And SetWindowText puts the value into the control from the CString.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Now imagine, just for one second, what would have happened if Microsoft had decided to add just a few extra operators to the CEdit class:
CEdit& operator=(const CString& strText);
CEdit& operator=(int nText);
CEdit& operator=(double dText);
operator CString() const;
operator int() const;
operator double() const;
Then we could do things like:
m_editCtrl = "This value";
m_editCtrl = 123;
functionWhichTakesACStringParam(m_editCtrl);
int nValue = m_editCtrl + 10;
Oh well, we can only dream of what could have been. It's just amazing how much easier VB developers could have picked VC++ if Microsoft had really exploited the power of C++ inside MFC.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
I'd settle for GetWindowText returning the string so you could concatenate operations. What you're suggesting would be so cool as to be unheard of.....
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Ahhh, the power of C++. This can easily be accomplished with a simple subclass.
CEditEx& CEditEx::operator =(const CString& str)
{
SetWindowText(str);
return *this;
}
CEditEx& CEditEx::operator =(int nText)
{
CString str;
str.Format(_T("%d"), nText);
SetWindowText(str);
return *this;
}
CEditEx& CEditEx::operator =(double dText)
{
CString str;
str.Format(_T("%0.6f"), dText);
SetWindowText(str);
return *this;
}
CEditEx::operator int() const
{
CString str;
GetWindowText(str);
TCHAR *temp;
return (_tcstol(str, &temp, 10));
}
CEditEx::operator double() const
{
CString str;
GetWindowText(str);
TCHAR *temp;
return (_tcstod(str, &temp));
}
CEditEx::operator CString() const
{
CString str;
GetWindowText(str);
return str;
} I am sure this could be improved (error checking etc.) but you get the idea.
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
PJ, u 'da man! I've been doing the 'ol GetWindowText() and atof() and this and that forever... I'm gonna implement something like this first thing monday morning... (Have you done an article on it yet?) (hint, hint...)
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Nitron wrote:
Have you done an article on it yet?
No I haven't. I didn't actually think of this until Alvaro and Christian said how cool it would be. And then I thought "why not? sounds simple enough". Maybe Alvaro would be a better candidate to write an article as it was his idea originally.
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
PJ Arends wrote:
This can easily be accomplished with a simple subclass
But thats the point: Microsoft did fail to perform even so basic things.
Instead they devised such useless crap as DDX/DDV.
--
"My opinions may have changed, but not the fact that I am right."
Found in the sig of Herbert Kaminski
|
|
|
|
|
hi all,
i want to create a plugin for IE that does a specific work..e.g. google plugin. can i do so in vc++..i am not sure what is the right approach to start with..can anyone please help....
thanks..
Himanshu
|
|
|
|
|
|
hi laurent..
thanks for ur reply..i found the link on code project's ATL page... hope this will help me out at last...
cheers..
himanshu
|
|
|
|
|
Starting with an example situation.....some of you might know that when you create an ATL COM project using the VisualStudio new project wizard, the newly created resource (*.rc) file will contain a TEXTINCLUDE directive that includes the project's type library (*.tlb generated from MIDL compiling the *.idl file) INTO the resulting binary (EXE or DLL).
Now, my question involves the case when 2 or MORE type libraries are included in this fashion into the resulting binary file.
If you are using the API function 'LoadTypeLib', you can specify which of the included type libraries you want like this:
LoadTypeLib("C:\\MyServer.dll", ...) for the first, (or also "...\\1")<br />
LoadTypeLib("C:\\MyServer.dll\\2", ...) for the second,<br />
LoadTypeLib("C:\\MyServer.dll\\3", ...) for the third, and so on<br />
HOW CAN THIS BE DONE WITH THE '#import' directive?????????????
I can't believe microsoft would ignore the capability of generating com interface wrapper classes for secondary type libraries.
Is there an extractor tool that I'm unaware of that removes type libraries from 'dll's or 'exe's and saves them as 'tlb's.
I don't want to START with OleView, THEN find object, THEN copy Idl definition, (THEN find next object, THEN copy idl definition,...) THEN Midl compile, THEN FINALLY #import (besides this process is incomplete unless you ALREADY have a list of ALL the COM class objects that exist in the secondary type library).
HEEEEEEEEEEELLLLLP, i'm dieing here
thanks,
nebbish
Smart, Sexy, Sane. Pick two.
|
|
|
|
|
nebbish wrote:
Is there an extractor tool that I'm unaware of that removes type libraries from 'dll's or 'exe's and saves them as 'tlb's.
VC can do that. Open the EXE/DLL but pick Resources in the Open as combobox. From the resource editor you can save any resource as binary data (just name the file something.tlb and you're set).
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
hi everyone,
what message do you use for multiple selection in a list control? when i said multiple selection, i meant when you hold the ctrl key on the keyboard and click on multiple entries in the list control that you want to select.
thanks in advance.
|
|
|
|
|
LVN_ITEMCHANGING is sent before an item's state changes (so you can reject the change if you want). LVN_ITEMCHANGED is sent after the state changes. There's also LVN_MARQUEEBEGIN for when the user drags a rectangle in the list to select items.
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I need to move just a single control in my view to keep it centered on the screen. I have tried overriding the OnHScroll() and adding code to MoveWindow() for my control to move it. I can't seem to keep it visible.
Here is the code sample:
<br />
void CMYView::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)<br />
{<br />
CRect r;<br />
int nNewCalPos;<br />
<br />
if(pScrollBar) return;
<br />
switch(nSBCode)<br />
{<br />
case SB_LINERIGHT:<br />
m_nHPos += 204;<br />
if(m_nHPos > m_nMaxRange)<br />
{<br />
m_nHPos = m_nMaxRange;<br />
nNewCalPos = m_nMaxRange - 204;<br />
}<br />
break;<br />
case SB_LINELEFT:<br />
m_nHPos -= 204;<br />
if(m_nHPos < 0)<br />
{<br />
m_nHPos = 0;<br />
nNewCalPos = 150;<br />
}<br />
break;<br />
}<br />
<br />
CScrollView::OnHScroll(nSBCode, nPos, pScrollBar);<br />
<br />
m_cCalanderCtrl.GetMinReqRect(&r);<br />
m_cCalanderCtrl.MoveWindow(nNewCalPos, 0, ((r.right * 4) + 20), r.bottom, TRUE);<br />
}<br />
Any ideas?
Thanks,
-Eric
|
|
|
|
|
Hi --
Suppose I have a data set like:
1 2 3 4
4 5 6 9
1 5 9 6
in an external file. How do I read this external data set into a 3 by 4 array in visual c++.net. I do not have SQLClient.. Could I do this with dynamic arrays?
Thanks
|
|
|
|
|
Yes, you don't need SQL Server, in fact it would do nothing for you. Read my articles on iostreams and std::vector.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
where are the articles? here at this site?
(I'm new to this site)
Thanks
|
|
|
|
|
My apologies. There is a search box above, but here are some links:
http://www.codeproject.com/vcpp/stl/index.asp#General[^]
I was wrong, I've not done an article on iostreams. I will rectify that today. I do show how they are used in other articles though. The gist of it is this to read a file:
#include <fstream>
using std::ifstream;
ifstream a("c:\file.txt");
int i;
a >> i;
and this to write one
#include <fstream>
using std::ofstream;
ofstream a("c:\file.txt");
int i = 7;
a << i;
More to come later today, I promise.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|