|
Sorry, I don't checked "Don't threat <'s as HTML tags".
Here is correct XML that I used:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
name="Microsoft.Windows.MYToolbar"
processorArchitecture="x86"
version="1.0.0.0"
type="win32"/>
<description>MYToolbar</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
|
|
|
|
|
Someone help.
I cann't resolve the problem still
|
|
|
|
|
The prob was:
I have forgotten to use this define -
#define ISOLATION_AWARE_ENABLED 1
Thanks to all
|
|
|
|
|
how can we do this? anything else beside include "afxdlgs.h" ?? or we cant simply call mfc functions this way?
|
|
|
|
|
sorry i'm used to mfc in vc++ development and new to atl...
how to us embed a menu in a dialog that derived from CAxDialogImpl?
if it was a dialog that derived from Cdialog, we can do this by just
<br />
CMenu menu1;<br />
menu1.LoadMenu(IDR_MENU1);<br />
SetMenu(&menu1);<br />
|
|
|
|
|
Hi,
I've been trying to get my app these big sized 32 bit toolbars like in winrar. I've checked the Alpa example that comes with WTL but this just works for windows XP as Winrar's toolbar seems to work for older versions of commonctr32 aswel...
Does anybody know of a WTL app that has such toolbars? Or else, how are they created?
Thanks..
|
|
|
|
|
hello, i was trying to automate IE's save as function...i would like to add a item to right click context menu of IE, which is save image, which then automatically save the image into pre-defined folder...
anyone can point me a direction where i should look into in order to complete this??
thx you so much....
|
|
|
|
|
I have used WTL, how to controls are bind with variables. In MFC we used to classWizare -> Add variable, WTL does not support class Wizard.
Write your valueble suggestions.........
|
|
|
|
|
The easy way: use WTL Helper[^]
The not so easy way: use the DDX/DDV support, documented here[^]
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
i'm using VS.Net 2003, compiling a DLL with /MDd (it links to external libs
compiled with the same flags)
the following is in the main header
#if _MSC_VER < 1300
#include <iostream.h>
#else
#include <iostream>
using namespace std;
#endif
the project compiles without error or warning, but while linking i get ...
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(955):
error C2491: 'std::flush' : definition of dllimport function not allowed
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(947):
error C2491: 'std::ends' : definition of dllimport function not allowed
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\ostream(930):
error C2491: 'std::endl' : definition of dllimport function not allowed
these are repeated once per include of the header...
these methods are prefixed with the _CRTIMP2 macro, which with /MDd set, is
expanded to __declspec(import).
This in turn which chokes the linker..
note that i'm not even (explicitly) using any STL classes/templates/operators, etc
any clues on how to solve this ?
"Fried ice-cream is a reality !" - George Clinton
|
|
|
|
|
i m building COM components in VC++ using ATL lib.
I want to dyanamically create listboxes on my dialog.
I hav tried using classes in "atlcontrols.h" but dont know which Window handle to pass to get the list box on dialog.
Same with Static text boxex n edit boxes.
Can u plz try n give me some soln .
Gaurav Jain
K.K. Wagh Institue of Engineering Education and Research,
Nashik,
Maharashtra,
India.
gauravjain911@yahoo.com
|
|
|
|
|
The handle to your dialog ... more than likely it would be
this->m_hWnd
Might I suggest spending some time reading about ATL and COM development, including the ATL Framework before you just dive head first into COM ...
Also refer to Michael Dunn's WTL articles, they explain some of the basics of ATL/WTL.
D.
|
|
|
|
|
i m building COM components in VC++ using ATL lib.
I want to dyanamically create listboxes on my dialog.
I hav tried using classes in "atlcontrols.h" but dont know which Window handle to pass to get the list box on dialog.
Same with Static text boxex n edit boxes.
Can u plz try n give me some soln .
Gaurav Jain
K.K. Wagh Institue of Engineering Education and Research,
Nashik,
Maharashtra,
India.
gauravjain911@yahoo.com
|
|
|
|
|
how can we retrieve window xp's current user's name in mfc/atl?
because i writing some program which need to read file from internet cache, which is stored under user's folder...
thx in advance...
|
|
|
|
|
Don't go by the user's name for that, since you can move the IE cache directory. The right way to get the dir is SHGetFolderPath() with the CSIDL_INTERNET_CACHE parameter.
--Mike--
LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
can u pls gv more details on how to implement this ? from msdn and some sample in codeproject, i found we hv to include either "Shfolder.h" or "ShellFileOp.h", which is not found in my vc include folder? izzit i missed something during the installation?
beside that, i try in manual way to set the path, but i then found one problem, which this folder is protected, and using some different file system than normal file system. e.g. if we browse a file named "index.jpg", same file name is saved under the folder but we cant open the file by path <internet_cache>\index.jpg, instead it is represented by <internet_cache>\Content.IE5\EVIV8DSF\index.jpg, or may be <internet_cache>\index%5B1%5D.jpg....anyone hv any idea/experience in overcome this situation?
sorry for asking so many question...i'm new in c++ programming, and hv to finish this system in short time duration as my final year project...
thx in advance for any help...
|
|
|
|
|
|
hi, was trying to add a function [view image in new window], right above the line of save image of IE's right click context menu.
with referencing to msdn article titled "Adding Entries to the Standard Context Menu(Internet Explorer - Browser Extensions )" , i start to edit my windows registry. After adding a key named "view image in new window", and change it's value to the processing page, i later on try to add a binary value under it, with value 0x2 which only display this options when users click on an image only, but when i try to modify this binary value's value, it pop up a windows which show 4 0's as 0000, once i typed 0, it display another 2 0's, anyone hv any ideas on how this can be??
beside that, i also cant find more details on how the processing page will be, which i just like to get the image's path(preferable path which link to the image file in cache) , and display it in a new window....
hope can get some help or recommendation to some useful articles ...
thx in advance
|
|
|
|
|
add-on : link to the article titled "Adding Entries to the Standard Context Menu(Internet Explorer - Browser Extensions )", as mentioned above
http://msdn.microsoft.com/workshop/browser/ext/tutorials/context.asp
|
|
|
|
|
hi!!
im trying to create a Schema rowset as i want to display the tables existing in the database.
but im geting a Windows Error Report as soon as i execute getrowset function. Im building a COM using ATL.
any help is welcome.
STDMETHODIMP Cfuctcont::pop()
{
// TODO: Add your implementation code here
DBPROP InitProperties[5], InitProperty[3];
DBPROPSET rgInitPropSet;
IDataInitialize * pDataInit = NULL;
IDBInitialize * pDataSourceIDBInitialize = NULL;
IDBCreateSession * pSession = NULL;
IDBProperties * pProperties = NULL;
IDBCreateCommand * pCreateCommand = NULL;
ICommand * pCommand = NULL;
ICommandProperties * pCommandProperties = NULL;
ICommandText * pCommandText = NULL;
IOpenRowset * pOpenRowset = NULL;
IRowset * pRowset = NULL;
IRowsetChange * pRowsetChange = NULL;
IDBSchemaRowset * pSchemaRowset =NULL;
WCHAR wszProvider[] = L"MSDASQL"; // The Provider string
CLSID clsid;
HRESULT hr= S_OK;
// Init OLE and set up the data
CoInitialize(NULL);
// Setting up all the properties
// a) Setting up the Intitialization properties
for(long i=0;i<5; i++)
{
InitProperties[i].dwOptions = DBPROPOPTIONS_REQUIRED;
InitProperties[i].colid = DB_NULLID;
InitProperties[i].dwStatus = DBPROPSTATUS_OK;
}
// Data source string.
InitProperties[1].dwPropertyID = DBPROP_INIT_DATASOURCE;
InitProperties[1].colid = DB_NULLID;
InitProperties[1].vValue.vt = VT_BSTR;
InitProperties[1].vValue.bstrVal = SysAllocString(L"user");
InitProperties[4].dwPropertyID = DBPROP_INIT_OLEDBSERVICES;
InitProperties[4].vValue.vt = VT_I4;
InitProperties[4].vValue.lVal = DBPROPVAL_OS_ENABLEALL;
rgInitPropSet.guidPropertySet = DBPROPSET_DBINIT; // the property set
rgInitPropSet.cProperties = 5; // # of properties being set
rgInitPropSet.rgProperties = InitProperties; // array of DBPROP structures
// b) The Rowset properties
InitProperty[0].dwPropertyID = DBPROP_CANFETCHBACKWARDS;
InitProperty[1].dwPropertyID = DBPROP_IRowsetLocate;
for(i=0;i<2; i++)
{
InitProperty[i].dwOptions = DBPROPOPTIONS_REQUIRED;
InitProperty[i].colid = DB_NULLID;
InitProperty[i].dwStatus = DBPROPSTATUS_OK;
}
// 1. Data Source Initialization
hr = CoCreateInstance(CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER, IID_IDataInitialize, (void**)&pDataInit);
// Creating the IDBInitialize
hr = CLSIDFromProgID(wszProvider, &clsid);
hr = pDataInit->CreateDBInstance(clsid, NULL, CLSCTX_INPROC_SERVER, NULL, IID_IDBInitialize, (IUnknown**) &pDataSourceIDBInitialize);
// Setting the Initialization properties
hr = pDataSourceIDBInitialize->QueryInterface(IID_IDBProperties, (void**)&pProperties);
hr = pProperties->SetProperties(1,&rgInitPropSet);
hr = pDataSourceIDBInitialize->Initialize( );
hr = pDataInit->Release();
hr = pProperties->Release();
//session creation
hr = pDataSourceIDBInitialize->QueryInterface(IID_IDBCreateSession, (void**)&pSession);
hr = pDataSourceIDBInitialize->Release();
IUnknown *pUnkSession =NULL;
hr = pSession->CreateSession(NULL, IID_IOpenRowset, &pUnkSession);
IDBSchemaRowset * pIDBSchemaRowset = NULL;
// pUnkSession->QueryInterface(IID_IDBSchemaRowset, (void**)&pIDBSchemaRowset);
pSession->Release();
IUnknown * pUnkCommand = NULL;
IOpenRowset * pIOpenRowset = NULL;
WCHAR wszTableName[11] = {0};
DBID TableID;
IUnknown *ppUnkRowset;
IUnknown *ppRowset;
VARIANT rest[]={VT_EMPTY,VT_EMPTY,VT_EMPTY,VT_EMPTY};
::MessageBox(NULL,"Helooo",NULL,MB_OK);
const ULONG cProperties = 2;
DBPROP rgProperties[cProperties];
DBPROPSET rgPropSets[1];
// rgPropSets, cProperties, rgProperties);
//DBPROPSET* pPropSet, ULONG cProperties, DBPROP* rgProperties)
rgPropSets->rgProperties = rgProperties;
rgPropSets->cProperties = cProperties;
rgPropSets->guidPropertySet = DBPROPSET_ROWSET;
rgProperties[0].dwPropertyID = DBPROP_CANFETCHBACKWARDS;
rgProperties[1].dwPropertyID = DBPROP_IRowsetLocate;
for(i=0;i<2; i++)
{
rgProperties[i].dwOptions = DBPROPOPTIONS_REQUIRED;
rgProperties[i].colid = DB_NULLID;
rgProperties[i].dwStatus = DBPROPSTATUS_OK;
}
hr = pSchemaRowset->GetRowset (
NULL,
DBSCHEMA_TABLES,
0,
NULL,
IID_IRowset,
1,
rgPropSets,
&ppRowset);
if(hr==S_OK)
::MessageBox(NULL,"ok",NULL,MB_OK);
if(hr==DB_S_ERRORSOCCURRED )
::MessageBox(NULL,"HI",NULL,MB_OK);
if(hr==DB_S_ASYNCHRONOUS)
::MessageBox(NULL,"HI1",NULL,MB_OK);
//if(hr==DB_S_NOTSINGLETON )
//::MessageBox(NULL,"HI2",NULL,MB_OK);
if(hr==E_FAIL )
::MessageBox(NULL,"HI3",NULL,MB_OK);
if(hr==E_INVALIDARG )
::MessageBox(NULL,"HI4",NULL,MB_OK);
if(hr==E_NOINTERFACE )
::MessageBox(NULL,"HI5",NULL,MB_OK);
if(hr==DB_E_ABORTLIMITREACHED)
::MessageBox(NULL,"HI6",NULL,MB_OK);
if(hr==DB_E_ERRORSOCCURRED)
::MessageBox(NULL,"HI7",NULL,MB_OK);
if(hr==DB_E_NOAGGREGATION)
::MessageBox(NULL,"HI8",NULL,MB_OK);
if(hr==DB_E_NOTFOUND )
::MessageBox(NULL,"HI9",NULL,MB_OK);
if(hr==DB_E_NOTSUPPORTED)
::MessageBox(NULL,"HI10",NULL,MB_OK);
if(hr==DB_SEC_E_PERMISSIONDENIED)
::MessageBox(NULL,"HI11",NULL,MB_OK);
if(hr==DB_E_OBJECTOPEN )
::MessageBox(NULL,"HI12",NULL,MB_OK);
if(hr==E_OUTOFMEMORY )
::MessageBox(NULL,"HI13",NULL,MB_OK);
::MessageBox(NULL,"HIsfsf",NULL,MB_OK);
return S_OK;
}
thanking you.
Gaurav Jain
K.K. Wagh Institue of Engineering Education and Research,
Nashik,
Maharashtra,
India.
gauravjain911@yahoo.com
|
|
|
|
|
I used win32 application and wrote one WTL application file it shows error "WTL requires IE version 3.0 or higher" at compile time.
|
|
|
|
|
You need to set the macro '_WIN32_IE' to match the minimum version of Internet Explorer you're willing to support (this is basically for Common Controls support).
So, for IE3, put
#define _WIN32_IE 0x0300
in your stdafx.h, or for IE6, put
#define _WIN32_IE 0x0600
Note that there are also macros to set the OS level - see this page[^] for more details.
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
I inserted #define _WIN32_IE 0x0600 after compiling i got 6 error messages
First message "missing ';' before identifier 'lpnm'"
what i should do
|
|
|
|
|
I think you'll have to define WINVER and _WIN32_WINNT as well.
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
thank you for your reply
I used two header file and one cpp file. The files are following
// stdafx.h
#define STRICT
#define WIN32_LEAN_AND_MEAN
#define _WTL_USE_CSTRING
#define _WIN32_IE 0x0600
#include <atlbase.h> // base ATL classes
#include <atlapp.h> // base WTL classes
extern CAppModule _Module; // WTL version of CComModule
#include <atlwin.h> // ATL GUI classes
#include <atlframe.h> // WTL frame window classes
#include <atlmisc.h> // WTL utility classes like CString
#include <atlcrack.h> // WTL en
// MyWindow.h
class CMyWindow : public CFrameWindowImpl<cmywindow>
{
public:
DECLARE_FRAME_WND_CLASS(_T("First WTL window"), IDR_MAINFRAME);
BEGIN_MSG_MAP(CMyWindow)
CHAIN_MSG_MAP(CFrameWindowImpl<cmywindow>)
END_MSG_MAP()
};
// main.cpp:
#include "stdafx.h"
#include "MyWindow.h"
CAppModule _Module;
int APIENTRY WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
_Module.Init ( NULL, hInstance );
CMyWindow wndMain;
MSG msg;
// Create the main window
if ( NULL == wndMain.CreateEx() )
return 1; // Window creation failed
// Show the window
wndMain.ShowWindow ( nCmdShow );
wndMain.UpdateWindow();
// Standard Win32 message loop
while ( GetMessage ( &msg, NULL, 0, 0 ) > 0 )
{
TranslateMessage ( &msg );
DispatchMessage ( &msg );
}
_Module.Term();
return msg.wParam;
}
the above program only i got 6 errros
First error:
error C2146: syntax error : missing ';' before identifier 'lpnm'
d:\program files\microsoft visual studio\vc98\include\atlframe.h(1176) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
|
|
|
|
|