15,792,440 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 Python questions
View PHP 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 Member 14837073 (Top 31 by date)
Member 14837073
13-Jul-22 8:00am
View
var jsonFilePath = @"C:\Test2\JosonParser - Copy\JosonParser\json2.json";
var jsonStr = File.ReadAllText(jsonFilePath);
JObject obj = JObject.Parse(jsonStr);
//Select for Particalar tokens
string value_name =obj.SelectToken("['Value Information']['Platform Compensation'][0].Value").ToString();
Console.WriteLine(value_name);
Its has resolved.
but if there any problem while if i used SelectToken
Member 14837073
2-Dec-20 7:32am
View
CFont font;
font.CreateFont(
40,
2,
2,
2,
FW_BOLD,
FALSE,
FALSE,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
NULL
);
command_button_control.SetFont(&font);
This code also I tried please help ...I have spend time lots
waiting for the response
Member 14837073
2-Dec-20 0:52am
View
Hi everyone please check my code and give some solutions i try everything ,
pleases help me for this
Every code i try but its not changing
CFont* currentFont = GetFont();
currentFont->GetLogFont(&lf);
lf.lfHeight = 50;
m_font.DeleteObject();
m_font.CreateFontIndirect(&lf); // Create the font.
// Use the font to paint a control.
m_try.SetFont(&m_font);
Member 14837073
1-Dec-20 4:46am
View
Yeh its calling the return value of CreateFont,
But I did not get any changes in Command Link button
@Richard MacCutchan above the code Modify as your knowledge and send me its will helpful for me
Member 14837073
1-Dec-20 4:13am
View
I try with above the link its not working , help me for the any others method
Member 14837073
12-Oct-20 6:12am
View
Device which i am working on rs232 serial port
Smal project which given to me is , rs232 serial port monitoring
Data which i am sending through editbox , its should write in hexadecimal n read in a hexadecimal and print as ASCII value ...
byte which u mentioned, i tried write with 0 bytes n read with 0 bytes its working fine
but how do i write Arry bytes in hexadecimal in WriteData() function which i am geting from edibox value
Member 14837073
20-Aug-20 2:38am
View
I tried but same issue i am facing
Member 14837073
18-Aug-20 3:16am
View
/*.cpp/*
void CUtilitiesTab::OnBnClickedCheck2()
{
int rc;
IPAddr ia;
MessageBeep(1000);
UpdateData(TRUE);
ia = inet_addr(m_ip_address);
rc = NewPing(ia, (ULONG*)&m_hops_count, (ULONG*)&m_rtt);
if (rc == 0)
m_selftestresult.SetWindowTextW(_T("pass"));
else
m_selftestresult.SetWindowTextW(_T("Host not responding or no route, rc = %d", rc));
UpdateData(FALSE);
MessageBeep(1000);
return;
}
int NewPing(IPAddr ia, ULONG* hops_count, ULONG* rtt)
{
boolean IsOk;
IsOk = GetRTTAndHopCount(ia, hops_count, 128, rtt); //the iphlpapi call
if (IsOk == TRUE) return 0;
return GetLastError();
}
/*.h*/
#pragma once
// CUtilitiesTab dialog
//#ifndef __SERIAL_H__
class CUtilitiesTab : public CDialogEx
{
DECLARE_DYNAMIC(CUtilitiesTab)
public:
CUtilitiesTab(CWnd* pParent = nullptr); // standard constructor
virtual ~CUtilitiesTab();
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_UTILITIES };
#endif
protected:
HICON m_hIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
bool IsCheck1Checked;
CButton m_mil1553;
CButton m_ethernet;
CButton m_discrete;
CString m_resultTxt;
afx_msg void OnBnClickedMfcbutton1();
/*Ethernet*/
char m_ip_address[4];
long m_hops_count;
long m_rtt;
afx_msg void OnBnClickedCheck2();
};
what i tried here.
here i am just declare the IP adress as hardcode , when i click checkbox its should saw the output in edittext like "pass" or "fail"..
but here i am geeting the error
Error C4996 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings MGTS
if anyone can help me out this that would be great full
Member 14837073
3-Jul-20 2:31am
View
i will come back all the details ,
sample program which i told about below ,,
TY_API_OPEN xApiOpen;
wBoardCountLocal = ApiInit (); /* Local board access */
if ( useServer ) { /* Remote board access */ retVal = ApiConnectToServer(strServerName , &wBoardCountRemote); }
xApiOpen.ul_Module = 0; xApiOpen.ul_Stream = API_STREAM_1; sprintf ( xApiOpen.ac_SrvName, xConfig . acServer );
retVal = ApiOpenEx(&xApiOpen, &ulModHandle );
retVal = ApiClose(boardHandle );
if ( useServer ) ApiDisconnectFromServer(strServerName );
ApiExit ();
Member 14837073
30-Jun-20 5:33am
View
"unhandeled exception at 0x6a112efo (msvcr90d.dll) in kgf .exe : 0xc0000005: Access vilotaion reading location 0x8370c29c "
i geting this error
Member 14837073
16-Jun-20 4:56am
View
Thank you soo much , Cpallini
its works
Member 14837073
16-Jun-20 4:26am
View
no operator "+=" matches these operands
Member 14837073
16-Jun-20 2:27am
View
Deleted
const unsigned char nbuf[] = { 'A', 'B', '\0', '\0', 'C', 'd', 'e', 'f' };
above the programs , vice virsa ...
I am trying with same way i didnt get if any changes let me know
Expecting output will be "65 66 0 0 67 100 101 102"
Member 14837073
16-Jun-20 2:27am
View
const unsigned char nbuf[] = { 'A', 'B', '\0', '\0', 'C', 'd', 'e', 'f' };
above the programs , vice virsa ...
I am trying with same way i didnt get if any changes let me know
Expecting output will be "65 66 0 0 67 100 101 102"
Member 14837073
16-Jun-20 2:22am
View
Thank you soo much its works ,this just demo programs this way i need implement in serial monitoring ,thanks once again
Member 14837073
16-Jun-20 1:30am
View
i am sorry i am not able to make understand you guys , i am new in developers filed ,
lets again i will try to explain , for Example
CString msg;
char nbuf = 67
msg.Format(L"%c", (BYTE)nbuf);
m_asciiresult.SetWindowTextW(msg);
above the program i am geting output C (67 ascii value character is "C") , Now what i want is array format . the ascci value are in ,
char nbuf[]={67,68,69} ,this i want character 67=C,68=D,69=E ,it means the want output is "CDE" either above the program i doing correct or wrong please make it help ,i hope i make you understand ...thank you
Member 14837073
15-Jun-20 9:36am
View
CString msg;
wchar_t nbuf[] = L"ABC";
msg.Format(L"%d", nbuf);
m_asciiresult.SetWindowTextW(msg);
even i try this one it was like character to change the integer but this also i did not get proper out i am geting dummy value ....
Member 14837073
15-Jun-20 9:33am
View
I hope you understand my questions,
Here i am talking about conversions ...
for exmple
char nbuf[10] = {67,68,69,70,70,72};
msg.Format(L"%c", (BYTE)nbuf[0]);
m_asciiresult.SetWindowTextW(msg);
i am geting output for this "C" but i want the output something like "CDEF"..but i doing correct or wrong above code but i want help
Member 14837073
3-Jun-20 13:42pm
View
i starting from the basic ,my requirement is my data is come from hardware based in ASCII format ,Above the code i want to print in static text in mfc ,how do i do that
m_result_ascii ///variable of static text
Member 14837073
3-Jun-20 13:42pm
View
Above code is character to ASCII value ,(WHICH is did code based on that)
which i mentioned ASCII code convert to character (my expected).
TRACE( "ASCII format is : %c\n", myByte ); //solutions 2 it help me out in mfc to get character
Member 14837073
3-Jun-20 13:08pm
View
Deleted
Thanks , i will try this
Member 14837073
3-Jun-20 13:08pm
View
Thanks , i will try this
Member 14837073
3-Jun-20 13:06pm
View
Yeh something wrong is there ,no any idea
Member 14837073
3-Jun-20 11:40am
View
Deleted
u help me to modified the code which i tried to print ASCII character ..
Member 14837073
3-Jun-20 11:40am
View
u help me to modified the code which i tried to print ASCII character ..
Member 14837073
3-Jun-20 11:19am
View
for (int i = 0; i < 122; i++){
int asciiVal = rand()%97 + 122;
char asciiChar = asciiVal;
cout << asciiChar << " ";
}
Above the progrmas i getting error ,i want to print character value "a" to "z" and dumbed into static text in mfc
BOOL CAsciidemoDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != nullptr)
{
BOOL bNameValid;
CString strAboutMenu;
bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
ASSERT(bNameValid);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
char nchar = 65;
m_ASCIIRESULT = nchar; /** here i want to dumbed the data which i will get the
output in cout.
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
}
Member 14837073
3-Jun-20 10:06am
View
Thanks ,lets try and i will update once when i complete
Member 14837073
1-Jun-20 7:40am
View
Thank you Richard Macutchan
Member 14837073
1-Jun-20 5:42am
View
Yes ,i got the output what i expected through the solutions 3
Member 14837073
1-Jun-20 0:35am
View
For serial port Monitoring ,while monitoring the port i should work with main window
Member 14837073
1-Jun-20 0:33am
View
Thank you so much its help me lot
and its working fine while copying code
i am new here and learning programming ,you guys are really helpful
Thank you once again
Show More