|
Hi
COM server's CLSIDs are inside them.
these CLSIDs are set with the COM server when it is developed.
So it is developers work, When any body installs a COM server
that CLSID which is embed inside the COM server is written in the
registry of the computer where that server is being installed.
|
|
|
|
|
Hello all i have made a sdi application having view derived from CFormView Class. In that class i have made a list control. I have also made ui thread which performs certain task and then has to return some CString and int values using which we fill our list control. now i want to know how do i pass these values to my list control class.
Can anybody please tell me the way with the code
thanks in advance...
|
|
|
|
|
neha.agarwal27 wrote: now i want to know how do i pass these values to my list control class.
Allocate them on the heap in the view class. Pass that address to the thread.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
can you please tell me how to code for them...
|
|
|
|
|
See this article, about 1/4 way down.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
As David said:
Create your variables on the heap, using the new operator.
MyClass *a = new(MyClass);
Then, when you create your thread, pass the pointer (in this case *a ) to the thread as an argument. After processing data in the thread, you can assign them to *a , and then close the thread.
|
|
|
|
|
Hello,
I have a list box using CListBox class in which I want to select multiple choices in the list box. But how do I get all the strings selected in an array.
The documentation of CListBox tehre is no function to get multiple strings.
The GetSelItems() function gives multiple ints then What should I do.
Thanks
Prithaa
|
|
|
|
|
prithaa wrote: The GetSelItems() function gives multiple ints then What should I do.
Those are the indexes of the selected items.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello,
Thanks,I overlooked the docs.
Prithaa
|
|
|
|
|
prithaa wrote: Thanks,I overlooked the docs.
Now THAT is something that is just begging to be in a signature...!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Mornin' James
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
|
You just stole a document from James! Naa too bad.
|
|
|
|
|
I haven't heard from his attorneys yet
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
Didn't you just hear from me?
|
|
|
|
|
Fixed.
Mark Salsbery
Microsoft MVP - Visual C++
"You just stole a document from James!"
|
|
|
|
|
Even funnier!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hey what are you looking at? I just tricked him with my doc. He's just taken his hands up from your doc! Just grab it back James, fast fast.
btw, Marc is this we call a "sig-Virus",that gets itself attached to the sigs automatically?.
(Very funny indeed!)
|
|
|
|
|
Hi
you youselve have to do it in a for loop
GetSelItems()
GetText()
|
|
|
|
|
Hi all,
currently i'm developing an application with system tray icon support. now i want to display the balloon tool tips on it when some an event occurs.
and i did the application in VC++.Net 2005, it work perfectly. but i want to do in vc++6.0.
the VC++6.0 version is not supporting the latest version of shellapi.h and its related files.
can any one help me to solve this.
Thanks in advace.
Gopinath
"If you can't see the bright side of life, polish the dull side"
|
|
|
|
|
Hi,
I am trying to display a bitmap Image which I have stored in an array in my program .. But only a rectangle filled with Black color appears...My code snippet is as follows ...
<code>
HBITMAP hndle=NULL; // declared in .h file
CBitmap obj;
obj.CreateBitmap(20,23, 1, 1, dec_arr );
hndle=obj.operator HBITMAP();
sim_bt.Create( _T("Hi") ,WS_CHILD | WS_VISIBLE | BS_BITMAP , CRect(30,0,100,40),this,2222);
hndle=sim_bt.SetBitmap(hndle);
</code>
As far as I know CreateBitmap() is the function that initializes the CBitmap object with the bitmap stored in the memory ( array) [ Please correct me if I am wrong...]
Operator HBITMAP gives me the handle og the bitmap..
I am creating the button of type CButton using Create(),
and finally associating the bitmap using bitmap to the button using SetBitmap();
I have no idea of the two parameters
UINT nPlanes , UINT nBitcount ( I think these values might be causing a problem..) what values should I put here ???
If my approach is totally wrong which functions should I use..
|
|
|
|
|
It has been a while but if both are set to ‘1’ then you are creating a monochrome bitmap (black and white). How many bits per color are in the map? The article CDibData may help or you can dig through CxImage , in any case try searching for ‘image’ or ‘bitmap’ or ‘DIB’; there are lots of acticles.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Ravindra_Joshi wrote: UINT nPlanes , UINT nBitcount ( I think these values might be causing a problem..)
You set both to 1, and MSDN states :
For a color bitmap, either the nPlanes or nBitcount parameter
should be set to 1. If both of these parameters are set to 1,
CreateBitmap creates a monochrome bitmap. Hence the black rectangle. I would try leaving nPlanes to 1 and setting nBitcount to a higher number. I am sorry to have no more advice to give on the real usage.
|
|
|
|
|
If I put the values of nBitcount and nPlanes other than 1 , then nothing is displayed ( not even the rectangle filled with black color ).....
Can someone help me out with the values of "nPlanes" and "nBitcount" ....
|
|
|
|
|
>>HBITMAP hndle=NULL; // declared in .h file
>>CBitmap obj;
>>
>>obj.CreateBitmap(20,23, 1, 1, dec_arr );
>>
>>hndle=obj.operator HBITMAP();
>>
>>sim_bt.Create( _T("Hi") ,WS_CHILD | WS_VISIBLE | BS_BITMAP , CRect(30,0,100,40),this,2222);
>>
>>hndle=sim_bt.SetBitmap(hndle);
The planes and bitcount describe the format of the pixel data in the array.
nPlanes is the number of planes and nBitcount is the number of bits per pixel per plane.
These define the layout of the data in the array, where each row of pixel data is followed by the
next row of data for each plane.
Each row of pixel data bytes must be WORD aligned for a CBitmap/HBITMAP. That means every row
needs to have a length a multiple of 2 bytes, padded if necessary.
Some examples:
For a 16x16 bimap nPlanes==4, nBitcount==1 the data is layed out in the array<br />
Plane 0, Row 0 2 bytes<br />
Plane 0, Row 1 2 bytes<br />
...<br />
Plane 0, Row 15 2 bytes<br />
Plane 1, Row 0 2 bytes<br />
Plane 1, Row 1 2 bytes<br />
...<br />
Plane 1, Row 15 2 bytes<br />
...etc
For a 16x16 bimap nPlanes==1, nBitcount==24 the data is layed out in the array<br />
Plane 0, Row 0 48 bytes<br />
Plane 0, Row 1 48 bytes<br />
...<br />
Plane 0, Row 15 48 bytes
You seem to know your array of pixel data is for a 20x23 bitmap.
You also need to know the format of that data, and if it's not a format supported by GDI you may
also need to translate it into an acceptable form.
You also don't need to call a conversion operator specifically like you've done to get the HBITMAP
from a CBitmap. You can simplify your code:
HBITMAP hndle=NULL; // declared in .h file
CBitmap obj;
obj.CreateBitmap(20,23, 1, 1, dec_arr );
sim_bt.Create( _T("Hi") ,WS_CHILD | WS_VISIBLE | BS_BITMAP , CRect(30,0,100,40),this,2222);
hndle=sim_bt.SetBitmap(obj );
Hope this helps a little!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|