|
I am currently designing a program that needs the ca2wex but i can not locate it anywhere, i have the atl library and atlconv but i do not have and cannot find this class if anyone knows where i can get it or at least a way i can implement it myself i would appreciate it thank you.
|
|
|
|
|
|
(ATL/COM/MFC/C++)
HI, I'm beginner about Window programming
I'd like to develop a small dll that has a function.
There is one text(txt file) loaded on IE.
The txt contains just a words like "Hello!!".
I've made that the "Hello!!" has focus of cursor.
I mean If I move cursor on "Hello!!"
then arrow-shaped cursor would be changed to hand-shape on a web page.
Now, If I click the "Hello!!",
the programe opens new dialog that has a static text.
The static text shows me "Hello!!".
That's all. How can I make this?
any reply, any URL contains some reference about this, offer me please.
|
|
|
|
|
As easy as this is to say, it's more complex than just what you're wanting (I believe). Although from your description, you could do all this in straight DHTML ...
Regardless: if you're wanting to program IE, then you'll want the book called Programming Internet Explorer by Microsoft Press.
FYI - if you are beginning windows programming, as you've stated, ATL and COM are far too advanced to start with ... you need to start with learning C++ first. Not programming IE ... (just my personal opinion on this).
Good-luck.
:..::. Douglas H. Troy ::..
Fold with us|Development Blogging|viksoe.dk's site
|
|
|
|
|
Thank you for your answer
Sorry for my question that was not announced my statu minutely.
I've just graduated from my University. So I'd already learn c++ and more stuff.
And, I've been reading the book Programming IE5(MS),
and I'm beginner of ATL/COM.
So I need your answer about my question. Please~;)
|
|
|
|
|
<br />
class CDialogPage1 : public CDialogImpl <CDialogPage1><br />
{<br />
enum { IDD = IDD_DLG1 };<br />
...<br />
}<br />
<br />
class CDialogPage2 : public CDialogImpl <CDialogPage2><br />
{<br />
enum { IDD = IDD_DLG2 };<br />
...<br />
}<br />
<br />
class CSettingDlg : public CDialogImpl <CSettingDlg><br />
{<br />
public:<br />
enum { IDD = IDD_SEETINGDLG };<br />
....<br />
??? GetDialog(UINT DIALOG_IDD) <br />
{<br />
}<br />
private:<br />
CDialogPage1 m_page1;<br />
CDialogPage2 m_page2;<br />
}<br />
how to write this GetDialog function?
or maybe i should change CDialogPage1 & CDialogPage2 , make them inherit from the same class? could anyone give me some hints?
|
|
|
|
|
Are you trying to build a wizard or use a tab ctrl? In which case you could use CPropertySheetWindow to implement this functionality ...
Maybe more details on what exactly it is you're trying to do/implement might better help us (or at least myself) understand how to answer ...
:..::. Douglas H. Troy ::..
Fold with us|Development Blogging|viksoe.dk's site
|
|
|
|
|
i'm tring to implement a options dialog which is like in the VS.NET 2003
|
|
|
|
|
|
Greetings,
First, I apologize for what must be in a FAQ somewhere that I haven't located. I have tried.
Here is the basic question (details below): How do I turn off canonical input processing on an arbritrary istream? Failing that, how do I do it with just cin using VC++ 7.1?
The gory details:
I am writing a function that is part of a larger project so I don't have a lot of control over the style of its parameters. It gets an istream and ostream pointer. With the istream pointer I have to read a character at a time as this is for an interactive application; I need to react to each character as it is entered, not after the entire line has been entered. Like an editor.
But if the istream is std::cin, then I have canonical line processing (no extra charge!) where the characters are echoed to the user, ^H (backspace) is interpreted, and nothing is available to the calling program until a newline has been entered.
If I compile under GCC 3.4.4, I can (with vast pain) determine that the istream is associated with file descriptor 0 (STDIN_FILENO) and use tcgetattr/tcsetattr to turn off the canonical processing.
But these functions (tcgetattr/tcsetattr) do not appear to be available in VC++ 7.1
I have looked for days for a general way to deal with this problem and either it is so obvious that nobody mentions it or I have completely missed it. Even the GCC documentation doesn't give a solution for itself (though I found one on the net). The VC++ documentation casually mentions that istream buffering can be turned off, but doesn't say how. Perhaps they were not referring to canonical processing but something else...
I have tried some of the obvious stuff already:
#include <iosfwd>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
char inChar;
#if 0
cin.rdbuf()->pubsetbuf(0,0);
#endif
#if 0
cin.setbuf(0,0);
#endif
#if 0
cin >> unitbuf;
#endif
#if 0
cin.setf(ios::unitbuf);
#endif
while(cin)
{
cin.get(inChar);
if(inChar == '\004') break;
cout << "\nRead in '" << inChar << "'\n" << flush;
}
return(0);
}
|
|
|
|
|
If I want to process a std::vector using a reverse_iterator (because the element I'm looking for is likely to be near the end), how do I remove the element from the vector after I locate it?
typedef std::vector<GROUP_HANDLE> GroupHandleList;
GroupHandleList::reverse_iterator i;
bool done = false;
for ( i = GHList->rbegin(); !done && i != GHList->rend(); i++ )
{
GROUP_HANDLE gi = *i;
if ( gi == hGroup )
{
// ?? I want to call:
// GHList->erase(i);
// but that requires an 'iterator', not a 'reverse_iterator'
done = true;
}
}
|
|
|
|
|
Try
GHList->erase(i.base()-1);
Nish
|
|
|
|
|
|
I can't believe I haven't read this before.
Thanks for the link.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
You mean you don't have "Effective STL"? Shame!
|
|
|
|
|
I took the plunge. One word - 'Wow!'. What a fantastic library!
Can anyone give me some quick Boost recommendations? So far I have used list_of(), indirect_iterator, tokenizer, trim and, of course, shared_ptr. What are your favourite Boost libs?
The Rob Blog
|
|
|
|
|
Robert Edward Caldecott wrote:
'Wow!'. What a fantastic library!
Agree 100%.
Robert Edward Caldecott wrote:
Can anyone give me some quick Boost recommendations?
It really depends on the nature of your projects. I am currently involved with text processing libraries, and thus mostly use regex, lexical_cast and tokanizer, and looking forward to using string_algo.
Also, I make a heavy use of smart pointers, tuple and test, and to a lesser extent filesystem, bind and graph.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
I'm also a Boost addict...
You should definitely take a look at boost::bind and boost::signal, I use them all the time. I recently started using boost::serialization and boost::regex. Both are simple to use and extremely powerful.
|
|
|
|
|
Practically: regex, bind (oh, yeah!), shared_ptr, string_algo, signals, function, tuple, variant, optional
From a 'wow' point of view: lambda, spirit.
I've also started using Boost.Test for unit testing -
Just one thing - if you're not using VC7.1, try and do so - you'll be doing yourself a favour...
|
|
|
|
|
Yeh, bind. Very useful. I have been using containers of shared_ptr's, and it is so cool that I can do something like:
class CFoo
{
...
void fn(int n, std::string str)
{
}
};
...
std::vector<boost::shared_ptr<CFoo> > v;
v.push_back(boost::shared_ptr<CFoo>(new CFoo));
...
for_each(v.begin(), v.end(), boost::bind(&CFoo::fn, _1, 1234, "Boost!"));
Splendid. Using boost::bind for std::find_if is also very useful. So much to learn...
|
|
|
|
|
Robert Edward Caldecott wrote:
std::vector<boost::shared_ptr<CFoo> > v;
v.push_back(boost::shared_ptr<CFoo>(new CFoo));...
for_each(v.begin(), v.end(), boost::bind(&CFoo::fn, _1, 1234, "Boost!"));
And you call that cool?? I mean, seriously?
Well, there's no accounting for taste.
|
|
|
|
|
You don't think smart pointers are useful? You don't think for_each is useful? Aaahh ... I see from previous posts that you actually think STL is "bloatware". What a shame. Other than the fact that both STL and Boost are incredibly powerful, I need to write code for Windows AND Linux, and without these libraries, this would be difficuly to achieve.
|
|
|
|
|
Robert Edward Caldecott wrote:
You don't think smart pointers are useful?
I think, somebody who puts pointers or smart pointers into a std container has not understood one basic principle of STL, that is, 'value semantics'.
What a shame. Other than the fact that both STL and Boost are incredibly powerful, I need to write code for Windows AND Linux, and without these libraries, this would be difficuly to achieve.
It's ok if it works for you. IMO, it's not really elegant that one has to write
v.push_back(boost::shared_ptr<CFoo>(new CFoo));
to insert an element.
|
|
|
|
|
CP Visitor wrote:
It's ok if it works for you. IMO, it's not really elegant that one has to write
Why not? You could always use typedef:
typedef boost::shared_ptr<CFoo> foo_sp;
...
v.push_back(foo_sp(new CFoo));
Elegant enough IMO, though people seem to either love or hate typedef. Using smart pointers in containers is very useful, and from experience, it has meant more time concentrating on the job at hand instead of tracking down memory leaks. I did use the ATL7 CAutoPtr class (and associated CAtlArray/CAtlList) but that's no help for writing portable code plus I prefer using STL iterators over MFC's 'POSITION' scheme. Shrug.
Whatever works I guess. But the more I use STL/Boost, the more I wonder why I went so long without it!
|
|
|
|
|
Boost.MPL[^] is an impressive achievement and a mind-opener for those venturing into the world of C++ metaprogramming. I wonder, however, how much real use metaprogramming gets in the C++ community.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|