最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

C++ MFC - Open edit window at specific position - Stack Overflow

matteradmin7PV0评论

I have an application where, on a specific event, I want to open a edit control at a specific position x,y with a specific size width,height. In the opened window, I want the user to enter a string and confirm with the enter-button.

I'm absolutely new to MFC, so I have very little knowledge on how this could be possible. What I tried so far is sth. like this:

// given: long x, y, width, height;
POINT p;
p.x = x;
p.y = y;
auto* edit = new CEdit();
edit->SetCaretPos(p);

However, I have no clue on how to display the new field, how to set its' size and how to capture the event of user input. Can you help me out with some ideas at least on how I could start?

Post a comment

comment list (0)

  1. No comments so far