 |
|
 |
but I found that the WTL7.0 example programes couldn't be passed the compiling I don't know the reason the compiling result is shown below:
atlframe.h(274) : error C2146: syntax error : missing ';' before identifier 'lpnm'
the reason is the source code appears like this:
LPNMREBARCHEVRON lpnm;
my question is which head file include the defination of
"LPNMREBARCHEVRON "?
I am interesting in programming with VC++. I hope to meet the net freinds with the same interesting. I am glad to know the better programmer on internet.
|
|
|
|
 |
|
 |
I had the same problem compiling MTPad in VC++6.0. I change the following line in stdatl.h
#define _WIN32_IE 0x0501
to
#define _WIN32_IE 0x0400
and the compile well ...
|
|
|
|
 |
|
 |
I had the same problem compiling MTPad in VC++6.0. I change the following line in stdatl.h
#define _WIN32_IE 0x0501
to
#define _WIN32_IE 0x0400
and the compile well ...
--------------------------------
I see...but I had other problem;
Can you mail your code to me ?
Thanks.
my email "zhanghao@newlandcomputer.com"
|
|
|
|
 |
|
 |
sorry,When i create new project I have same error, I changed same way as you but it reported error
Ru ao phong suong tren gac tro...
|
|
|
|
 |
|
 |
Try removing (or modifying) the following lines in stdatl.h:
#define WINVER 0x0500
#define _WIN32_WINNT 0x0500
#define _WIN32_IE 0x0501
|
|
|
|
 |
|
 |
1.Copy the .h files in WTL's include directory to VC's include directory.
2.Suppose your vc is under D:,copy the AtlApp60.Awx in WTL's appwiz directory to
D:\Microsoft Visual Studio\Common\MSDev98\Bin\IDE,
that is ok!then when u open vc Wizard,u will see an extral project to choose "WTL project".
Hope u enjoy it!
Sorry, I just downloaded the WTL 7.5. There is no longer available for "AtlApp60.Awx" anymore. Although I can go back to download the ver7.1, I just curios how to solve for installation on VC6 for ver 7.5.
-- modified at 23:46 Sunday 1st January, 2006
|
|
|
|
 |
|
 |
Hello, I am a new programmer (self learning) and am trying to access an agent with WTL. (actually if I can get the darn thing to load and say or do something would be great!!) However I am finding very little information about WTL. I do have the Microsoft SDK installed as well as the MsAgent docs and everything else I need for the agent. However the MS documentation (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msagent/paface_2lnp.asp) for programming the Agent appears to be very confusing. When I enter the first block of code (CoCreateInstance) I start getting errors. Basically I'm uncertain as to what goes where. As I understand I need the 'Enable ActiveX Control Hosting' checked. Any chance someone would be kind enough to create an SDI app and show where the code the MSAgent docs illustrate are suppose to go?
Thank You
Mike
|
|
|
|
 |
|
 |
Help me please ...
I have an existing MFC dll project.
I was given sample code in WTL, implementing a specific WTL CRichEditCtrl in a CMainFrame.
I need to roll this into my existing MFC dll.
Can I? How?
|
|
|
|
 |
|
 |
I was browsing around some for some XML stuff at Microsoft and found this link in the download section. It allows you to download just WTL 3.1 in a zip file.
http://msdn.microsoft.com/msdn-files/027/001/586/wtl31.exe
or just go to
http://msdn.microsoft.com/downloads/default.asp
and Drill Down to Visual Studio->Visual C++->Windows Template Library
|
|
|
|
 |
|
 |
I want to implement a dialog box that contains a list box. Does anyone have sample WTL code that shows how to use CListBox?
|
|
|
|
 |
|
 |
look this template that you can use to implement Any standard control that you want , also you can take a look on the first lines of Atlctrls.h.
CDDXControl m_Combo;
CDDXControl m_ListBox;
template
class CDDXControl :public CWindowImpl
{...}
// Dialog.h: interface for the CDialog class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DIALOG_H__BA6F9366_51A8_40EE_8B49_02EFF9943BBB__INCLUDED_)
#define AFX_DIALOG_H__BA6F9366_51A8_40EE_8B49_02EFF9943BBB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Atlctrls.h"
#include "AtlDdx.h"
#include "AtlMisc.h"
#include "resource.h"
template
class CDDXControl :public CWindowImpl
{
public:
BEGIN_MSG_MAP(CDDXControl)
// put your message handler entries here
END_MSG_MAP()
};
class CDialog : public CAxDialogImpl,
public CWinDataExchange
{
public:
enum { IDD = IDD_DIALOG1};
CDDXControl m_Combo;
BEGIN_MSG_MAP(CDialog)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
MESSAGE_HANDLER(WM_CLOSE, OnClose)
COMMAND_HANDLER(IDOK, BN_CLICKED, OnOK)
COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnCancel)
END_MSG_MAP()
BEGIN_DDX_MAP( CDialog )
DDX_CONTROL(IDC_COMBO1, m_Combo)
END_DDX_MAP()
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
DoDataExchange();
return 1; // Let the system set the focus
}
CDialog();
virtual ~CDialog();
LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
// TODO : Add Code for message handler. Call DefWindowProc if necessary.
EndDialog(0);
return 0;
}
LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
// TODO : Add Code for control notification handler.
m_Combo.AddString("Otraaaaa");
return 0;
}
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
// TODO : Add Code for control notification handler.
char buff[1024]="";
m_Combo.GetLBText( m_Combo.GetCurSel(), buff );
MessageBox( buff );
return 0;
}
};
#endif // !defined(AFX_DIALOG_H__BA6F9366_51A8_40EE_8B49_02EFF9943BBB__INCLUDED_)
|
|
|
|
 |
|
 |
Damn html code!!!
template <class TControlType>
class CDDXControl :public CWindowImpl
{
public:
BEGIN_MSG_MAP(CDDXControl)
// put your message handler entries here
END_MSG_MAP()
};
CDDXControl<CComboBox> m_Combo;
|
|
|
|
 |
|
 |
It seems that many people are able to download WTL from the Microsoft Platform SDK except for myself.
I keep getting an error message.
Does anyone have a tip on how to get WTL
|
|
|
|
 |
|
 |
Hi
As I am connected to Internet via somethink like 20kb modem, the
official fancy installer of Platform SDK is very unfriendly for me.
Because of that I perfectly understand those who are asking
questions like ascet even when they know that it is in Platform SDK.
Unfortunately, the WTL is probably not available separately (it
would be something like 162KB zip file).
Fortunately, it is possible to download a single cabinet file
(approximately 800KB) to install WTL (only the .h files).
Firstly, get the following cabinet file (you can just copy
the following line to the Internet Explorer, or you can use some
ftp client to do that):
ftp://ftp.microsoft.com/developr/PlatformSDK/Oct2000/psdk-common.48.cab
The size of the cabinet for Oct2000 is 893058 bytes.
Then create, let's say, WTLextract.bat file and copy the following
lines into it:
----------------------------------------------------------------
mkdir WTL
extract /L WTL psdk-common.48.cab Atl*.*
cd WTL
rename AtlApp_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlApp.h
rename AtlCrack_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlCrack.h
rename AtlCtrls_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlCtrls.h
rename AtlCtrlw_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlCtrlw.h
rename AtlCtrlx_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlCtrlx.h
rename AtlDdx_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlDdx.h
rename AtlDlgs_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlDlgs.h
rename AtlFrame_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlFrame.h
rename AtlGdi_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlGdi.h
rename AtlMisc_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlMisc.h
rename AtlPrint_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlPrint.h
rename AtlRes_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlRes.h
rename AtlScrl_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlScrl.h
rename AtlSplit_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlSplit.h
rename AtlUser_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlUser.h
----------------------------------------------------------------
Then run this batch in the directory where the cabinet file
is stored. The WTL subdirectory is created and filled with the
files. Copy the content to your "WTL/Include" subdirectory.
Notice: the previous version of WTL was placed in the cabinet
file of the same name. It is likely that the next version
will be inside of the cabinet with the same name.
Warning: AtlGdi.h still contains a bug in the
CDCT<>::GetTabbedTextExtent(). See the message
with subject "WTL 3.1: bug in AtlGdi.h (repost from 6 Oct)"
Enjoy,
Petr
P.S. The psdk-common.48.cab apparently contains also WTL examples.
If anybody knows more details on which files should be extracted, where
they should be placed, or whether other cabinets contains parts of WTL,
please post some hints.
--
Petr Prikryl, SKIL s.r.o.
|
|
|
|
 |
|
 |
Thanks for your great solution. After trying several times to run the Windows Installer, I did it your way and finally I have WTL 3.1
|
|
|
|
 |
|
 |
Hi,
Just found out where the other files are:
ReadMe_Txt.1BACAA38_9B60_4B39_9854_B7F2382B1334
contains the Readme.txt for WTL 3.1,
and if you download
psdk-x86.48.cab
from the same site, it contains the app wizard atlapp60.awx
bye
Michael
|
|
|
|
 |
|
 |
(Thanks, Michael, for new information.)
Here is updated version of the WTLextract.bat
batch file for instalation of WTL from two plain cab
files. New version of the batch extracts also examples
and ATL/WTL wizard. If you have any suggestion, share it!
Enjoy,
Petr
file WTLextract.bat
-------------------------------------------------------------------
echo off
cls
set psdk=Oct2000
set scommon=893058
set swizard=39162
set log=extract.log
echo WTL instalation
echo ---------------
rem Petr Prikryl (prikrylp@skil.cz), March 2001
if exist psdk-common.48.cab goto OKcommon
echo Firstly, copy this batch to some working directory.
echo Get the following cabinet file (you can just copy the following line
echo to the Internet Explorer, or you can use some ftp client to do that):
echo .
echo . ftp://ftp.microsoft.com/developr/PlatformSDK/%psdk%/psdk-common.48.cab
echo .
echo The size of the cabinet for %psdk% is %scommon% bytes.
echo If you want to install also the WTL wizard, download also
echo .
echo . ftp://ftp.microsoft.com/developr/PlatformSDK/%psdk%/psdk-x86.48.cab
echo .
echo The size of the cabinet for %psdk% is %swizard% bytes.
echo Place the cabinet(s) to the same directory where this batch is and
echo run the batch again. It creates ./WTL subdirectory with extracted files.
goto END
:OKcommon
echo Extracting headers and readme...
if exist %log% del %log%
extract /L WTL/Include psdk-common.48.cab *.A1000D79* >>%log%
extract /L WTL psdk-common.48.cab *.1BACAA38* >>%log%
cd WTL\Include
rename AtlApp_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlApp.h
rename AtlCrack_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlCrack.h
rename AtlCtrls_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlCtrls.h
rename AtlCtrlw_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlCtrlw.h
rename AtlCtrlx_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlCtrlx.h
rename AtlDdx_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlDdx.h
rename AtlDlgs_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlDlgs.h
rename AtlFrame_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlFrame.h
rename AtlGdi_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlGdi.h
rename AtlMisc_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlMisc.h
rename AtlPrint_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlPrint.h
rename AtlRes_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlRes.h
rename AtlScrl_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlScrl.h
rename AtlSplit_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlSplit.h
rename AtlUser_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C AtlUser.h
cd ..
rename ReadMe_Txt.1BACAA38_9B60_4B39_9854_B7F2382B1334 ReadMe.txt
cd ..
:EXexamples
rem Extract examples from the same cabinet.
echo Extracting the GuidGen example...
extract /L WTL/Examples/GuidGen psdk-common.48.cab *.755E56A7* >>%log%
extract /L WTL/Examples/GuidGen/Res psdk-common.48.cab *.59DE9FFA* >>%log%
cd WTL\Examples\GuidGen
rename AboutDlg_h.755E56A7_E652_46B4_A6D7_0CCF315D2624 AboutDlg.h
rename GuidGen_Cpp.755E56A7_E652_46B4_A6D7_0CCF315D2624 GuidGen.Cpp
rename GuidGen_Dsp.755E56A7_E652_46B4_A6D7_0CCF315D2624 GuidGen.Dsp
rename GuidGen_Dsw.755E56A7_E652_46B4_A6D7_0CCF315D2624 GuidGen.Dsw
rename GuidGen_Rc.755E56A7_E652_46B4_A6D7_0CCF315D2624 GuidGen.Rc
rename MainDlg_h.755E56A7_E652_46B4_A6D7_0CCF315D2624 MainDlg.h
rename Resource_h.755E56A7_E652_46B4_A6D7_0CCF315D2624 Resource.h
rename StdAtl_Cpp.755E56A7_E652_46B4_A6D7_0CCF315D2624 StdAtl.Cpp
rename StdAtl_h.755E56A7_E652_46B4_A6D7_0CCF315D2624 StdAtl.h
cd Res
rename GuidGen_Ico.59DE9FFA_8157_4709_B094_5F2969E49B32 GuidGen.Ico
cd ..\..\..\..
echo Extracting the MdiDocVw example...
extract /L WTL/Examples/MdiDocVw psdk-common.48.cab *.53855E45* >>%log%
extract /L WTL/Examples/MdiDocVw/Res psdk-common.48.cab *.D0BD03AE* >>%log%
cd WTL\Examples\MdiDocVw
rename Hello_Ico.53855E45_E9A1_4D6D_A016_C86B55004781 Hello.Ico
rename MainFrm_h.53855E45_E9A1_4D6D_A016_C86B55004781 MainFrm.h
rename MDI_Cpp.53855E45_E9A1_4D6D_A016_C86B55004781 MDI.Cpp
rename MDI_Dsp.53855E45_E9A1_4D6D_A016_C86B55004781 MDI.Dsp
rename MDI_Dsw.53855E45_E9A1_4D6D_A016_C86B55004781 MDI.Dsw
rename MDI_Ico.53855E45_E9A1_4D6D_A016_C86B55004781 MDI.Ico
rename MDI_Rc.53855E45_E9A1_4D6D_A016_C86B55004781 MDI.Rc
rename Resource_h.53855E45_E9A1_4D6D_A016_C86B55004781 Resource.h
rename StdAfx_Cpp.53855E45_E9A1_4D6D_A016_C86B55004781 StdAfx.Cpp
rename StdAfx_h.53855E45_E9A1_4D6D_A016_C86B55004781 StdAfx.h
cd Res
rename HelloDoc_Ico.D0BD03AE_627D_487E_8F51_77F78E270524 HelloDoc.Ico
rename Idr_Boun_Ico.D0BD03AE_627D_487E_8F51_77F78E270524 Idr_Boun.Ico
rename MDI_Ico.D0BD03AE_627D_487E_8F51_77F78E270524 MDI.Ico
rename MDI_Rc2.D0BD03AE_627D_487E_8F51_77F78E270524 MDI.Rc2
rename Toolbar_Bmp.D0BD03AE_627D_487E_8F51_77F78E270524 Toolbar.Bmp
cd ..\..\..\..
echo Extracting the MTPad example...
extract /L WTL/Examples/MTPad psdk-common.48.cab *.DF8CBE9B* >>%log%
extract /L WTL/Examples/MTPad/Res psdk-common.48.cab *.07DB2F17* >>%log%
cd WTL\Examples\MTPad
rename AboutDlg_h.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 AboutDlg.h
rename MainFrm_h.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 MainFrm.h
rename MTPad_Cpp.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 MTPad.Cpp
rename MTPad_Dsp.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 MTPad.Dsp
rename MTPad_Dsw.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 MTPad.Dsw
rename MTPad_h.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 MTPad.h
rename MTPad_Rc.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 MTPad.Rc
rename Resource_h.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 Resource.h
rename StdAtl_Cpp.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 StdAtl.Cpp
rename StdAtl_h.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 StdAtl.h
rename View_h.DF8CBE9B_82F3_4DCB_AC8E_F6DEA2C503F3 View.h
cd Res
rename MTPadDoc_Ico.07DB2F17_27FF_442C_98E1_6D2B292E9F49 MTPadDoc.Ico
rename MTPad_Ico.07DB2F17_27FF_442C_98E1_6D2B292E9F49 MTPad.Ico
rename printpre_bmp.07DB2F17_27FF_442C_98E1_6D2B292E9F49 printpre.bmp
rename Toolbar_Bmp.07DB2F17_27FF_442C_98E1_6D2B292E9F49 Toolbar.Bmp
cd ..\..\..\..
:EXwizard
rem Extract wizard if the cabinet was downloaded
if exist psdk-x86.48.cab goto OKwizard
echo
echo WTL wizard cannot be extracted -- cabinet file not present.
echo To extract WTL wizard get the cabinet file:
echo .
echo . ftp://ftp.microsoft.com/developr/PlatformSDK/%psdk%/psdk-x86.48.cab
echo .
echo The size of the cabinet for %psdk% is %swizard% bytes.
echo Place the cabinet to the same directory where this batch is and
echo run this batch again.
echo .
goto END
:OKwizard
echo Extracting WTL wizard...
extract /L WTL/AppWiz psdk-x86.48.cab /E >>%log%
cd WTL\AppWiz
rename AtlApp60_Awx.5500ABCF_72E4_45D7_BE1E_CF3394B98733 AtlApp60.Awx
cd ..\..
:END
echo
pause
set psdk=
set scommon=
set swizard=
-------------------------------------------------------------------
(end of file)
--
Petr Prikryl, SKIL s.r.o.
|
|
|
|
 |
|
 |
All this fuss about WTL just make me furious another time.
Well the code is pretty brilliant (as usual) with those cute hungarian notation conventions to make the code more readable and huge use of comment to balance the lack of documentation but, seriously, do we really need it? Do we need to always rely on "mom" Microsoft to make our job a little bit easier? Really, my impression is that we are loyal dogs just waiting for bones from time to time. MFC was not good for COM? It doesn't matter we did not use COM at all. Simply we did not need it!!! Now, there is ATL and COM is the present and the future! We must use it everywhere! And the library is so nice and efficient and then MFC is so heavy! We surely are not going to use it anymore! But one moment! Where is support for all those always readjusted common controls and common dialogs I was used to use? And document/view architecture? It was so brilliant! And CString!!! I cannot live without CString! So it comes WTL as a lifebelt really for those who were lost along the way asking "What should I do to remain in fashion and still work?". I think is really time for Windows programmers to show they are not eunuchs. I think we can really write a framework better than WTL instead of those gradient filled menus which are SOOOOO CUTE and skill probing but useless at all! We have a lot to learn from Linux programmers and from KDE developers in particular which are so organized and really doing something great. They have Konqueror but we have sidebar-gradient-filled menus! How skilled we are! In years we were not able to write an OLE control container on our own or some libraries to manage widely used image formats. It's a shame! Simply they are alive, we are quite DEAD
|
|
|
|
 |
|
 |
poor c++ programmers? -
typedef std::basic_string CString;
i like an easy life & i like wtl
|
|
|
|
 |
|
 |
can you really get that to compile? I don't think so.
class CString : public std::basic_string {
...
};
you both make valid points.
|
|
|
|
 |
|
 |
um okay, let that be
class CString : public std::basic_string {
...
|
|
|
|
 |
|
|
 |
|
 |
// StringsOfLife.cpp
//
// the point i was trying to make is that you don't
// have to use additional libraries to enjoy an
// easy life !!
// :-
#include
#include
#include
typedef std::basic_string CString;
int main(int argc, TCHAR* argv[])
{
CString strVal("Look no non-standard libraries!");
std::cout << strVal;
return 0;
}
|
|
|
|
 |
|
 |
Seems to me you should go get hang out with the Linux programmers and other raw-meat eaters. You opbviously have nothing to contribute here.
|
|
|
|
 |
|
 |
You surely can't contribute everywhere...
|
|
|
|
 |