|
nybody can tell me how to set ANTIALIASED_QUALITY for LOGFONT i did but it s nt working for me sometime./ plz look in ANTIALIASES_QUALITY message before this
|
|
|
|
|
this is not a chat, it is a forum...
if you can't wait more than 1/2 hour for an answer, just don't ask
|
|
|
|
|
Hi all,
My situation is that I have to intercept a click on the print button on an IE print preview window. The project dictates that the Page Setup dialog should be opened first when Print is clicked.
My question is what is the best way to do this?
I have subclassed the window but the toolbar buttons are not separate windows so all I'm getting is a WM_LBUTTONDOWN message to the main window with the location of the click. I can of course stop this message getting through but knowing for sure when the right button has been hit is where I'm having a problem with this technique.
Is there a way of querying the window to find the rect and position of the print button? I'm unhappy about measuring it myself and hard coding in the value in case some system change invalidates the value I've come up with
Thanks for any ideas and help
Cheers
Tom
Philosophy: The art of never getting beyond the concept of life.
Religion: Morality taking credit for the work of luck.
|
|
|
|
|
CFont dateFont, eventFont;
LOGFONT logFont;
GetLogFontStruct(logFont, 16, 0, pDC);
dateFont.CreateFontIndirect(&logFont);
GetLogFontStruct(logFont, 10, 0, pDC);
eventFont.CreateFontIndirect(&logFont);
void CCalendar::GetLogFontStruct(LOGFONT & logFont,int height,int width,
CDC * pDC, CString strFontName)
{
logFont.lfHeight = -MulDiv(height + 1, pDC->GetDeviceCaps(LOGPIXELSY), 72);
logFont.lfWidth = -MulDiv(width, pDC->GetDeviceCaps(LOGPIXELSX), 72);
logFont.lfEscapement = 0;
logFont.lfOrientation = 0;
logFont.lfWeight = FW_NORMAL;
logFont.lfItalic = 0;
logFont.lfUnderline = 0;
logFont.lfStrikeOut = 0;
logFont.lfCharSet = DEFAULT_CHARSET;
logFont.lfOutPrecision = OUT_DEVICE_PRECIS;
logFont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
logFont.lfQuality = ANTIALIASED_QUALITY; //CLEARTYPE_QUALITY; //PROOF_QUALITY;
logFont.lfPitchAndFamily = 0; //DEFAULT_PITCH | FF_SWISS;
_tcscpy_s(logFont.lfFaceName, strFontName);
}
i do restore font after drawing
after this while drawing in case of dateFont it comes ANTIALIASES_QUALITY
but in case of eventFont it does not come...
plz help.
|
|
|
|
|
I have to diaplay one png image in dialog box(like bmp in picture control).
any can help me...
my image has some transparent things... if change it into bmp format than it won't be transparent
so what i have to for diaplaying png image in dialog
|
|
|
|
|
Use CxImage[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I already tried this using following code
but that image lost it's transparency and looks like bmp
HBITMAP m_bitmap = NULL;
CxImage image("myfile.png", CXIMAGE_FORMAT_PNG);
...
CDC* hdc = m_picture.GetDC();
HBITMAP m_bitmap = image.MakeBitmap(hdc->m_hDC);
HBITMAP hOldBmp = m_picture.SetBitmap(m_bitmap);
if (hOldBmp) DeleteObject(hOldBmp);
if (hdc->m_hDC) m_picture.ReleaseDC(hdc);
...
if (m_bitmap) DeleteObject(m_bitmap);
|
|
|
|
|
Ah, you won't get transparent blitting from the picture control (which is a CStatic actually), look at Stuart Dootson's post. You will have to do the blitting yourself, i recommend using CxImage's own blitting methods.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
- Create a 'picture control' to hold the picture
- Derive a class from CStatic that'll draw the picture. It should declare a message map and handle WM_PAINT and use a CImage to hold the image. Note the call to
TransparentBlt , which (as I've coded it) assumes that the top-;peft pixel of hte image is the transparent colour:
class MyPic : public CStatic
{
public:
MyPic();
protected:
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP()
private:
CImage image_;
};
MyPic::MyPic()
{
image_.Load(png filename);
}
void MyPic::OnPaint()
{
PAINTSTRUCT ps;
CDC * drawDC = BeginPaint(&ps);
CRect rcClient;
GetClientRect(&rcClient);
image_.TransparentBlt(*drawDC, rcClient, CRect(0, 0, image_.GetWidth(), image_.GetHeight()), image_.GetPixel(0, 0));
EndPaint(&ps);
} - Declare a member variable wfor the picture control that is of the type you've just made.
- See your picture be displayed!
|
|
|
|
|
Cimage is in VC6.0?
why because i am getting error
|
|
|
|
|
ganesh.dp wrote: Cimage is in VC6.0?
Probably not - but you didn't say you were using 10-11 year old software.
CImage is definitely in VS.NET 2003 - and that's the oldest VS I have.
|
|
|
|
|
|
CImage is just a wrapper around a GDI+ Image [^] - you could try using GDI+ - you will need to get a version of the Platform that a) is compatible with VS6, and b) contains GDI+.
As this Platform SDK[^] is the last one that works with VS6, I guess it's your best option.
|
|
|
|
|
Hi Guys,
I'm looking to be able to position 2 CToolBar objects into an SDI both permanently docked to the top but one left justified and one right justified on the same line. All my efforts so far leave the bars docked one above the other.
Any ideas?
Thanks
|
|
|
|
|
Hi,
I have created one sample application, which has one parent window. There i have created one picture frame, i want to insert one child window in the place of picture frame. I am able to do that and i am able to get vertical scroll bar on dialog box.
In child dialog i calling onpaint() for creating bitmap images and check boxes, there i want to create 20 bit map images, i did that.
Whenever i have scrolled down the scroll bar, the the image which is moving up is erasing, and it is displaiyng like overlapping all the images with one another...
Can any help me to get rid out of this problem..?
Thanks
Venkatesh.
|
|
|
|
|
Hi all,
Please tell me how can i remove this error "Record is too large."
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: Please tell me how can i remove this error "Record is too large."
Drop the table.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i m not drop the table.
please tell me any solution.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
You should really make a better post in order to get any help. For instance post the relevant code and be more detailed and precise about the error (i.e. aat what line it occurs?).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Try using smaller records (45s?) or switch to CDs like the rest of us
|
|
|
|
|
BTW: you should use the joke icon...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
i m using table in database, here diffrent type of data types i m using.
when i m add entries in table in form of special characters than this error comes.
i m not using very long data like for Text data type i m using less than 255 characters.
please help me for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: please help me for this.
Can you show your database schema? What code are you using to update the database? What is the exact error message?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
hi,
I want to run an internet explorer on my application, which is C++ and on Microsoft Visual Studio (on PocketPc or Windows Mobile Platform).
I use a class CWebBrowser to work with this Control.
I use RegEdit for Mobile and I can't find the GUID of that control on my mobile, therefore the control does not create.
(GUID = 8856F961-340A-11D0-A96B-00C04FD705A2 )
(CLSID = { 0x8856f961, 0x340a, 0x11d0, { 0xa9, 0x6b, 0x0, 0xc0, 0x4f, 0xd7, 0x5, 0xa2 } } )
would someone help me to solve my problem.
Thanks
Miss_F
modified on Thursday, February 5, 2009 5:35 AM
|
|
|
|