|
Glad you found one that may do what you want but if not
it would be trivial to implement the few lines of code
on that website as a class.
No need to change any of the function bodies (excpet main() )
so not exactly re-inventing the wheel. Just re-packaging an
existing wheel.
Steve T
|
|
|
|
|
is there anyway to move mouse to any point?
|
|
|
|
|
|
Actually, i want to show a tooltip in certain situations. I can show whenever i want it, but it is shown in the last mouse message's position. So i guess if i move it maybe i can show it where i want.
is there a solution to show tooltip, in a certain position
|
|
|
|
|
I'm not sure I understand your question. Are you trying to display a tooltip that follows the mouse?
If so, create the tooltip window, handle WM_MOUSEMOVE , and position it to the mouse's current location. Alternatively, use a timer to query the mouse's current location and move the tooltip everytime it changes.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
OK. for example when an edit box sends EN_MAXTEXT i want to show "max text" as a tooltip. I can show tooltip whenever i want, but i cant show it wherever i want.
it shows just where the mouse is over.
|
|
|
|
|
forcing the move to be the place you want your tooltip to be is very irritating for the user...
if you cannot find how to display your tooltip where you want, then search again (or you're doing something wrong) !!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
if that's the case, I suggest subclassing the CToolTipCtrl class or creating your own class that just makes a generic label window, but with colors to make it mimic a tooltip
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
I think you'd have to subclass the edit control to alter this behavior. Perhaps there's a style you can set to disable the default tooltip? If so, you could handle the EN_MAXTEXT notification and display your custom tooltip at a specific location.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
As always the solution is thinking basicly
SendMessage(TTM_ADJUSTRECT, TRUE, (LPARAM)&rect);
SetWindowPos(this,(rect.left+rect.right)/2, rect.top-50,
0, 0,
SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
|
|
|
|
|
|
Hey guys,
I'm absolutely not a experienced programmer but i have a problem, i will be happy someone can help me.
I have a dialog class CSimulator with a number of timers:
//part of the XXXXX.h file ****************************************************
class CSimulator : public CDialog
{
DECLARE_DYNAMIC(CSimulator)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
...
...
...
public:
virtual BOOL OnInitDialog();
void OnTimer(UINT nIDEvent);
//part of the XXXX.cpp file ****************************************************
IMPLEMENT_DYNAMIC(CSimulator , CDialog)
void CSimulator::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CSimulator, CDialog)
ON_WM_TIMER()
...
...
END_MESSAGE_MAP()
void CSimulator::OnTimer(UINT nIDEvent)
{
...
...
...
CDialog::OnTimer(nIDEvent);
}
When i start the class CSimulator from another class (CWnd) with DoModal() everything is working fine and the function CSimulator::OnTimer(UINT nIDEvent) is called after setting a timer with SetTimer(IDTIMER,50,0);
But when i start the class CSimulator from another class (CWnd) with m_Simulator.Create(IDD_SIMULATION_DIALOG); (m_Simulator is the instance of class CSimulator)
i have a problem. In this situation i don't receive the ON_WM_TIMER message .
Note: At another situation i need the class CSimulator (CDialog) showed in a window, but in this situation i only need the algorithm of the class, only modeless
What i'm doing wrong? I search a lot, but don't see the problem, can anyone help me with a solution?
Thanks, Bart
|
|
|
|
|
You must be doing something wrong with your modeless dialog. This worked for me:
CMyDialog::CMyDialog( CWnd *pParent ) : CDialog( CMyDialog::IDD, pParent )
{
Create(IDD);
}
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
ON_WM_TIMER()
END_MESSAGE_MAP()
BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
SetTimer(1234, 50, 0);
return TRUE;
}
void CMyDialog::OnTimer(UINT nIDEvent)
{
TRACE(_T("OnTimer()\n"));
CDialog::OnTimer(nIDEvent);
}
...
CMyDialog *pDlg = new CMyDialog;
pDlg->ShowWindow(SW_SHOWNORMAL);
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
how do you get a websites source code? I need all the links (over 1500) and I will parse the data after I get the code, i am using a dialog based app and have a webbrowser I need to get the info from,
thanks
|
|
|
|
|
Hi,
I understand, you have an application and want to get the HTML-sourcecode and parse them?
Take a look at this:
http://www.codeproject.com/miscctrl/simplebrowserformfc.asp
I think this is off-topic, but ...
To get a website and all links from this site use "Mozilla-FireFox" and the AddOn "downThemAll". Now you need only a "right-mouse-click" and change some options from "downThemAll" and the FireFox will save all website to your harddisk.
Mozilla
downThemAll
|
|
|
|
|
|
I wrote a program that part of it involves closing other windows, but I run into some funny stuff if the window is minimized when I close it. Is there any way I can check to see if a window is minimized before closing it? I have the window handle.
Yesterday is history
Tomorrow's a mystery
Today is a gift
That's why they call it the present.
Danny
|
|
|
|
|
IsIconic Function
The IsIconic function determines whether the specified window is minimized (iconic).
BOOL IsIconic( HWND hWnd<br />
);
|
|
|
|
|
|
you can use CWnd::isIconic() this function. It return non zero it it is minimized, otherwise 0
|
|
|
|
|
When adding a new dialog resource, the OK button is automatically configured so that, when clicked, it will take you off the form and do whatever code you wrote in an if statement:
if(dialog.DoModal() == IDOK){}
I want to add another button, Restore Defaults, that will take me off the form like the OK button and I can make an else if statement such as:
int returned = dialog.DoModal();
if(returned == IDOK){}
else if(returned == ID_RESET_DEFAULTS){}
How do code this?
Danny
|
|
|
|
|
In the handler for this "Restore Defaults" button, simply call EndDialog(ID_RESET_DEFAULTS) .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanx!!
(The book I was using to learn MFC must not be the greatest)
Danny
|
|
|
|
|
maybe the cheapest ?!
or maybe you failed reading it ;P
anyway, you found the right place for C++ questions though...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
is there an API call to obtain the list of COM ports as listed by Device Manager .
|
|
|
|