windows-api-utils 0.2.0

Windows API utilities for coordinate conversion, bit operations, and message parameter handling with feature gating
Documentation
//! Demo for bit-ops feature  
//! Run with: cargo run --example bit_ops_demo --features bit-ops

#![cfg(feature = "bit-ops")]

use windows_api_utils::prelude::*;

fn main() {
    println!("=== Bit Operations Feature Demo ===");

    let value = 0x12345678;
    println!("Value: 0x{:08X}", value);
    println!("LOWORD: 0x{:04X}", loword(value));
    println!("HIWORD: 0x{:04X}", hiword(value));

    let lhw = LowHighWord::new(value);
    println!("LowHighWord: {}", lhw);

    // Coordinate extraction (signed)
    let coord_value = 0xFF38FF9C;
    let x = LowHighWord::new(coord_value).loword_signed();
    let y = LowHighWord::new(coord_value).hiword_signed();
    println!("Coordinates: x={}, y={}", x, y);

    // Bit manipulation
    let test_value = 0b1010_1100;
    println!("Bit operations on 0b{:08b}:", test_value);
    println!("  Bit 3 set: {}", BitUtils::is_bit_set(test_value, 3));
    println!("  Set bit 0: 0b{:08b}", BitUtils::set_bit(test_value, 0));
}