|
If my reply helpful to you, Could you please rate the message ?
Regards,
Paresh.
|
|
|
|
|
Why you guys really worried about the ratings.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
There is meaning for ratings, that's why CP has provoded this facility.
Regards,
Paresh.
|
|
|
|
|
I've been wondering that for years.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Did you include the required header file ?
|
|
|
|
|
Yes sir,
#pragma once
#include "xmllite.h"
class CXMLWriter
{
public:
CXMLWriter();
virtual ~CXMLWriter();
protected:
CComPtr<istream> pOutFileStream;
};
</istream>
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Did you try to include atlbase.h ?
|
|
|
|
|
It's work sir, so what is the problem in my code.
I found that IStream need to include objidl.h and I try it give the same error. There is no any details regrading the atlbase.h
Can you advice me on this.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
The compiler was complaining that CComPtr was not defined, so I just googled for it and found this page[^] (first result). If you look at the requirements section, it says which header file you have to include.
So, whenever you have such kind of error, the easiest thing to do is just google to see which files need to be included.
|
|
|
|
|
Thanks a lot.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
|
Hi
In vc++ 6.0 , i want to know how to create a Menu Bar Button in Form View SDI (as File,Edit,Help) at run time through code.
thanks
regards
shakumar
shakumar
|
|
|
|
|
shakumar_22 wrote: In vc++ 6.0 , i want to know how to create a Menu Bar Button in Form View SDI (as File,Edit,Help) at run time through code.
Get the pointer of Menu using GetMenu api, than extract teh particular menu by using GetSubMenu api, and on pointer of returned Menu class as the new button!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
|
Hi,
I am reading the jpeg image and writing the data to the text file(as binary). I want to reconstruct the jpeg image (like BMP) using the data written in text file. And I want to display it on dialog. Is it possible..?? If Yes let me know the procedure.
Thanx in advance.
Reagards
Shiva
|
|
|
|
|
Did you have a look at GDI+ look here [^]
Regards,
Sandip.
|
|
|
|
|
Do you want to show jpeg file so you can use of CImage class.
|
|
|
|
|
Hi all,
I m using a tree ctrl ,Here i m create diffrent Parents and its Child.
I m using checkbox funcnality here.
I want if i check the parents's check box then all child of selected parent is also checked.
Please anyone can tell me how can i do this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hello and good day. I have 2 applications wherein I want the 1st which creates a graph send its image to the 2nd which will display it. I searched for some ways and ended up using a MFC shared DLL wherein I have a HBITMAP which the 1st one will write image on, and the 2nd one will read (using WM_COPYDATA for signalling, and mutex for synch). It's declared as the ff:
#pragma bss_seg("MFCDLLSample")
TESTDLL_API HBITMAP DLLImageBmp;
#pragma bss_seg()
Now, I checked first if it works by having the 1st app make a graph then display it on another picture box (same app) and it actually worked. When I tried to display it in the 2nd, it does not display. I coded it like this in the 2nd app:
PicWnd = GetDlgItem(IDC_PICBOX);
PicDC = PicWnd->GetDC();
oldBmp = (HBITMAP)PicDC->SelectObject(DLLImageBmp);
PicPaintDC.BitBlt(0, 0, 404, 404, PicDC, 0, 0, SRCCOPY);
CDialog::OnPaint();
Can anyone help me out with this? I really need to know what might be wrong with my code or implementation.
Thank you in advance for the help and time!
--added contents:
I forgot, TESTDLL_API's definition is this:
#ifdef TESTDLL_EXPORTS
#define TESTDLL_API __declspec(dllexport)
#else
#define TESTDLL_API __declspec(dllimport)
#endif
Thanks again!
modified on Monday, June 23, 2008 12:48 AM
|
|
|
|
|
GDI handles cannot be shared across process.
You have to think of some alternative methods to transfer the image from the first process to next. A possible method is sending the pixel data of the bitmap to the second process and the second process should recreate the bitmap using the pixel data.
1) you can use GetDIBits() function to get the pixel data of a bitmap
2) use WM_COPYDATA or other interprocess communication methods to send the pixel data to the second process.
3. use CreateDIBitmap() function to recreate the bitmap.
|
|
|
|
|
Naveen wrote: GDI handles cannot be shared across process.
Yes, but if it was shared through DLL, its still not possible? I was adviced last time to do that. Please refer to this link[^].
|
|
|
|
|
Llasus wrote: I was adviced last time to do that. Please refer to this link[^].
I am also confused seeing that.
AFAIK, it cannot be shared.
From MSDN:
"GDI objects support only one handle per object. Handles to GDI objects are private to a process. That is, only the process that created the GDI object can use the object handle"
The GDI handles are actually offset to the handle map's that reside in the client side. So when you pass a handle to another process, it simply points to a location in the handle table in that process. Some times, the object in that location will be entirly a different one such as Brush or Pen or some times the object itself is not created. So the result will be unpredictable.
if you want to know more please read the article Give Me a Handle, and I'll Show You an Object[^]
|
|
|
|
|
Naveen wrote: I am also confused seeing that. [Confused]
Guess I trusted that advice too early, even though I had a doubt in my mind if it was possible in the first place.
Anyway, I'll read the article to have more knowledge on this and try coding the solution that you gave me earlier on. Thank you very much for your help and time!
|
|
|
|
|
Sorry for the advice man but i was really not aware of the fact that handles cant be shared across the processes.
Regards,
Sandip.
|
|
|
|
|
Hi Sandip. its ok. you helped me out not to do the clipboard solution anyway. Thank you.
|
|
|
|