going to kill my program.

Discussion in 'OT Technology' started by crotchfruit, Jun 27, 2003.

  1. crotchfruit

    crotchfruit Guest

    ok, here is a snippet of code from an activex control i'm making (inside ::OnDraw member function):

    int moo = EnableWindow(TRUE);
    int boo = EnableWindow(TRUE);
    if (!IsWindowEnabled())
    	char buffer[1203];
    	int foo = IsWindowEnabled();
    	sprintf(buffer, "enab = %d [%d, %d]", foo, moo, boo);
    	flag = 8;
    ya, it's ugly.. just because i'm trying to debug this crap. here is what the outputdebugstring prints:

    enab = 0 [0, 0]

    WHAT THE HELL IS GOING ON. i call enablewindow twice with true before the IsWindowEnabled and it's still returning 0 (disabled). also, both EnableWindows are returning 0 which means that the control was previously enabled (as per the msdn page.)

    makes no sense. am going to die.

Share This Page