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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

amarg

@amarg
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Multi-threading
    A amarg

    I finally solved the problem by using the following approach: In the cpp file of the child window B I declared a global object of type "window A". Then in the InitDialog member function of window B I called the GetParent function and I copied its return to the global object of type "window A". In the next step I used this global object from my thread function and it worked !! I also noticed that the GetParent function it works if it is called from the thread function but only the MFC based procedures of the parent window are accessible - in this way I managed to disable a button of the parent window A from the thread function of the child window B. However if the parent window A has additional member functions (non MFC based)they are not accessible in this way - but they are, if we use the method of the global object described above. Thanks all of you for your response Athanasios Margaris University of Macedonia Dept. of Applied Informatics Thessaloniki Greece Web Site : http://www.neural.uom.gr (most in Greek) :)

    C / C++ / MFC help question announcement

  • Multi-threading
    A amarg

    I open a window A and from this, another window B for which the window A is the parent window. In window B there is a button with a label "Start" that starts the execution of the thread "Train". This thread must get data from the parent window and perform some calculations, and finally, update some controls in window A. I use AfxBeginThread (Train, this) from B window and inside the thread function I get a pointer to the parent window by means of GetParent function. However this does not work. Can anyone help me?:confused:

    C / C++ / MFC help question announcement
  • Login

  • Don't have an account? Register

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