|
Hello,
I'm trying to find the best way to use the common tooltip control but with the possibility to have diferent fonts like bold, normal and italic in it.
My first idea was to try the custom draw support of the tooltip control but that does not enable you to have different fonts in one and the same tooltip.
Ok, I thought lets try it with owner draw, but the thing is I'm not sure if that is possible or supported with the tooltip common control.
Is there anyone out there who can give me an explanation how to do this the best way? Is owner drawing supported by the tooltip common control?
My aim is to support an editor for a house made language with the "Parameter Info" feature like the one in VC++, so whenever the next possible argument is entered the tooltip should show the next argument highlighted like with a bold font, simple but...
Andreas.
|
|
|
|
|
I haven't tried this myself, but I would think you could owner-draw the entire tooltip when the NM_CUSTOMDRAW message arrives. The NMCUSTOMDRAW struct has a RECT member that tells you the RECT of the control.
|
|
|
|
|
If you decide to go the path of a owner drawn control then you are welcome to use my Extended Tooltip as a base. It only allows a single font, but maybe there is scope to extend it to provide RTF capabilites within the tooltip window that would provide what you want. A lot of work, I guess - but it would be cool
|
|
|
|
|
I am writing an application for a customer and they have selected that F10 and it's variations (Ctl, Alt, Shift) bring up different windows.
Now I know that F10 is a System key used for Menu's and such, but I have tried WM_SYSCOMMAND and WM_SYSKEYDOWN to no avail. Here is my code for OnSysCommand:
void CMyDialog::OnSysCommand(UINT nID, LPARAM lParam)
{
if (nID == SC_KEYMENU)
{
UINT nKey = VK_F10;
OnFunctionKey(&nKey);
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
This works fine...but it works whether the user presses F10 or just Alt, which I don't want. So the basic question is
"Has anybody used F10 for something other than a menu initializer?"
Thanks
Chris Mancini
|
|
|
|
|
Hi
I did this using
OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
..
if (VK_F10 == nChar)
..
and it works fine.
Use ::GetKeyState to find out about Alt, Ctrl and so on
|
|
|
|
|
How to make a replication through ODBC in MS Access?
|
|
|
|
|
I have a problem with DevStudio Sp3 running under Win2K. The attach to process dialog doesn't show any processes! Does anyone else have such a problem?
Jignesh
|
|
|
|
|
Found the problem..
See http://support.microsoft.com/support/kb/articles/Q235/4/34.ASP
|
|
|
|
|
One more developers web site is almost ready. Here is discussion board
www.mindcracker.com/forum
|
|
|
|
|
Let's say - for a setup-like application; you could pack an unpacker program and the compressed data in an unique file, for easier download. That's easy enough - just "adding" the compressed data at the end of the unpacker exe file.
But .. under Windows NT, you can open an exe file at runtime, using the standard CFile class, read it, and save in a temporary location part of the file; this method doesn't work under Win9x though.
Anybody knows a better way that works under every MS OSes ?
Thanks!
|
|
|
|
|
I am implementing a listview for a touch screen application. I have placed a CSpinButtonCtrl next to the listview to make it easy to scroll, without having to fiddle with the scroll bar. The question is, how do you PERMANENTLY remove the vertical scroll bars from the listview, without settings the no-scroll option in the dialog template editor.
|
|
|
|
|
hi
i... jeims
help me T_T
|
|
|
|
|
Does anybody know, how to play AVI-Files during an application ?
I would like to it with DirectShow, but i would have to Download the whole DirectX SDK (128Mb !!!).
Does anybody know, where i could download only the DirectShow SDK, or any other solution, how to play AVI-Files ?
|
|
|
|
|
Ahh you're making the same mistake I did!!
DirectShow is NOT part of the DirectX toolkit. MS for some unknown reason decided to move it to the DirectX Media SDK which is spearate! I only learn't this after a 128M download! I does actually say this on the web site, but it is not very clear at all. (Us lot over here in England put it download to our lack of ability to read American!)
Anyway why use DirectX? Try a CAnimateCtrl....
|
|
|
|
|
Isn't there any way to create a button(or adding to a menu) in a COM clients dialog through a function of the COM server(dll)
|
|
|
|
|
Isn't there any way to create a button(or adding to a menu) on a server dialog through a function of a COM server(dll)
|
|
|
|
|
Hi,
in my app. i have this code:
The first part loads 2 bitmaps, 1 normal and one inverted one (used as a mask by windows):
HANDLE m_hImage;
HANDLE m_hNegImage;
m_hImage = LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_NORMAL), IMAGE_BITMAP, 0, 0, 0 );
m_hNegImage = LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB__INV), IMAGE_BITMAP, 0, 0, 0 );
Next i create a cursor with the info given:
ICONINFO info;
HCURSOR m_hCursor;
info.fIcon = FALSE; // means it's a cursor
info.xHotspot = 11;
info.yHotspot = 0;
info.hbmColor = (HBITMAP) m_hImage;
info.hbmMask = (HBITMAP) m_hNegImage;
m_hCursor = CreateIconIndirect(&info);
Next i override my OnSetCursor code to do my own implementation:
SetCursor(hCursor)
This code works absolutely fine under WinNT 4.0 but not under Win98. I imagine Win98 can't handle the size (rather big) of my own cursors. Anyway, all the functions return fine and work ok except it displays the standard cursor and not my own creation.
Does anybody have a clue on how i can still use my own images (and thus cursors) in my application under Win98?
Thanks
|
|
|
|
|
How I can get the list of availablis data members of the A class and their type, if there is an object or pointer on the object of the A class? (with C++ means only, w/o programming with assembler)
It is said, it is impossible.
Whether so it?
Thanks.
|
|
|
|
|
How can i display a ctrl in the dropdown window of a combo? for example a button?
or a checklist box?
|
|
|
|
|
Make the Combo box Owner Draw and derive a new class from Ccombobox and the control which u want to add
u also have to override various function (consult MSDN)
|
|
|
|
|
Hi,
I'm using a WebBrowser control inside a CView class. I've
used the ClassWizard to encapsulate the control's functionality,
but although I've used SetWidth() and SetHeight() to set
the right values, I can't get rid of the vertical scrollbar
on the right. SetResizeable(FALSE) returns a funny message,
and none of the CWnd scrollbar functions seem to have any
effect.
Any help will be greatly appreciated.
|
|
|
|
|
This can be done with the IDocHostUIHandler interface that you must implement in your container (CView derived class). Look at GetHostInfo and returning with docHostUIFlagSCROLL_NO flag set.
In ATL support for this interface is built in. You can look at the implementation of CAxHostWindow for an example implementation. A description of some of this can be found in ATL Internals.
|
|
|
|
|
void CDaTestView::OnInitialUpdate()
{
CView::OnInitialUpdate();
m_WebBrowserCtrl.SetLeft(0);
m_WebBrowserCtrl.SetTop(0);
m_WebBrowserCtrl.SetWidth(156);
m_WebBrowserCtrl.SetHeight(92);
if(m_WebBrowserCtrl.EnableScrollBar(SB_BOTH, ESB_DISABLE_BOTH) == TRUE)
TRACE("Cannot disable scrollbars!");
m_WebBrowserCtrl.ShowScrollBar(SB_BOTH, FALSE);
// Initialize the first URL.
COleVariant noArg;
m_WebBrowserCtrl.Navigate("file://D:/PROJECTS/MosaicLCD/default.html",&noArg,&noArg,&noArg,&noArg);
LPDISPATCH pDisp = NULL;
IDocHostUIHandler *pHostUIHandler = NULL;
pDisp = m_WebBrowserCtrl.GetDocument();
ASSERT(pDisp);
pDisp->QueryInterface(IID_IDocHostUIHandler, (LPVOID*)&pHostUIHandler);
ASSERT(pHostUIHandler);
if(pHostUIHandler)
{
DOCHOSTUIINFO *pInfo = NULL;
pHostUIHandler->GetHostInfo(pInfo);
if(pInfo)
{
if(((pInfo->dwFlags) & DOCHOSTUIFLAG_SCROLL_NO) == (pInfo->dwFlags))
TRACE("Scrolling enabled");
else
TRACE("Scrolling disabled");
}
}
if(pHostUIHandler)
pHostUIHandler->Release(); // release document's command target
if(pDisp)
pDisp->Release(); // release document's dispatch interface
}
I'm creating the m_WebBrowserCtrl in CDaTestView::OnCreate()
but I get an assertion in the line
pDisp = m_WebBrowserCtrl.GetDocument();
ASSERT(pDisp);
pDisp is NULL! Any idea why? Is there something else wrong
with this code?
Thanks in advance
|
|
|
|
|
You must wait for the DocumentComplete event from the Web browser control before you can get the document. Also you must implement the IDocHostUIHandler interface. The Web browser control will call your GetHostInfo method. You might be able to find some example code for this interface using MFC.
|
|
|
|
|
I want to use a MSchart-like bar-chart or pie-chart in my application . If I use the mschart.ocx in a dialog or a formview ,how can i print it? Or,if there is a easy way to get a method to realize the bar-chart and pie-chart,please tell me!
|
|
|
|