15,884,047 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Baderd94 (Top 11 by date)
Baderd94
21-Aug-18 8:59am
View
Sorry I improved the question, It was not clear as I said add an icon to a dialog instead of a button in aq dialog.
Baderd94
21-Aug-18 8:59am
View
Sorry I improved the question, It was not clear as I said add an icon to a dialog instead of a button in aq dialog.
Baderd94
21-Aug-18 8:42am
View
Deleted
Hi, thank you for your reply. this code for setting an icon to a dialog not a button
Baderd94
2-Aug-18 14:12pm
View
I have the following code
for (int q =0; q< 19; q++)
{
SavePowerData[q] = TotalVoltage5s;
SaveTimeData[q] = TotalTime;
}
To store the data, then i have another function called onsavedata, in side this function i put the following
CString str10;
CFileDialog FileDlg10(FALSE," ","Power Log Data.txt",OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT , "TXT File(*.txt)|*.txt|All(*.*)|*.*|");
if(FileDlg10.DoModal()==IDOK)
{
ofstream ofs(FileDlg10.GetPathName());
ofs.write(str10,str10.GetLength());
ofs.close();
AfxMessageBox("Saved!");
}
else
{
AfxMessageBox("Failed to Save!");
}
ofstream PowerData(FileDlg10.GetPathName(), ios::out);
PowerData<<SavePowerData<<endl;
PowerData.close();
Baderd94
2-Aug-18 13:54pm
View
that is what i tried to do,
for (int q =0; q< 19; q++)
{
SavePowerData[q] = TotalVoltage5s;
}
but when i display the data, it gives no results so empty file, where SavePowerData is a global variable
Baderd94
1-Aug-18 11:43am
View
Thank you so Much, it Worked and that is what i did
// TODO: Add your command handler code here
CString str1;
CFileDialog FileDlg1(FALSE," ","ch1.txt",OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT , "TXT File(*.txt)|*.txt|All(*.*)|*.*|");
if(FileDlg1.DoModal()==IDOK)
{
ofstream ofs(FileDlg1.GetPathName());
ofs.write(str1,str1.GetLength());
ofs.close();
AfxMessageBox("CH1 Data Saved!");
}
ofstream Data_ch1(FileDlg1.GetPathName(), ios::out);
Baderd94
13-Jul-18 17:34pm
View
It worked thank you a lot
Baderd94
8-Jul-18 11:34am
View
Thank you soo much your method worked perfectly, The problem was the function that i needed to put the code in.
Baderd94
7-Jul-18 23:44pm
View
Thank you for your quick reply
i have changed it as you mentioned and it made sense to me tbh but it still does not work, it gives uncolored now, any idea because i feel im to close to getting the right method
Baderd94
7-Jul-18 22:31pm
View
I added this to my RoundBtn.cpp file
void RoundBtn::SetColor(COLORREF text, COLORREF bkgnd)
{
m_TextColor = text;
m_BkgndColor = bkgnd;
if(m_hWnd != NULL)
Invalidate();
}
then I added this to my RoundBth.h
COLORREF m_TextColor;
COLORREF m_BkgndColor;
and this
void SetColor(COLORREF text, COLORREF bkgnd);
then i added this to my main file
Loadbt1.SetColor(RGB(255,255,255),RGB(255,255,255));
where Loadbt1 is the button that i want to color
it shows no error but it still does not work
Baderd94
4-Jul-18 13:20pm
View
Thaddeus Jones, I moveed modify the menu to OnButton1() and, it worked. thank you so much
Show More