Setting the "Class Cursor"

This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C3FF6B.C7507BF0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The documentation for SetCursor() reads, in part:
  If your application must set the cursor while it is in a window, make =
sure the class cursor for the specified window's class is set to NULL. =
If the class cursor is not NULL, the system restores the class cursor =
each time the mouse is moved.=20

How does one set the "class cursor"?

Jason

------=_NextPart_000_0012_01C3FF6B.C7507BF0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>The documentation for SetCursor() =
reads, in=20
part:</FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV>
  <P><FONT face=3DArial size=3D2><EM>If your application must set the =
cursor while=20
  it is in a window, make sure the class cursor for the specified =
window's class=20
  is set to NULL. If the class cursor is not NULL, the system restores =
the class=20
  cursor each time the mouse is moved.</EM> =
</FONT></P></DIV></BLOCKQUOTE>
<P dir=3Dltr><FONT face=3DArial size=3D2>How does one set the "class=20
cursor"?</FONT></P>
<P dir=3Dltr><FONT face=3DArial size=3D2>Jason</FONT></P></BODY></HTML>

------=_NextPart_000_0012_01C3FF6B.C7507BF0--

0
3/1/2004 3:01:26 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
599 Views

Similar Articles

[PageSpeed] 36

Jason,

Note that the prefered way of setting a cursor over a window is to respond
to the WM_SETCURSOR message - OnSetCursor. And, doing it this way , you
won't need to muck about with the class cursor. Just call SetCursor and
forget all about it :-)))

Johan Rosengren
Abstrakt Mekanik AB

"Jason Crew" <jason.crew@crewandassociates.com> a �crit dans le message de
news:euxBS45$DHA.2348@TK2MSFTNGP09.phx.gbl...
The documentation for SetCursor() reads, in part:
  If your application must set the cursor while it is in a window, make sure
the class cursor for the specified window's class is set to NULL. If the
class cursor is not NULL, the system restores the class cursor each time the
mouse is moved.

How does one set the "class cursor"?

Jason


0
2/28/2004 7:57:33 PM
This is a multi-part message in MIME format.

------=_NextPart_000_001A_01C3FF5F.FBE57200
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

When you define your own class structure
WNDCLASSEX wcex;
on of the members is a cursor handle
wcex.hCursor  =3D LoadCursor(NULL, IDC_ARROW);

TECH
http://www.tversoft.com=20
  "Jason Crew" <jason.crew@crewandassociates.com> wrote in message =
news:euxBS45$DHA.2348@TK2MSFTNGP09.phx.gbl...
  The documentation for SetCursor() reads, in part:
    If your application must set the cursor while it is in a window, =
make sure the class cursor for the specified window's class is set to =
NULL. If the class cursor is not NULL, the system restores the class =
cursor each time the mouse is moved.=20

  How does one set the "class cursor"?

  Jason

------=_NextPart_000_001A_01C3FF5F.FBE57200
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>When you define your own class=20
structure</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>WNDCLASSEX wcex;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>on of the members is a cursor =
handle</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>wcex.hCursor&nbsp;&nbsp;=3D =
LoadCursor(NULL,=20
IDC_ARROW);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>TECH</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://www.tversoft.com">http://www.tversoft.com</A> =
</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>"Jason Crew" &lt;<A=20
  =
href=3D"mailto:jason.crew@crewandassociates.com">jason.crew@crewandassoci=
ates.com</A>&gt;=20
  wrote in message <A=20
  =
href=3D"news:euxBS45$DHA.2348@TK2MSFTNGP09.phx.gbl">news:euxBS45$DHA.2348=
@TK2MSFTNGP09.phx.gbl</A>...</DIV>
  <DIV><FONT face=3DArial size=3D2>The documentation for SetCursor() =
reads, in=20
  part:</FONT></DIV>
  <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
    <DIV>
    <P><FONT face=3DArial size=3D2><EM>If your application must set the =
cursor while=20
    it is in a window, make sure the class cursor for the specified =
window's=20
    class is set to NULL. If the class cursor is not NULL, the system =
restores=20
    the class cursor each time the mouse is moved.</EM>=20
  </FONT></P></DIV></BLOCKQUOTE>
  <P dir=3Dltr><FONT face=3DArial size=3D2>How does one set the "class=20
  cursor"?</FONT></P>
  <P dir=3Dltr><FONT face=3DArial =
size=3D2>Jason</FONT></P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_001A_01C3FF5F.FBE57200--

0
tversoft (14)
3/1/2004 3:37:00 PM
This is a multi-part message in MIME format.

------=_NextPart_000_001D_01C3FF75.F69B8670
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks for the quick feedback.  I am using a standard registered windows =
class ("LISTBOX"), so I need to do it at runtime.  In the meantime, I =
think I found a function that seems to do the trick:

    SetClassLong(this->m_hWnd,GCL_HCURSOR,NULL);

Thanks again for the help.
Jason
  "TECH" <tversoft@tversoft.com> wrote in message =
news:%23aSzCM6$DHA.2480@TK2MSFTNGP12.phx.gbl...
  When you define your own class structure
  WNDCLASSEX wcex;
  on of the members is a cursor handle
  wcex.hCursor  =3D LoadCursor(NULL, IDC_ARROW);

  TECH
  http://www.tversoft.com=20
    "Jason Crew" <jason.crew@crewandassociates.com> wrote in message =
news:euxBS45$DHA.2348@TK2MSFTNGP09.phx.gbl...
    The documentation for SetCursor() reads, in part:
      If your application must set the cursor while it is in a window, =
make sure the class cursor for the specified window's class is set to =
NULL. If the class cursor is not NULL, the system restores the class =
cursor each time the mouse is moved.=20

    How does one set the "class cursor"?

    Jason

------=_NextPart_000_001D_01C3FF75.F69B8670
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Thanks for the quick feedback.&nbsp; I =
am using a=20
standard registered windows class ("LISTBOX"), so I need to do it at=20
runtime.&nbsp; In the meantime, I think I found a function that seems to =
do the=20
trick:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT size=3D2>&nbsp;&nbsp;&nbsp; =
SetClassLong(</FONT><FONT=20
color=3D#0000ff size=3D2>this</FONT><FONT=20
size=3D2>-&gt;m_hWnd,GCL_HCURSOR,NULL);</FONT></FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><FONT face=3DArial>Thanks again for the=20
help.</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial>Jason</FONT></DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>"TECH" &lt;<A=20
  href=3D"mailto:tversoft@tversoft.com">tversoft@tversoft.com</A>&gt; =
wrote in=20
  message <A=20
  =
href=3D"news:%23aSzCM6$DHA.2480@TK2MSFTNGP12.phx.gbl">news:%23aSzCM6$DHA.=
2480@TK2MSFTNGP12.phx.gbl</A>...</DIV>
  <DIV><FONT face=3DArial size=3D2>When you define your own class=20
  structure</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>WNDCLASSEX wcex;</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>on of the members is a cursor =
handle</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>wcex.hCursor&nbsp;&nbsp;=3D =
LoadCursor(NULL,=20
  IDC_ARROW);</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>TECH</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2><A=20
  href=3D"http://www.tversoft.com">http://www.tversoft.com</A> =
</FONT></DIV>
  <BLOCKQUOTE dir=3Dltr=20
  style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    <DIV>"Jason Crew" &lt;<A=20
    =
href=3D"mailto:jason.crew@crewandassociates.com">jason.crew@crewandassoci=
ates.com</A>&gt;=20
    wrote in message <A=20
    =
href=3D"news:euxBS45$DHA.2348@TK2MSFTNGP09.phx.gbl">news:euxBS45$DHA.2348=
@TK2MSFTNGP09.phx.gbl</A>...</DIV>
    <DIV><FONT face=3DArial size=3D2>The documentation for SetCursor() =
reads, in=20
    part:</FONT></DIV>
    <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
      <DIV>
      <P><FONT face=3DArial size=3D2><EM>If your application must set =
the cursor=20
      while it is in a window, make sure the class cursor for the =
specified=20
      window's class is set to NULL. If the class cursor is not NULL, =
the system=20
      restores the class cursor each time the mouse is moved.</EM>=20
      </FONT></P></DIV></BLOCKQUOTE>
    <P dir=3Dltr><FONT face=3DArial size=3D2>How does one set the "class =

    cursor"?</FONT></P>
    <P dir=3Dltr><FONT face=3DArial=20
size=3D2>Jason</FONT></P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_001D_01C3FF75.F69B8670--

0
3/1/2004 4:14:21 PM
Reply:

Similar Artilces:

Setting the "Class Cursor"
This is a multi-part message in MIME format. ------=_NextPart_000_0012_01C3FF6B.C7507BF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The documentation for SetCursor() reads, in part: If your application must set the cursor while it is in a window, make = sure the class cursor for the specified window's class is set to NULL. = If the class cursor is not NULL, the system restores the class cursor = each time the mouse is moved.=20 How does one set the "class cursor"? Jason ------=_NextPart_000_0012_01C3FF6B.C7507BF0 C...