Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

gdocherty

@gdocherty
About
Posts
8
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Exceptions
    G gdocherty

    I've noticed that 1st exceptions always take a while to be thrown to your program (at least with file ops anyway). Then any following exceptions are thrown immediately. Does anyone know how to make 1st ones throw immediately? Thanks - Gary.

    Visual Basic tutorial question

  • drag and drop
    G gdocherty

    Hi, A better way is to create a temporary transparent window which covers the whole screen. Use GetSystemMetrics(SM_CXSCREEN) and GetSystemMetrics(SM_CYSCREEN) to get the window dims. Use its mouse events to control the drag.

    C / C++ / MFC help tutorial question

  • usb detection
    G gdocherty

    Hi, You can use DirectInput and the EnumDevices method (with visual c++) to tell you how many mouses are connected to the PC. Perhaps in a background program which checks them every now and then.

    IT & Infrastructure question

  • Rect Value AGAIN!!!!!!!
    G gdocherty

    Does dialog1 open dialog2? If it does, try the following: 1. Give dialog2 a member variable - HWND m_hWnd1; 2. Before dialog1 opens dialog2 use - dialog2.m_hWnd1 = m_hWnd; Then use: RECT r; ::GetWindowRect(::GetDlgItem(m_hWnd1, IDC_HOLDER), &r);

    C / C++ / MFC help c++ tutorial question

  • Escape key
    G gdocherty

    Thanks alot! That's worked! - Gary.

    C / C++ / MFC c++

  • Escape key
    G gdocherty

    Hi, I've noticed that the dialog-box programs I write using Visual C++ studio exit when the escape key is pressed. Does anyone know how I can stop this. Thanks - Gary.

    C / C++ / MFC c++

  • Binary Data Manipulation
    G gdocherty

    Sorry, I've corrected some things. int FindBit(BYTE* firstByte, int numBytes){ int pos = 0; int index = 0; BYTE current_bit = 1 << 7; while(index != numBytes){ if((firstByte[index] & current_bit) != 0) break; pos++; current_bit = current_bit >> 1; if(current_bit == 0){ current_bit = 1 << 7; index++; } } return pos; } NOTE: With your example, 00001101 10110101 10110101, this function would return a 4, because the count starts from zero. So if you want the count to start at 1, you'd have to add a 1 to the return value.

    C / C++ / MFC question

  • Binary Data Manipulation
    G gdocherty

    Hi, This would work. int FindBit(BYTE* firstByte, int numBytes){ int pos = 0; int index = 0; BYTE current_bit = 1 << 8; while(index != numBytes){ if((firstByte[index] & current_bit) != 0) break; pos++; current_bit = current_bit >> 1; if(current_bit == 0){ current_bit = 1 << 8; index++; } } return pos; } NOTE: With your example, 00001101 10110101 10110101, this function would return a 4, because the count starts from zero. So if you want the count to start at 1, you'd have to add a 1 to the return value.

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups