Hey peeps, I have a problem with Win32 and Steam friends...
Now I want to get the steam friends from the STEAM_API.dll and make a AppendMenu underneath "hFriendsButton" no matter how many it is. But to make a button underneath this you need to have a AppendMenu function for each friend, but if you have like a 20-30 person clan, I have to put in that many AppendMenus. So is there a way to this as efficient as possible?
The name displayed on the button should be the name of the friend(use number from 1 to 5 or something).
The Source Code: -
-
HMENU hMainMenu = CreateMenu();
-
HMENU hFile = CreateMenu();
-
HMENU hView = CreateMenu();
-
HMENU hGameButton = CreateMenu();
-
HMENU hFriendsbutton = CreateMenu();
-
HMENU hMapButton = CreateMenu();
-
HMENU hSettings = CreateMenu();
-
HMENU hHelp = CreateMenu();
-
-
AppendMenuA(hMainMenu, MF_POPUP, (UINT_PTR)hFile, "File");
-
AppendMenuA(hMainMenu, MF_POPUP, (UINT_PTR)hView, "View");
-
AppendMenuA(hMainMenu, MF_POPUP, (UINT_PTR)hGameButton, "Game");
-
AppendMenuA(hMainMenu, MF_POPUP, (UINT_PTR)hMapButton, "Map");
-
AppendMenuA(hMainMenu, MF_POPUP, UINT_PTR)hFriendsbutton, "Friends");
-
AppendMenuA(hMainMenu, MF_POPUP, (UINT_PTR)hSettings, "Settings");
-
AppendMenuA(hMainMenu, MF_POPUP, (UINT_PTR)hHelp, "Help");
-
-
AppendMenu(hFile, MF_STRING, (UINT_PTR)hFile, "Exit");
-
AppendMenu(hView, MF_STRING, (UINT_PTR)hView, "Will Come SOON!");
-
AppendMenu(hGameButton, MF_STRING, (UINT_PTR)hGameButton, "Dayz Mod");
-
AppendMenu(hGameButton, MF_STRING, (UINT_PTR)hGameButton, "Dayz Standalone");
-
AppendMenu(hMapButton, MF_STRING, (UINT_PTR)hMapButton, "Chernarus");
-
AppendMenu(hMapButton, MF_STRING, (UINT_PTR)hMapButton, "Chernarus+");
-
AppendMenu(hFriendsbutton, MF_STRING, (UINT_PTR)hMapButton, "friend: " + friends);
-
AppendMenu(hSettings, MF_STRING, (UINT_PTR)hSettings, "Will Come SOON!");
-
AppendMenu(hHelp, MF_STRING, (UINT_PTR)hHelp, "Will Come SOON!");
-
-
SetMenu(hwnd, hMainMenu);
0 1010 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bruce Davis |
last post by:
I'm having a problem on windows (both 2000 and XP) with a multi-threaded
tkinter gui application. The problem appears to be a deadlock condition
when a child thread pops up a
Pmw dialog window in...
|
by: Kostatus |
last post by:
I have a virtual function in a base class, which is then overwritten by a
function of the same name in a publically derived class. When I call the
function using a pointer to the derived class...
|
by: Refky Wahib |
last post by:
Hi
I need Technical Support
I finished a Great project using .Net and SQL Server and .Net Mobile
Control
My Business case is to implement this Program to accept about 1
Million concurrent...
|
by: Sudesh Sawant |
last post by:
Hello,
We have an application which communicates using remoting. There is a server
which is a Windows Service. The server exposes an object which is a
singleton. The client is a Web Application...
|
by: Peter Olcott |
last post by:
www.halting-problem.com
|
by: Jon Slaughter |
last post by:
I'm having a little trouble understanding what the slicing problem is.
In B.S.'s C++ PL3rdEd he says
"Becayse the Employee copy functions do not know anything about Managers,
only the Employee...
|
by: James Griffiths |
last post by:
Here is a report I've written about a printing problem that is being
experienced by a particular company for whom I had developed a A97 system.
After upgrading to Win XP and AXP, some printing...
|
by: Ian Stanley |
last post by:
Hi,
Continuing my strcat segmentation fault posting-
I have a problem which occurs when appending two sting literals using
strcat.
I have tried to fix it by writing my own function that does the...
|
by: Mike Collins |
last post by:
I cannot get the correct drop down list value from a drop down I have on my
web form. I get the initial value that was loaded in the list.
It was asked by someone else what the autopostback was...
|
by: Spacetech |
last post by:
Im trying to make it so I can read something out of a file and get it
into a string so I can see if It matches what IM looking for.
Here is what I got:
HANDLE hFile;
DWORD wmWritten;
char...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |