•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 423,490 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,710 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 562 | Replies: 12
![]() |
•
•
Join Date: Jun 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
I've taken C++ courses before but never programmed any GUI applications. Well for this job I was asked to program a GUI for a solar hybrid project that displays information such as battery charge, temperature, etc...sort of like the thing you see in a Prius.
Can anyone give any recommendations on how to tackle this task? The easiest way... I've downloaded Microsoft Visual C++ Express Edition. I want a whole bunch of displays that shows the informations in real time and maybe (optional) include some sort of a bar graph to make it look better.
How hard would that be?
Thanks.
Can anyone give any recommendations on how to tackle this task? The easiest way... I've downloaded Microsoft Visual C++ Express Edition. I want a whole bunch of displays that shows the informations in real time and maybe (optional) include some sort of a bar graph to make it look better.
How hard would that be?
Thanks.
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,123
Reputation:
Rep Power: 38
Solved Threads: 929
>>How hard would that be?
It may take anywhere from a couple days (for experienced programmers) to about a lifetime for beginners. For your compiler you might also want to download free wxWindows. Or if you want to use pure win32 api functions here's a tutorial.
It may take anywhere from a couple days (for experienced programmers) to about a lifetime for beginners. For your compiler you might also want to download free wxWindows. Or if you want to use pure win32 api functions here's a tutorial.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Oct 2006
Location: the Netherlands
Posts: 1,776
Reputation:
Rep Power: 11
Solved Threads: 185
I could be wrong, but to make a graphbar without using additional toolkits (like wxWidgets etc), you would need Visual Studio standard or pro, which aren't free.
But you can try the pro-version here (90 day-trial)
But you can try the pro-version here (90 day-trial)
Want better/more replies to your questions? Wrap your code in [code] [/code] tags!
do NOT pm me for help, in the best case, you'll get ignored
do NOT pm me for help, in the best case, you'll get ignored
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,123
Reputation:
Rep Power: 38
Solved Threads: 929
•
•
•
•
I could be wrong, but to make a graphbar without using additional toolkits (like wxWidgets etc), you would need Visual Studio standard or pro, which aren't free.
But you can try the pro-version here (90 day-trial)
You are wrong. The Express edition can be used to write windows GUI using win32 api functions. You need the Standard or better $$$ editions to get MFC and the resource editor. I think there are also free resource editors on the net.
Last edited by Ancient Dragon : Jun 17th, 2008 at 11:00 am.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Jun 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
I just tried to copy and paste this code:
#include <windows.h>
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Welcome to Win32 Application Development\n", NULL, NULL);
return 0;
}
from a tutorial and run it in Visual C++ Express, and it gave me this message
" error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"
Why is that? I mean, it's going to make learning a lot harder for a beginner if I can't even run a tutorial code due to some mysterious reason that's way over my head now.
#include <windows.h>
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Welcome to Win32 Application Development\n", NULL, NULL);
return 0;
}
from a tutorial and run it in Visual C++ Express, and it gave me this message
" error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"
Why is that? I mean, it's going to make learning a lot harder for a beginner if I can't even run a tutorial code due to some mysterious reason that's way over my head now.
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,123
Reputation:
Rep Power: 38
Solved Threads: 929
You are compiling your program for UNICODE. Turn that feature off. Go to menu Properties --> Project (at the bottom of the menu). Expand Configuration Properties, then click General.
1) Change the Configuration: at the top of the window to All Configurations
2) In the right pain near the bottom you will see Character Set. Select Not Set from the combo box.
1) Change the Configuration: at the top of the window to All Configurations
2) In the right pain near the bottom you will see Character Set. Select Not Set from the combo box.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: May 2008
Location: Infinite Castle, below Beltline
Posts: 287
Reputation:
Rep Power: 1
Solved Threads: 24
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,123
Reputation:
Rep Power: 38
Solved Threads: 929
>>MessageBox( NULL, TEXT("Welcome", NULL, NULL ) ;
You have a typo. There should be a closing parenthese ) after the word Welcome. like this:
You have a typo. There should be a closing parenthese ) after the word Welcome. like this:
MessageBox( NULL, TEXT("Welcome"), NULL, NULL ) ; I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: May 2008
Location: Infinite Castle, below Beltline
Posts: 287
Reputation:
Rep Power: 1
Solved Threads: 24
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,123
Reputation:
Rep Power: 38
Solved Threads: 929
>>You are not blaming me for anything else. Does that mean I am right?.
No, it just means that line had a typ. To check if you are right or wrong you have to compile and run the program.
>>ill I registered in this forum the only world I knew was Turbo C.
Great move
I'm sure you won't regret the move.
No, it just means that line had a typ. To check if you are right or wrong you have to compile and run the program.
>>ill I registered in this forum the only world I knew was Turbo C.
Great move
I'm sure you won't regret the move. I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- GUI program that stores information of a friend(name,surname,age,favourite artist)in (Java)
- Stuck in GUI (Python)
- GUI Suggestions (C++)
- TURN THIS ASSIGNMENT UserID INTO GUI, CAN YOU HELP ME (Python)
- Small ATM banking program (C++)
- Help with a reservation program! GUI Messed XD (Java)
- How can I have my program wait for input before continuing? (Java)
- GUI advice (C++)
- help with program to convert integers to roman numerals (Java)
Other Threads in the C++ Forum
- Previous Thread: Best way to do this..?
- Next Thread: Creating a Dynamic Library



Linear Mode