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. Visual Basic
  4. Making VC++ 6 DLL to work on VB6 App with no UNICODE issue

Making VC++ 6 DLL to work on VB6 App with no UNICODE issue

Scheduled Pinned Locked Moved Visual Basic
helpc++winformsannouncement
3 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.
  • W Offline
    W Offline
    whiteboat
    wrote on last edited by
    #1

    Currently I am working on an old VB6 app to be compatible with UNICODE.

    This app has SSTab and within this tab, there are user control q1, q2, q3 and so on. For q1, it has the following code:

    Private WithEvents q1 As VBControlExtender
    Private progID As String

    procId = “ALCTX10.CTX10.1”
    Set q1 = Controls.Add(procId, “q1”)
    myTab.tab = 1
    q1.Move borderSize, topMargin, myTab.Width - borderSize * 2, _
    myTab.Height - borderSize - topMargin
    q1.Visible = True

    The procId is referring to VC++ 6 DLL. All user controls are using this DLL.
    For VC++ 6 DLL, I added ",_UNICODE, UNICODE" into the preprocessor definitions under the project setting of VC++ 6.
    And compiled the DLL again and then brought it back to VB6.

    The problem is I am still getting the same UNICODE issue from VB6 app.
    I am using a foreign version of Windows XP so it is not the font problem.
    I can’t just replace this DLL with UNICODE supported TextBox or RichTextBox since there are too many things going underneath the DLL.

    I would appreciate very much if anyone sheds a light on this problem. Thanks.

    V 1 Reply Last reply
    0
    • W whiteboat

      Currently I am working on an old VB6 app to be compatible with UNICODE.

      This app has SSTab and within this tab, there are user control q1, q2, q3 and so on. For q1, it has the following code:

      Private WithEvents q1 As VBControlExtender
      Private progID As String

      procId = “ALCTX10.CTX10.1”
      Set q1 = Controls.Add(procId, “q1”)
      myTab.tab = 1
      q1.Move borderSize, topMargin, myTab.Width - borderSize * 2, _
      myTab.Height - borderSize - topMargin
      q1.Visible = True

      The procId is referring to VC++ 6 DLL. All user controls are using this DLL.
      For VC++ 6 DLL, I added ",_UNICODE, UNICODE" into the preprocessor definitions under the project setting of VC++ 6.
      And compiled the DLL again and then brought it back to VB6.

      The problem is I am still getting the same UNICODE issue from VB6 app.
      I am using a foreign version of Windows XP so it is not the font problem.
      I can’t just replace this DLL with UNICODE supported TextBox or RichTextBox since there are too many things going underneath the DLL.

      I would appreciate very much if anyone sheds a light on this problem. Thanks.

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      You have atready asked it in VC++/MFC forum.

      W 1 Reply Last reply
      0
      • V Victor Nijegorodov

        You have atready asked it in VC++/MFC forum.

        W Offline
        W Offline
        whiteboat
        wrote on last edited by
        #3

        Yes. But I posted it here also since the main app is VB6 even though the DLL is VC++ 6.

        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