|
Drawing a fucus rectangle while the mouse is being moved is one of the very, very few operations where you might draw directly instead of in OnDraw.
Basically, you:
draw and save using the initial mouse position in OnLButtonDown
erase the saved rect, updating it, drawing the ract and save it again in OnMouseMove
erase the saved rectangle in OnLButtonUp
You might want to use DrawFocusRect, which uses XOR as the drawing operation (that is, erases the rectanle if it is already drawn).
|
|
|
|
|
If you are drawing the focus rect using DrawFocusRect, then you would just capture the mouse, and when it moves, call DrawFocusRect with the old coordinates (which will erase the old focus rect) and call it again with the new coordinates to draw the new one. Very fast and no flicker.
onwards and upwards...
|
|
|
|
|
CWnd::Invalidate - This method invalidates the entire client area of CWnd.
Maybe you should only invalidate the rectangle that is the union of where you 'were' and where you 'are', which might be a LOT less than the entire client area of your window.
When you invalidate the entire client area of your window, your OnDraw will get a paint message with the ENTIRE client area of your window in the rcPaint of the PaintStruct. Not good, if you moved a little rectangle down in the lower right corner of your window.
|
|
|
|
|
i have a buetooth sockets project which i program under Visual .NET under Windows XP (bluetooth is supported only fros WinXP SP1 or later).
from the MSDN, i read i have to include the Ws2bth.h and the BluetoothAPIs.h , bt none of them exist on my disk...
i really don't know where it can come from.
does anybody have an idea ?
TOXCCT >>> GEII power
|
|
|
|
|
I would say SERIES 60 SDK 2.1 FOR SYMBIAN OS
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
don't be influenced by my bio.
i am programming on Visual C++ 7 cause the target of my program is Windows...
and you don't answer me. i wrote something i found in the MSDN, so it might exist !
TOXCCT >>> GEII power
|
|
|
|
|
...and more, our project is not fo nokia but for Sony/Ericksson... ;P
TOXCCT >>> GEII power
|
|
|
|
|
So its not windows after all its a symbian OS
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
|
Man dont get angry easy
Try to download the Feb 2003 platform sdk
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
i use the october 2003 one...
TOXCCT >>> GEII power
|
|
|
|
|
Just try to get the latest
i have the feb 2003 and i have the file on my drive
i noticed that you get angry easily
its not good
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
hummm ???
how can it be ?
do you have an idea on why it is not neither on my Oct2003, nor on my Feb2003 MSDN package ?
TOXCCT >>> GEII power
|
|
|
|
|
Did you downloaded it? or installed it from a CD?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
CD...
TOXCCT >>> GEII power
|
|
|
|
|
|
hey, wait a minute, it's a link for updating the Feb2003 Platform SDK !!
i said i had the October2003 one... which is more recent.
well, i suppose you don't know why my includes are not there so...
TOXCCT >>> GEII power
|
|
|
|
|
Man from that link i got the files you need what is it? you dont want help??
i sent you a mail one of the headers you need
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
eheheh, are you getting angry ?!
thank you for you help (and thank you Mr MKHAEL Johnny)
TOXCCT >>> GEII power
|
|
|
|
|
I never get angry just wanted to help and you seemed not concerned
Anyway happy coding
and remember "When all else fails, read the instructions"
[^]
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Help me out!!!
this is troubling me....
------------------------------------------------------------
// confuDlg.h : header file
//
#pragma once
#include "Second.h"
// CconfuDlg dialog
class CconfuDlg : public CDialog
{
// Construction
CSecond second; //instance of CSecond
public:
CconfuDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
enum { IDD = IDD_CONFU_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedButton1();
};
------------------------------------------------------------
#pragma once
//#include "confuDlg.h"
// CSecond dialog
class CSecond : public CDHtmlDialog
{
DECLARE_DYNCREATE(CSecond)
public:
CSecond(CWnd* pParent = NULL); // standard constructor
virtual ~CSecond();
// Overrides
HRESULT OnButtonOK(IHTMLElement *pElement);
HRESULT OnButtonCancel(IHTMLElement *pElement);
// Dialog Data
enum { IDD = IDD_DIALOG2, IDH = IDR_HTML_SECOND };
protected:
CconfuDlg *papa; //pointer of the parent required
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
DECLARE_DHTML_EVENT_MAP()
};
------------------------------------------------------------
I require a pointer of the "CconfuDlg" in "CSecond"...but when i try to build the project, "CconfuDlg" is unknown in CSecond.
If i try to include "confuDlg.h" in "Second.h" ..i get a problem of redifinition
I require a pointer of CconfuDlg in CSecond..how to i work through
plzzz help me out
rakesh
|
|
|
|
|
In Second.h, add the following line before defining your CSecond class:
class CconfuDlg;
And then in confuDlg.h, include the file Second.h.
|
|
|
|
|
in your ConfuDlg.h, try to encapsulate all the code below the #pragma once with the following :
<font style="color:blue;">#if</font> !<font style="color:blue;">defined</font>(__CONFUDLG_H_INCLUDED__)
<font style="color:blue;">#define</font> __CONFUDLG_H_INCLUDED__
<font style="color:green;">
<font style="color:blue;">#endif</font> <font style="color:green;">// __CONFUDLG_H_INCLUDED__</font>
then, try again to include this file in your Second.h
also declare a Class CconfuDlg; before your CSecond class definition
TOXCCT >>> GEII power
|
|
|
|
|
That's what #pragma once does
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
i know, but....
TOXCCT >>> GEII power
|
|
|
|