windows-api-utils 0.2.0

Windows API utilities for coordinate conversion, bit operations, and message parameter handling with feature gating
Documentation
//! Full feature demo
//! Run with: cargo run --example full_demo --features full

#![cfg(all(feature = "coordinates", feature = "bit-ops", feature = "messages"))]

use windows_api_utils::prelude::*;

fn main() {
    println!("=== Full Features Demo ===");

    // Coordinates
    let window = Window::new(0x12345, Rect::new(100, 100, 800, 600), Default::default());
    let client_point = Point::new(50, 75);

    if let Ok(screen_point) = window.client_to_screen(client_point) {
        println!(
            "Coordinate conversion: {} -> {}",
            client_point, screen_point
        );
    }

    // Bit operations
    let value = 0x12345678;
    println!(
        "Bit ops: 0x{:08X} -> LOWORD=0x{:04X}, HIWORD=0x{:04X}",
        value,
        loword(value),
        hiword(value)
    );

    // Messages
    let msg = WindowMessage::mouse_move(100, 150, KeyModifiers::default());
    if let Some(mouse_event) = MessageParser::parse_mouse_message(msg) {
        println!(
            "Message parsing: mouse at ({}, {})",
            mouse_event.x, mouse_event.y
        );
    }

    println!("All features working together!");
}