Click here to Skip to main content
15,917,456 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I use and compile my project that contain 16 bit API? Pin
Behzad Ebrahimi13-Jun-04 4:26
Behzad Ebrahimi13-Jun-04 4:26 
AnswerRe: How can I use and compile my project that contain 16 bit API? Pin
John R. Shaw13-Jun-04 11:04
John R. Shaw13-Jun-04 11:04 
Generalmfc: load a cursor resource Pin
kfaday13-Jun-04 4:19
kfaday13-Jun-04 4:19 
GeneralRe: mfc: load a cursor resource Pin
Dominik Reichl13-Jun-04 5:04
Dominik Reichl13-Jun-04 5:04 
GeneralRe: mfc: load a cursor resource Pin
kfaday13-Jun-04 5:24
kfaday13-Jun-04 5:24 
GeneralRe: mfc: load a cursor resource Pin
Dominik Reichl13-Jun-04 5:59
Dominik Reichl13-Jun-04 5:59 
GeneralRe: mfc: load a cursor resource Pin
kfaday13-Jun-04 7:08
kfaday13-Jun-04 7:08 
GeneralRe: mfc: load a cursor resource Pin
Johan Rosengren13-Jun-04 9:55
Johan Rosengren13-Jun-04 9:55 
kfaday wrote:
hCursor = LoadCursor(hinst, MAKEINTRESOURCE(IDC_LAPIZ_CUR));

Ouch. You are not initializing hinst to the application instance handle.
Rewrite to:

hCursor = LoadCursor(AfxGetResourceHandle(), MAKEINTRESOURCE(IDC_LAPIZ_CUR));


kfaday wrote:
BOOL CVentanaPizarra::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) 
{
  if (changecursor==true)
  {
    SetCursor(hCursor);     
  }

  return   CDialog::OnSetCursor(pWnd, nHitTest, message);
}


what am i doing wrong?

You are calling the base class implementation in OnSetCursor. Rewrite to:

BOOL CVentanaPizarra::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) 
{
  BOOL result = TRUE;
  if (changecursor==true)
  {
    if( SetCursor(hCursor) )
      result = TRUE;
  }
  else
    result = CDialog::OnSetCursor(pWnd, nHitTest, message);

  return result;
}

GeneralRe: mfc: load a cursor resource Pin
kfaday13-Jun-04 10:29
kfaday13-Jun-04 10:29 
GeneralRe: mfc: load a cursor resource Pin
Johan Rosengren13-Jun-04 19:46
Johan Rosengren13-Jun-04 19:46 
QuestionDebug Assertion Failed, what the f****???? Pin
Anonymous13-Jun-04 3:43
Anonymous13-Jun-04 3:43 
AnswerRe: Debug Assertion Failed, what the f****???? Pin
valikac13-Jun-04 5:53
valikac13-Jun-04 5:53 
GeneralRe: Debug Assertion Failed, what the f****???? Pin
Anonymous13-Jun-04 6:54
Anonymous13-Jun-04 6:54 
GeneralRe: Debug Assertion Failed, what the f****???? Pin
Tim Smith13-Jun-04 9:58
Tim Smith13-Jun-04 9:58 
GeneralRe: Debug Assertion Failed, what the f****???? Pin
Johan Rosengren13-Jun-04 10:00
Johan Rosengren13-Jun-04 10:00 
AnswerRe: Debug Assertion Failed, what the f****???? Pin
John R. Shaw13-Jun-04 11:16
John R. Shaw13-Jun-04 11:16 
AnswerRe: Debug Assertion Failed, what the f****???? Pin
Michael Dunn13-Jun-04 20:58
sitebuilderMichael Dunn13-Jun-04 20:58 
GeneralActivex controls (i'm getting nuts) Pin
Nitro_gen13-Jun-04 3:41
Nitro_gen13-Jun-04 3:41 
GeneralRe: Activex controls (i'm getting nuts) Pin
GermanGeorge14-Jun-04 0:32
GermanGeorge14-Jun-04 0:32 
GeneralRe: Activex controls (i'm getting nuts) Pin
Nitro_gen14-Jun-04 0:55
Nitro_gen14-Jun-04 0:55 
GeneralChat bots Pin
jimmydown13-Jun-04 3:12
jimmydown13-Jun-04 3:12 
GeneralRe: Chat bots Pin
toxcct13-Jun-04 3:29
toxcct13-Jun-04 3:29 
GeneralRe: Chat bots Pin
gamitech13-Jun-04 9:54
gamitech13-Jun-04 9:54 
Generalchat bot Pin
bikram singh13-Jun-04 20:05
bikram singh13-Jun-04 20:05 
Questionhow to add property page to a dialog box. Pin
aarti vimal13-Jun-04 2:57
aarti vimal13-Jun-04 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.