|
What about making a note of which node is open, do the update, and then open that node back up afterwards?
"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 have a SDI app without toolbar and I need to add images to some of my menu items.
How can I do it?
Thanks.
|
|
|
|
|
there are thousands of example articles out there.
did you search any by chance ?
|
|
|
|
|
Yes, but they all include some user drawn class.
I was wondering could it be done for standard menus? Sorry for my poor language.
|
|
|
|
|
nope, the standard menu don't support this.
but using owner drawn menus wouldn't be too hard if using an all made class...
|
|
|
|
|
|
Thanks.
I used 'BCMenu' because I already have it included in my project.
|
|
|
|
|
Hello All,
I hav written a dialog based application. By pressing a button I want to open a .WMV video. I have used ShellExecute() function. Then How to set it to Full Screen through program?
Thanks & Regards
Sairam
|
|
|
|
|
sairam madem wrote: I have used ShellExecute() function.
What are you passing as the last argument?
"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
|
|
|
|
|
IF you dont need to Media player you cna use of MCI functions and they are easy to use like this for example.
CString str=_T("play f:\\93.mpg");
mciSendString(str,0,0,0);
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Is there a WIN32 function that will tell me whether any modifier key is pressed?
The context is a mouse hook function that is only interested if one or more modifier keys (shift, ctrl, alt) is pressed. If no key is pressed it just passes the event to the next hook.
I know that GetKeyState() returns the state of a specified virtual key, and that GetKeyboardState() returns an array of states. But a function that just tells me if ANY modifier key is pressed would add less latency in cases (most of the time) when a key is not pressed.
Thanks for listening
|
|
|
|
|
What's wrong with GetAsyncKeyState() ?
"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
|
|
|
|
|
Thanks for the reply.
Like GetKeyState(), I think GetAsyncKeyState() just tells me about a single key. I would prefer a single function call that tells me whether any modifier has been pressed, thus saving several system calls in the hook context.
|
|
|
|
|
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.
|
|
|
|
|