|
I did not write my answer for "dolly".
This question has the highest ranking on Google.
It appears in the first place!
Anybody searching for IMAGE_DLLCHARACTERISTICS_NX_COMPAT on Google will come here.
|
|
|
|
|
In order to customize the "details" on the left pane of the Explorer. I have implemented IPersistFolder3, however the getDetailsEx didn't get
called when i select a virtual item, it only get called when i double click the item.
|
|
|
|
|
Hello Friends,
I am using Windows Vista and I am builing an c++ ATL DLL in Visual C++ 6.0, which is an addin DLL for Windows Mail. (Outlook Express)
When I run my Windows Mail, Vista's DEP (Data Execution Prevention) feature blocks it, and prompts that it blocked for security purpose as some other program tried to use windows mail data.
But I have to hook into Windows Mail as have to put an addin to customize its GUI.
I tried to turn DEP off for Windows Mail, but it didnt allow me (even in Full Admin Account).
Also I turned DEP off for my exe (which loads my addin DLL, which further hooks into Windows Mail), but despite that Windows Mail is blocked.
Also, when I build the project in Visual Studio 2005, it runs very well. (And I have not made any change in the project settings or code)
It seems, VC 6 uses older compilers and VS 2005 uses latest ones so are compatible with Vista!
But I have to use VC 6 only as it's my project's requirement!
Please Help!
Thanks a lot !!
dolly,
N,IN
|
|
|
|
|
That's because the version of ATL shipped with VC6 includes windowing code which is not DEP compliant.
To build an ATL windowing plug-in for a DEP enabled application I'm afraid you have no choice - you must build your code using Visual Studio 2005 or 2008.
|
|
|
|
|
Hello Friends,
I have an ATL project in Visual Studio 2005, but now I want it in Visual C++6.0.
I have used one utility available on Code Project only i.e.
prjconverter.exe
it converted .sln to .dsw BUT on building the project,
I am having many error, mainly
"C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\atlcom.h(2945) : error C2065: '_Module' : undeclared identifier"
Because even in converted project,
class Coeapi_sampleModule : public CAtlDllModuleT< Coeapi_sampleModule >
{
public :
DECLARE_LIBID(LIBID_oeapi_sampleLib)
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_OEAPI_SAMPLE, "{2FB8F87B-D079-497D-8948-F2F060162392}")
};
Coeapi_sampleModule _AtlModule;
BUT
what I want (generated by compiler if we build in vc 6) is
CComModule _Module;
and i read that CComModule is obsolete now, but I have to use it anyway because I have to code & build the project in Visual C++ 6.0 only not in Visual Studio 2005.
Please Help.
Thanks well in Advance!
dolly,
N,IN
|
|
|
|
|
create a new project in Visual C++6.0, and merge your code in the new dll project
|
|
|
|
|
Hi all,
Is there a way to create a calendar control without the month and the year, I just need the days.
Thanks,
Jayjay
reposted at mfc
modified on Friday, July 4, 2008 1:33 AM
|
|
|
|
|
Hi
I want to get mouse move or click event on Internet Explorer ,
Through that I can get selected text form Internet Explorer .
Thanks in advance.
dabara
|
|
|
|
|
If you program an ActiveX you could capture both Events (but from the window of the Object)
JO
|
|
|
|
|
Hello,
I am trying to make an SDI applicaiton with a form view.
When this type of applicaiton is generated in MFC, the main window is sized according to the size of the dialog or the screen size.
If the window size is smaller than the dialog, scroll bars appear so that the dialog can be scrolled inside the view.
When I generate this same type of applicaiton in WTL, the dialog is clipped if the view size is smaller than the dialog, and the size is based only on the screen size.
I can change the size of the main window by initializing a rect in the Run function before calling wndMain.CreateEx(NULL,rc).
However, I would like to duplicate the functionality of the MFC applicaiton.
How do I get the correct size for the main window?
How do I get the scroll bars to appear if the view is smaller than the dialog?
|
|
|
|
|
I used ATL to realize my NSE. But I'd like to use DefView instead of customized list view in my NSE. So I had to implement IShellFolder2. However error(Heap corruption) happens every time when I debugging the NSE. Do you know what's the reason or how shall I implement the IShellFolder2.
|
|
|
|
|
|
I tried to download the mailer sample from http://msdn.microsoft.com/en-us/library/6c3k2z70(VS.80).aspx but everytime I get this message
========== Rebuild All: 0 succeeded, 0 failed, 2 skipped ==========
It is not building the project. everytime it just skips it. I do not know what does that mean? How can I get this code to compile? I am using VS 2008, win XP.
Thanks.
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions.
..surviving in autumn..in love with spring..
|
|
|
|
|
you must activate the projects in the build manager. You find it in the "Build" Menu.
Greetings from Germany
|
|
|
|
|
thanks for the reply. Yes, now I am able to compile it now but that sample did not meet my requirement so I left it long back.
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions.
..surviving in autumn..in love with spring..
|
|
|
|
|
hi,
i want to define an enum type variable on the Interface ,
so i have defined an enum within interface and then take a property from this enum,
but have encountered with a compile time error !?
what is my mistake and what is its solution?
interface IXFSReceipt : IDispatch
{
enum RPtrResolution
{
RPTR_RESOLUTION_LOW,
RPTR_RESOLUTION_MEDIUM,
RPTR_RESOLUTION_HIGH,
RPTR_RESOLUTION_VERYHIGH
};
HRESULT Resolution([out, retval] RPtrResolution* pVal);<<<<<<<< ERROR1
HRESULT Resolution([in] RPtrResolution newVal);
};
ERROR1 : error MIDL2025 : syntax error : expecting a type specification
modified on Friday, June 27, 2008 4:44 PM
|
|
|
|
|
You have to define a typedef for the enum.
This should do the trick:
typedef enum RPtrResolution{
RPTR_RESOLUTION_LOW,
RPTR_RESOLUTION_MEDIUM,
RPTR_RESOLUTION_HIGH,
RPTR_RESOLUTION_VERYHIGH
}RPtrResolution;
[
Your Interface UID and etc...
]
interface IXFSReceipt : IDispatch
{
HRESULT Resolution([out, retval] RPtrResolution* pVal);
HRESULT Resolution([in] RPtrResolution newVal);
};
Please tell me how it worked
JO
|
|
|
|
|
Hi all,
I am making auto installer of a list of softwares via CTreeItem. What I do is that to fill in the CTreeItems I get the items from the system registry which I can do successfully now what I need to do is to find out what is being highlighted from the Items at the press of my button then it will install that software from a specified source.
Any ideas on how it is being done?
thanks,
Jayjay
|
|
|
|
|
Hi all,
I am having this issue that when I create a treeviewlist it causes my main dialog to crash when I close it. Here is my code:
here is my class
#define DDX_CONTROL_IMPL(x) \
class x##_ddx : public CWindowImpl<x##_ddx, x> \
{ public: DECLARE_EMPTY_MSG_MAP() };
class CMainDlg : public CDialogImpl<CMainDlg>, public CUpdateUI<CMainDlg>,
public CWinDataExchange<CMainDlg>,public CCustomDraw<CMainDlg>,public CDialogResize<CMainDlg>
{
protected:
HKEY Regentry;
DWORD dwData, dwDisp;
CTreeViewCtrlExImpl UpdateList;
CButton Install;
void QueryProductTree();
public:
enum { IDD = IDD_MAINDLG };
BEGIN_MSG_MAP(CMainDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
COMMAND_ID_HANDLER(IDC_PREF, OnPreference)
COMMAND_ID_HANDLER(IDC_INSTALL, OnInstall)
END_MSG_MAP()
BEGIN_DDX_MAP(CMainDlg)
DDX_CONTROL(IDC_INSTALLTREE, UpdateList)
END_DDX_MAP()
BEGIN_UPDATE_UI_MAP(CMainDlg)
END_UPDATE_UI_MAP()
BEGIN_DLGRESIZE_MAP(CMainDlg)
DLGRESIZE_CONTROL(IDC_INSTALLTREE, DLSZ_SIZE_X|DLSZ_SIZE_Y)
END_DLGRESIZE_MAP()
LRESULT OnInitDialog(UINT , WPARAM , LPARAM , BOOL& );
LRESULT OnCancel(WORD , WORD wID, HWND , BOOL& );
LRESULT OnPreference(WORD , WORD wID, HWND , BOOL& );
LRESULT OnInstall(WORD , WORD wID, HWND , BOOL& );
};
#endif
Then here is my main code
LRESULT CMainDlg::OnInitDialog(UINT , WPARAM , LPARAM , BOOL& )
{
CenterWindow();
HICON hIcon = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDD_MAINDLG),
IMAGE_ICON, ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR);
SetIcon(hIcon, TRUE);
HICON hIconSmall = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDD_MAINDLG),
IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
SetIcon(hIconSmall, FALSE);
if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Redmap Update Manager\\Parameters\\ManagePoint",
0, 0, REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS, NULL, &Regentry, &dwDisp))
{
printf("Could not create the registry key.");
return 0;
}
dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
EVENTLOG_INFORMATION_TYPE;
Install.Attach(GetDlgItem(IDC_INSTALL));
UpdateList.Attach(GetDlgItem(IDC_INSTALLTREE));
QueryProductTree();
return TRUE;
}
LRESULT CMainDlg::OnCancel(WORD , WORD wID, HWND , BOOL& )
{
RegCloseKey(Regentry);
Regentry = NULL;
delete Regentry;
if (this->m_hWnd != NULL)
EndDialog(wID);
return 0;
}
void CMainDlg::QueryProductTree()
{
CTreeItem mPoint, Rrite;
mPoint = UpdateList.InsertItem ( _T("ManagePoint"), TVI_ROOT, TVI_LAST );
mPoint.AddTail ( _T("ManagePoint 4.3.2.58"), 0 );
mPoint.AddTail ( _T("ManagePoint 4.3.2.83"), 0 );
Rrite = UpdateList.InsertItem ( _T("Re-Rite"), TVI_ROOT, TVI_LAST );
Rrite.AddTail ( _T("Re-Rite 6.1.0.11"), 0 );
Rrite.AddTail ( _T("Re-Rite 6.1.0.23"), 0 );
return;
}
Is there something I lack? Is there something I need to close?
Thanks,
Jayjay
|
|
|
|
|
I got it now I have to destroy the tree and give a value of NULL.
|
|
|
|
|
How can i get the look of satus bar as a installation form ( like we see in the installation of any component of MicroSoft progess bar). In the standerd my it is not looking good.
|
|
|
|
|
I want smooth XP type status bar, where as it seems to be WIN' 98 status bar. How can i do this.
|
|
|
|
|
Sounds like you need to set the PBS_SMOOTH[^] style for the progress bar
|
|
|
|
|
Style should be like XP, Not like Windows-98
|
|
|
|
|
Define what you mean by 'XP rather than Windows 98'...
If you mean using themed controls, then you need to add a manifest, as described here[^].
|
|
|
|
|