Click here to Skip to main content
14,766,373 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello everyone!

I would like to start by saying thanks to everyone who takes some time to view this thread and try to help.

I have main window with a child static control.

Static control sends notification message when user clicks on it, which activates drop down menu.

Menu should appear right below static control. This is where I got stuck.

I work in MS Visual Studio Express 2008, on Windows XP, in C++, using WIN32 API.

If any other information is required ( source code or something similar ), please ask for it, I will more than gladly supply it.
Sergey Alexandrovich Kryukov 13-May-13 22:04pm
You also need to specify UI library you are using.
MyOldAccount 14-May-13 17:15pm
Sorry for replying this late, but I have a lot of work to do, and it simply overwhelms me.

I don't understand the question, so let me try to clarify my post:

I have a static control that sends notification when single clicked.
At that point, a menu should appear just below static control's frame.
I've been experimenting myself, and I think Richard was right.
I am currently struggling with x and y positions, but hopefully I will manage it.
I hope this reply cleared things for you.
If not, please elaborate your question, and I will answer as soon as possible.
It's good to "see" you again.Thank you for finding time to help me.
I appreciate it.

Sergey Alexandrovich Kryukov 14-May-13 17:36pm
How cannot you understand the question about library? How do you write the UI?
MyOldAccount 14-May-13 17:44pm
You mean on comctl32 ?

I am in a mess, working all day ( not just programming, unfortunately) ...

Anyway, I have made progress with Richard's suggestion.
I have learned, and successfully created popup menu, and inserted items, by reading Petzold's book " Programming Windows 5th edition ".
All I needed to do is pick proper coordinates, as Richard suggested.
Works fine so far...
Still I am open for other suggestions.
Sergey Alexandrovich Kryukov 14-May-13 18:20pm
I don't know what do you do. Are you programming in pure Windows API, not MFC, WTL, ATL or something? If you use some library to build the UI, you should mention whatever is relevant to the question...
MyOldAccount 14-May-13 18:24pm
It is pure WIN32 API.
I wrote it in my post:
MS Visual C++ 2008 Express Edition and WIN32 API ( yes, it is pure WIN32 API ).
I am sorry for the confusion I have made.
Richard MacCutchan 14-May-13 3:37am
You have not explained how you create the drop down, or how you decide where to display it. If you are using a popup menu then you just need to provide the correct x,y co-ordinates of the static control when you display it.
MyOldAccount 14-May-13 17:18pm
Sorry for replying this late, but as I've said above, I have a lot of work to do, and it simply overwhelms me.

I believe your suggestion is the way to go.
Sorry for clumsy formulation of the question, please credit that to inexperience.
I want to thank you, as well, for helping me.
Richard MacCutchan 14-May-13 17:49pm
No need to apologise, we have all had times like that. I do wonder, however, whether you are approaching your problem in the right way. I don't know exactly what you are trying to create, but it does seem that you are tying yourself to a large amount of customisation, which adds to the complexity of your application. Sometimes it is better to start with a standard type of window, and focus on the business part of the application. You can then do the changes to the UI in future without the necessity to change the business parts.
MyOldAccount 14-May-13 18:03pm
Well, my entire main window is designed to be " full blown GUI " with " bling " and " sparkles".

I guess it wasn't the most prudent thing to do, but this is my first job, and my client puts a lot of accent on GUI, so I figured to build GUI first, and program stuff later...

1 solution

I did it!

Thanks to Richard MacCutchan's comment, I have managed to implement it!

Everything works fine, I just had to adjust x and y coordinates!

Thanks ALOT Rich!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900