|
Ah, so he did. Strange why someone would ask the exact same question 2 days in a row. Most of the answers in the previous thread were accurate enough to tell him not to do it that way.
There are many issues that factor in when someone tries this (too many to list). Suffice it to say that it doesn't work far more often than it does, and in either case, it is bad practice to free memory that was allocated by another module (simply on software engineering practices).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hello friends,
I am creating edit control at run time in WTL.
i written following handler for edit control.
NOTIFY_HANDLER(2500, EN_CHANGE, OnUpdateEdit)
LRESULT OnUpdateEdit(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
but i am unable to capture change event of edit box, means this function never execute.
|
|
|
|
|
|
Hi,
What is the CCustomDraw class used for? Can anyone explain why it is specifically used? It has methods like OnItemPostPaint, OnItemPrePaint. What are these methods?
Thanks...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
|
Hi Michael,
Ofcourse I read all your WTL series. One of the best that I have read.
But my question is, When do we use COwnerDraw and when do we use CCustomDraw ?
Thanks for taking the time to answer my question.
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
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.....
|
|
|
|