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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. question about comparison of DWORD; WPARAM

question about comparison of DWORD; WPARAM

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++data-structureshelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 1343677
    wrote on last edited by
    #1

    with the help of a c++ 6 control i get hotkey information in the form of a DWORD (it may be f.e. ctrl+s) DWORD CHotKeyCtrl.GetHotKey(); how to extract information so that this DWORD is comparable to a WPARAM in the message queue, if a key is pressed i get a WPARAM with information in it about the key being pressed I just want to know how to compare the dword to the wparam (HIWORD? LOWORD? <- i am a prog-n00b plz easy language)

    A 1 Reply Last reply
    0
    • U User 1343677

      with the help of a c++ 6 control i get hotkey information in the form of a DWORD (it may be f.e. ctrl+s) DWORD CHotKeyCtrl.GetHotKey(); how to extract information so that this DWORD is comparable to a WPARAM in the message queue, if a key is pressed i get a WPARAM with information in it about the key being pressed I just want to know how to compare the dword to the wparam (HIWORD? LOWORD? <- i am a prog-n00b plz easy language)

      A Offline
      A Offline
      Andrzej Markowski
      wrote on last edited by
      #2

      To extract information from the return value of CHotKeyCtrl.GetHotKey() use HIWORD and LOWORD macros. wVirtualKeyCode=LOWORD(GetHotKey()); wModifiers=HIWORD(GetHotKey()); To create WPARAM use MAKEWPARAM macro: MAKEWPARAM(wVirtualKeyCode,wModifiers) To compare DWORD to WPARAM use: if(wParam==(WPARAM)dwValue) Regards, Andrzej Markowski

      My Latest ArticlesCCustomBitmapButton: An owner-draw button and a frame for the caption bar, in one class. CCustomTabCtrl: A clone of the Excel tab sheet control.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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