|
CString source = "CodeProject";
std::string destination;
destination = (LPCTSTR)source;
Imtiaz
|
|
|
|
|
Hi
I have two CTreeViewCtrl on two different property pages that represent the same data. One of them is read-only, however with the other one you can add/update or delete nodes and leaves in the tree.
At the moment changes made in one is not shown in the other, and creating inconsistencies in the UI.
What is the recommended practice to propagate changes made in the editable page to the read-only page? Do I have to code it manually using an Observer type pattern or is there a built in WTL way?
Thanks
|
|
|
|
|
How to get mouse cursor hot spot from handle to the cursor?
modified 11-Mar-21 21:01pm.
|
|
|
|
|
Here is the code:
HCURSOR cur = GetCursor();
ICONINFO info;
GetIconInfo(cur,&info);
DWORD xHotspot = info.xHotspot;
DWORD yHotspot = info.yHotspot;
|
|
|
|
|
I'm developing IE toolbar. Everything was just fine, but now, when the toolbar is done I cann't turn on XP theme for it
I have added this to my resource file:
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST toolbar.manifest
Here is my "toolbar.manifest" file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
name="Microsoft.Windows.InstallMaker"
processorArchitecture="x86"
version="1.0.0.0"
type="win32"/>
<description>Install Maker</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
I have no any idea where is the problem.
Thanks.
|
|
|
|
|
Denisenko Yura wrote:
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST toolbar.manifest
That's the wrong resource ID. CREATEPROCESS_MANIFEST_RESOURCE_ID is used for EXEs, for DLLs use an ID of 2.
--Mike--
LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Thank you for the fast reply.
I have changed resource file, now I have this string in it:
2 RT_MANIFEST toolbar.manifest
But I have the same problem still. I don't see XP theme.
Any ideas?
Thanks.
|
|
|
|
|
|
Of course, I have read an MSDN article and all the CodeProject's XP manifest articles.
I has tried billion variants and still nothing.
Ok. Here is what I have now:
I have PSDK 2003 installed.
In stdafx.h:
#define _WIN32_WINNT 0x0501
#define SIDEBYSIDE_COMMONCONTROLS 1
#include "commctrl.h"
Additional dependencies:
ComCtl32.lib
In the SetSite method of the toolbar:
STDMETHODIMP CToolBarImpl::SetSite(IUnknown* pUnkSite)
{
...
InitCommonControls();
...
}
I have added toolbar2.rc:
2 RT_MANIFEST toolbar.manifest
Here is 'toolbar.manifest' file:
<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
<dependency>
<dependentassembly>
<assemblyidentity
type="win32"
="" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorarchitecture="x86" publickeytoken="6595b64144ccf1df" language="*">
My toolbar class is:
class CToolBarWindow : public CWindowImpl<ctoolbarwindow>
{
...
DECLARE_WND_SUPERCLASS(TEXT("MYTOOLBAR"), TOOLBARCLASSNAME)
...
}
I have compiled the app and checked that needed resource is in the dll file.
I started IE I didn't see XP theme for my toolbar (Other toolbars are OK).
I have no any idea what's wrong.
Please help.
Thanks.
PS: Maybe, can I have some 'blank' sources for IE plugin with XP theme?
I don't need any functionality, just blank IE DLL project that supports XP theme.
Thanks.
|
|
|
|
|
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...
|
|
|
|