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. Rich Edit: select all

Rich Edit: select all

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structureshelptutorial
5 Posts 3 Posters 1 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.
  • H Offline
    H Offline
    halblonious
    wrote on last edited by
    #1

    Can anyone tell me how to access/override/hook a rich edit control's select all (Ctrl + a). It throws up an error when trying to make any change to the selection or even select all a second time if there's more than one character for text. For some reason, if there's only one character, then it works just dandy. It says there's an assertion error in "array_d.cpp" and so I assume it's doing something that doesn't mesh with my method of serializing the data (into DWordArrays). So, if anyone knows exactly what it IS doing (like what messages it's sending where, and how to get at them), that'd be great. halblonious

    M 1 Reply Last reply
    0
    • H halblonious

      Can anyone tell me how to access/override/hook a rich edit control's select all (Ctrl + a). It throws up an error when trying to make any change to the selection or even select all a second time if there's more than one character for text. For some reason, if there's only one character, then it works just dandy. It says there's an assertion error in "array_d.cpp" and so I assume it's doing something that doesn't mesh with my method of serializing the data (into DWordArrays). So, if anyone knows exactly what it IS doing (like what messages it's sending where, and how to get at them), that'd be great. halblonious

      M Offline
      M Offline
      Mumiozol
      wrote on last edited by
      #2

      I have no idea about your problems but I wait for ON_WM_KEYDOWN() That's how I'm doing something on paste operation CTLT+V : void MyEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { if ( (nChar == 0x56) )//VK_V { if ( GetKeyState(VK_CONTROL) & 0xff00 ) {//do something} } } Mickey :)

      J H 2 Replies Last reply
      0
      • M Mumiozol

        I have no idea about your problems but I wait for ON_WM_KEYDOWN() That's how I'm doing something on paste operation CTLT+V : void MyEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { if ( (nChar == 0x56) )//VK_V { if ( GetKeyState(VK_CONTROL) & 0xff00 ) {//do something} } } Mickey :)

        J Offline
        J Offline
        jhwurmbach
        wrote on last edited by
        #3

        Wouldn't be handling WM_PASTE (WM_COPY, WM_CUT, WM_CLEAR) better? :)


        Who is 'General Failure'? And why is he reading my harddisk?!?

        M 1 Reply Last reply
        0
        • J jhwurmbach

          Wouldn't be handling WM_PASTE (WM_COPY, WM_CUT, WM_CLEAR) better? :)


          Who is 'General Failure'? And why is he reading my harddisk?!?

          M Offline
          M Offline
          Mumiozol
          wrote on last edited by
          #4

          That was only an example. AFAIK there's no special messages for CRTL+A or other non standard combinations. I must also say I didn't know messages you mentioned :) Mickey :)

          1 Reply Last reply
          0
          • M Mumiozol

            I have no idea about your problems but I wait for ON_WM_KEYDOWN() That's how I'm doing something on paste operation CTLT+V : void MyEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { if ( (nChar == 0x56) )//VK_V { if ( GetKeyState(VK_CONTROL) & 0xff00 ) {//do something} } } Mickey :)

            H Offline
            H Offline
            halblonious
            wrote on last edited by
            #5

            Thanks for the reply, and I may have to resort to that, but I'm trying not to have to subclass the rich edit if I can help it. There must be some other way, I'm hoping. halblonious

            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