|
You can construct dib and then use to paint the image on the screen.
|
|
|
|
|
If you look at the functions CBitmap::CreateBitmap , or ::CreateBitmap , you'll notice that the last
value can take a pointer to initial values. Just select this into a DC, and BitBlt / StretchBlt .
OR, if you will be changing the values, you'll need to look up StretchDIBits . This is a harder
function to use, but more flexible.
You should find examples on their use in MSDN.
Good luck,
Iain.
|
|
|
|
|
hello all,
as i required to add a toolbar to IE from my application, i had downloaded kbbar.exe from microsoft site as said in the documentation (CP) . But i didnt understand how to use this dll and from where i can add my own toolbar.
Plz help me, i will be greatfull to u.
ComputerNewton
|
|
|
|
|
The codeproject IE bar comes with source code as I remember. From my about box,
Programming: Michael Dunn.
IE Toolbar Wizard: Erik Thomson.
Searching for the articles by these two stellar chaps should help a lot.
Iain.
ps. The CP Bar is a worthwhile download in itself.
|
|
|
|
|
may i have the link to it plz
ComputerNewton
|
|
|
|
|
Don't be so !
Just under is a search box. Type "Michael Dunn" into it. Select "Authors", and press GO.
You'll get a long list. On the second page is his "Search Bar" article. On further inspection,
he doesn't include source code. But in the acknowledgements is a pointer to Erik Thompson's
"DeskBand ATL Object Wizard" article.
Go there, read, download, learn, enjoy!
Iain.
|
|
|
|
|
Thank u very much. i had found it. but only the dll and .exe but not how to do it.
ComputerNewton
|
|
|
|
|
If you use Erik Thompson's article, and download his wizard, he gives instructions on how to use use /
install it.
You can then make a new ATL project and add a IDeskBar object. All this is in his article. I've done
so and I now have my name in big letters in an band next to my explorer menu. What you put into the
band is up to you.
Iain.
|
|
|
|
|
Thanks a lot for ur help.
well i shall try it now.
ComputerNewton
|
|
|
|
|
Friends,
I want to associate some value with every row added in CListCtrl. For this purpose i am using SetItemData() and GetItemData() .
But the problem is that i want to associate data not only per column basis, but i also want to associate data in each column of a row and later retrieve it.
How can i do so ?
|
|
|
|
|
Rather than storing your data directly in the list control's "itemdata", define your data elsewhere in your code, perhaps as classes or structures, and then store pointers to that data. This allows you to store much more complex information for each row of your list control. It's then upto you how you want to arrange and manipulate that data in relation to the current selection in the list. In this case, the SetItemData/GetItemData functions simply insert/retrieve the pointers to your "data" storage.
HTH
|
|
|
|
|
Store data for columns to some array and use SetItemData to store pointer to this array for each row in the list
rrrado
|
|
|
|
|
SetItemData() will set the item data for the entire "row." If you want a data item for each subitem too, use SetItem() .
int nItem = InsertItem(...);
SetItemData(nItem, ...);
SetItem(nItem, 0, LVIF_PARAM, "", 0, 0, 0, lParam);
SetItem(nItem, 1, LVIF_PARAM, "", 0, 0, 0, lParam);
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I'm using MSHTML for browsing and parsing HTML in my application.
How can I get image data of some element after it is downloaded (or file name of this image downloaded in temporary internet files) ?
Thank you !
rrrado
|
|
|
|
|
I have a CTreeCtrl, I need to change the color of the node that was previously selected. How do I do this.
Also I can get the previous node to be bold, but then how do I reset the same when I click on some other node.?
|
|
|
|
|
Look into the MSDN documentation for the NM_CUSTOMDRAW message. That allows you to manipulate the visual appearance of the tree control without having to resort to full-blown owner-drawn implementations. Michael Dunn has done some nice articles on the subject elsewhere at CG - I suggest you search for them.
HTH
|
|
|
|
|
Hi all..
Iam developing an application where in ,the application sends data to the server and need to calculate the bandwidth.I want to find the Time difference in milliseconds between the data sent and received..Is there any member function which will help be to find the time difference in milliseconds.
|
|
|
|
|
Have a look at QueryPreformanceCounter() and QueryPerformanceFrequency()
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Have a look at GetTickCount()
|
|
|
|
|
Before you get too excited about lack of resolution, read this article.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Given the code below why am I getting the following error message?
point3d.cpp(26) : error C2660: 'setZ' : function does not take 0 parameters
#include "Point3D.h"
#include <iostream>
using std::cout;
using std::ostream;
Point3D::Point3D(void)
{
setX(0);
setY(0);
setZ(0);
}
Point3D::Point3D(double xValue, double yValue, double zValue)
{
setX(xValue);
setY(yValue);
setZ(zValue);
}
Point3D::Point3D(const Point3D& p)
{
setX(p.getX());
setY(p.getY());
setZ(p.setZ());
}
double Point3D::getZ() const
{
return z;
}
void Point3D::setZ(double zValue)
{
z = zValue;
}
ostream& operator<<( ostream& o, const Point3D& p)
{
o << "(" << p.getX() << ", " << p.getY() << ", " << p.getZ() << ")";
return o;
}
Thanks, i appreciate it
|
|
|
|
|
You might want to take a closer look at your overloaded constructor.
setZ(double zValue) takes a single parameter of type double. You're not passing in any kind of value (double) when you call setZ in your overloaded constructor.
<code>
Point3D::Point3D(const Point3D& p)
{
setX(p.getX());
setY(p.getY());
setZ(p.setZ());
}
void Point3D::setZ(double zValue)
{
z = zValue;
}
</code>
Regards,
|
|
|
|
|
do I need to do something similiar as below in point2d.cpp
//Point2d.cpp
#include <iostream>
using namespace std;
#include "Point2D.h"
Point2D::Point2D()
{
setX(0);
setY(0);
}
Point2D::Point2D(double a, double b)
{
setX(a);
setY(b);
}
Point2D::Point2D(const Point2D& p)
{
setX( p.getX() );
setY( p.getY() );
}
Point2D Point2D::getPoint() const
{
return (*this);
}
double Point2D::getX() const
{
return x;
}
double Point2D::getY() const
{
return y;
}
void Point2D::setX(double a)
{
x = a;
}
void Point2D::setY(double b)
{
y = b;
}
void Point2D::setPoint(const Point2D& p)
{
setX( p.getX());
setY( p.getY());
}
Point2D Point2D::operator+(const Point2D& p)
{
return Point2D( getX()+p.getX(), getY()+p.getY());
}
Point2D Point2D::operator-(const Point2D& p)
{
return Point2D( getX()-p.getX(), getY()-p.getY());
}
bool Point2D::operator<(const Point2D& p) const
{
return (getX() < p.getX() || getY() < p.getY());
}
bool Point2D::operator>(const Point2D& p) const
{
return (getX() > p.getX() || getY() > p.getY());
}
bool Point2D::operator==(const Point2D& p) const
{
return (getX() == p.getX() && getY() == p.getY());
}
Point2D& Point2D::operator++(void)
{
setX(getX()+1);
setY(getY()+1);
return *this;
}
Point2D Point2D::operator++(int dummy)
{
Point2D p = *this;
setX(getX()+1);
setY(getY()+1);
return p;
}
ostream& operator<<( ostream& o, const Point2D& p)
{
o << "(" << p.getX() << ", " << p.getY() << ")";
return o;
}
Thanks
|
|
|
|
|
In the copy constructor:
Point3D::Point3D(const Point3D& p)<br />
{<br />
setX(p.getX());<br />
setY(p.getY());<br />
setZ(p.setZ());<br />
}<br />
The last line calls p.setZ() when it should call p.getZ() . So the copy constuctor should be:
Point3D::Point3D(const Point3D& p)<br />
{<br />
setX(p.getX());<br />
setY(p.getY());<br />
setZ(p.getZ());<br />
}<br />
|
|
|
|
|
Hello, everyone,
In my current project, I am using BHO. I need a function to be called when the size of IE browser window changes.
In the IDispatch::Invoke function, I tried to use DISPID_WINDOWSETWIDTH, DISPID_WINDOWSETWIDTH and DISPID_WINDOWRESIZE. But none of them fires when the IE browser window size changes?
What should I do?
Thanks a lot in advance.
Bin
|
|
|
|