|
Ownerdraw is for when you want to draw the whole thing, like a customised button. Custom draw only works with some controls, such as ListView. Basically, if the control sends NM_CUSTOMDRAW notifications, you can use Customdraw with it.
Steve S
Developer for hire
|
|
|
|
|
hello friends i have 3 edit boxes in dialog.
i want to apply Undo management on these controls.
can someone help me.
Thanks
|
|
|
|
|
I want to Create another Application with CreatProcess API, when my Windows Service will be started. Problem is that Application's WM_PAINT is not called.Anybody, can tell me
STARTUPINFO siStartupInfo;
PROCESS_INFORMATION piProcessInfo;
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
siStartupInfo.cb = sizeof(siStartupInfo);
CreateProcess(L"D:\\TestingApplication\\DialogTest\\Debug\\DialogTest.exe",
0,0,0,false, CREATE_DEFAULT_ERROR_MODE,0,0,&siStartupInfo,&piProcessInfo);
Musharraf Hussain
|
|
|
|
|
I have a situation where a Frame window creates another FrameWindow. Now, both these windows should run on the same thread. How do achieve this?
The second window may not be a frame window but it should derive from the CWindowImpl class with CFrameWinTraits .
Any ideas gurus?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
A window is run on the thread that creates it, so just create the window - instantiate an object and call the Create method.
Steve S
Developer for hire
|
|
|
|
|
Hello friends,
I want to use outlook express in my vc++ project to send email.
when i will try to send email then outlook send mail dialog box should open.
we only need to show outlook dialog box with attached file
to the user. after that it is up to the user to send email or not
|
|
|
|
|
Does it have something to do with ATL, WTL or STL ? If not, this is the wrong forum.
For your question, look for Outlook Automation (on google for example), it can be helpfull.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
hi!
i want to display one text file in Dev studio by adding one COM add-in.
Any body help/guid me to write the COM Add-in in VC++.
thanks
shankatenugu.
|
|
|
|
|
See the following where you can find out how to create the addins for the VC++
here
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Hi All
I am writing a component using ATL.
One of the method from the component accept a pointer to a structure. This structure definition is in other header file.
[id(3), helpstring("method get_StreamMediaType")] HRESULT get_StreamMediaType([in,out] AM_MEDIA_TYPE* pVal);
AM_MEDIA_TYPE present in 'strmif.h' file.
When I am trying to compile the project it gives me error in IDL file as
.\DSMediaInfoServices.idl(24) : error MIDL2025 : syntax error : expecting a type specification near "AM_MEDIA_TYPE"
.\DSMediaInfoServices.idl(24) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
Thanks in Advance.
Amar
-- modified at 9:25 Thursday 11th May, 2006
|
|
|
|
|
I think you need to add header file in the component so that idl can understand what is AM_MEDIA_TYPE
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
-- modified at 1:03 Friday 12th May, 2006
|
|
|
|
|
hello ,how can I ask question in here? I just can't find a place to post my
question .Which button allows me to write?
I have use WTL from a short time ago. I didn't know MFC very well.
so , about the macro of message ,they are so hard for me !
I wonder all the message function protype(and how many they are).
ok , MESSAGE_HANDLER ,COMMAND_HANDLER, and which like ON_BN_CLICK, MSG_WM_*,
NOTIFY_HANDER, and so on ,is they are different? Give me a detail describe.
Thank you!
I like my job.
|
|
|
|
|
|
heboy wrote: MESSAGE_HANDLER ,COMMAND_HANDLER, and which like ON_BN_CLICK, MSG_WM_*,
by Usage they are same, but technically they are different@
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Amar Sutar wrote: [id(3), helpstring("method get_StreamMediaType")] HRESULT get_StreamMediaType([in,out] AM_MEDIA_TYPE* pVal);
AM_MEDIA_TYPE present in 'strmif.h' file.
it better you copy that structure in your IDL file!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
There is also a strmif.idl file, which includes axcore.idl which defines that structure AM_MEDIA_TYPE, so I would import "strmif.idl"; to get hold of the definiton
|
|
|
|
|
I want to create a DLL which will have to create windows and dialogs, and wanted to use WTL for creating the DLL. I know it's possible to create a DLL with MFC and so thought it might be possible to do it with WTL. Is this the case and if so does anyone have a demo project available ?
|
|
|
|
|
|
Thanks again hfry! On first look I found two relevant source files - wtldlldialog.zip AND WTL_DLL.ZIP. It's too late now to check them out, but I will look at them over the next couple of days...... I may be back in the near future asking more questions
Let me give you some background to my problem.... I have a C-based app which has a plugin interface which supports certain features. When implementing these features, it is sometimes necessary to create windows and/or dialogs. I wanted to create it using WTL so that I can benefit from all of WTL's great classes for GUI implementation (including CDialogResize).
Anyway, that's the second time you've helped me, and I really appreciate it.
Best Regards.....
|
|
|
|
|
|
I have ATL 3.1 and WTL 7.0 installed. Are they compatible?
The reason for this is that Windows 2000 comes with ATL 3.1 and since I didn't get WTL 3.1 anywhere, I downloaded WTL 7.0. Everything was working fine, till I had to use the CPaneContainer class. To use this class I had to include atlctrlx.h to my project and that's where all the trouble started. Now it throws an error at compile time saying...
d:\program files\microsoft visual studio\vc98\include\atlctrlx.h(802) : error C2039: 'ShellExecute' : is not a member of '`global namespace''
Could anyone tell me why this error? Is it due to the version incompatibility? If yes then can anyone guide me to a download link to WTL 3.1 or ATL 7.0. Will ATL 7.0 work on Windows 2000?
Thanks...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Hi,
I got hold of the culprit. The error was occuring due to the WIN32_LEAN_AND_MEAN macro. When the macro was defined it removed the header where ShellExecute was declared.
Thanks....
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Yes, you can use WTL 7 with VC 6 (WTL is AFAIK still being kept backward compatible with VC 6).
#include the right header to get the ShellExecute() definition.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I am creating a console application,in which I create an instance on IE and hook an event sink to it.The main code is as follows:
CoInitializeEx(NULL, COINIT_MULTITHREADED);
IWebBrowser2* disp;
HRESULT hr;
hr=CoCreateInstance(CLSID_InternetExplorer,NULL,CLSCTX_LOCAL_SERVER,IID_IWebBrowser2,(void**)&disp);
if(SUCCEEDED(hr))
{
disp->put_Visible(TRUE);
LPSTREAM pStream = NULL;
//marshalling the broser interface
hr = CoMarshalInterThreadInterfaceInStream(IID_IWebBrowser2, disp, &pStream);
.......
HANDLE hThread = CreateThread(NULL, 0, ThreadProc1,pStream, 0, &dwThreadID);
WaitWithMessageLoop(hThread);
......
}
}
...........
disp->Navigate2(&vurl, &ve, &ve, &ve, &ve); */
CoUninitialize();
In threadprocfunction,i create an instance of teh sick and hook it to IE
CoInitialize(NULL);
........
// get proxy to interface and release IStream
HRESULT hr = CoGetInterfaceAndReleaseStream(pStream, IID_IWebBrowser2, (LPVOID*)&psIE);
HRESULT hr=CoCreateInstance(CLSID_InternetExplorer,NULL,CLSCTX_LOCAL_SERVER,IID_IWebBrowser2,(void**)&psIE);
....... //Create the listener instance
hr = CoCreateInstance(CLSID_emplaybacksink,NULL,CLSCTX_INPROC_SERVER,IID_Iemplaybacksink,(void**)&tsink);
....... {
AtlAdvise( psIE,pUnk,DIID_DWebBrowserEvents2,&m_dwCookie);
........ }
The Atladvise action causes IE to hang during navigation.It proceeds only after the application has exitted.It seems there is a deadlock when IE calls back into the event sink.How can i avoid it?
|
|
|
|
|
1. You shouldn't call CoInitialize in the thread-proc (don't know if that affects you problem, though).
2. You CoCreateInstance Internet Explorer in your thread-proc, replacing the interface pointer passed (by marshalling) to the thread.
I think the main thing is that your thread doesn't have a message loop, so it's unlikely that connection points will work, as they rely (IIRC) on Windows messages.
Why use multiple threads, anyway? Connection points & IE work fine in a single-threaded app...
|
|
|
|
|