15,892,809 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 Member 13089825 (Top 79 by date)
Member 13089825
6-May-20 22:47pm
View
same as upload file to S3 bucket i have to get the file from S3 bucket and show it on webpage..
example i ahve create GET button on webpage if i click GET then i have to get the file from S3 and show it on webpage
Member 13089825
26-Oct-18 6:54am
View
didnt understand
Member 13089825
26-Oct-18 5:59am
View
thanks for your suggestion that was type error
str->ReadInteger("SITE","North",0) i have tried this still not getting expected result
Member 13089825
17-Jul-18 9:15am
View
when i used the HRESULT hr = m_pIXMLHTTPRequest->get_statusText(&bstrResponse);
bstrResponse is coming as "unauthorized"
Member 13089825
17-Jul-18 8:24am
View
yes it s_OK only
Member 13089825
17-Jul-18 8:17am
View
sorry ,
CComBSTR bstrResponse;
HRESULT hr = m_pIXMLHTTPRequest->get_responseText(&bstrResponse);
Member 13089825
17-Jul-18 8:12am
View
yeah,i didnt find solution yet,im checking
Member 13089825
27-Jun-18 6:00am
View
i have updated the question now and loop is for there will number of attrs will be there i didnt add that here
Member 13089825
27-Jun-18 5:39am
View
modified(it typoo error) but still same issue
Member 13089825
27-Jun-18 5:35am
View
com parser
CComPtr<ixmldomdocument> iXMLDoc;
iXMLDoc.CoCreateInstance(__uuidof(DOMDocument));
VARIANT_BOOL bSuccess = false;
CComPtr<ixmldomelement> iRootElm;
iXMLDoc->loadXML((bsResponse), &bSuccess);
Member 13089825
12-Jun-18 9:26am
View
NO
Member 13089825
12-Jun-18 9:22am
View
HRESULT hr= loadXML->load(variant_t(Style.xsl")));
if (FAILED(hr))
{//how to print error details here
return false;
}
could you please check it once
Member 13089825
12-Jun-18 9:16am
View
source code line number showing empty
Member 13089825
12-Jun-18 8:32am
View
file is in same directory
Member 13089825
7-May-18 7:59am
View
"If you really want folder selection:
SHBrowseForFolder is - as the name suggests - for selecting folders (directories) while CFileDialog is for selecting file names."
i want create a file example test .xml inside some folder,will it possible using file selector
Member 13089825
7-May-18 7:33am
View
i want to replace the BROWSEINFO with Cfiledialog
CString fileName;
BROWSEINFO bi;
ZeroMemory(&bi, sizeof(bi));
TCHAR szDisplayName[MAX_PATH] = { 0 };
bi.hwndOwner = GetSafeHwnd();
bi.pidlRoot = NULL;
bi.pszDisplayName = szDisplayName;
bi.lpszTitle = _T("Please createfile :");
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lParam = NULL;
bi.iImage = 0;
LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
TCHAR szPathName[MAX_PATH] = { 0 };
if (NULL != pidl)
{
BOOL bRet = SHGetPathFromIDList(pidl, szPathName);
if (FALSE == bRet)
return;
}
//On cancel button click,directory name is not changed
if (szPathName[0] != '\0')
{
filename
}
Member 13089825
26-Apr-18 6:44am
View
wrong: "[!/\[]:;|=,+*<>]*"
correct: "[!/\\[\\]:;|=,+*<>]*"
is it possible to validate pattern is correct or not using vc++ mfc
Member 13089825
21-Mar-18 3:19am
View
i have used like below but still i am not able write all the string into the file
fwrite(data, data.GetLength(), 1, stream);
could you please correct me
Member 13089825
8-Mar-18 2:10am
View
how to find the string contain ‘ character
i have tried
CString str("The ‘stars are aligned");
int n = str.Find('‘')
but its coming as -1 alwyas
Member 13089825
21-Dec-17 12:50pm
View
i have found the issue and its working fine now ,thanks
Member 13089825
21-Dec-17 10:23am
View
i have modified like below its going inside but values are not returning.(returning empty)
for (TElem e = elays.begin(); ( (e != elays.end())); e++)
Member 13089825
21-Dec-17 8:05am
View
What does "ini=side" mean?
sorry,its typo error
yeah i have copied,because my requirement is similar in that one its not going inside for loop
Member 13089825
16-Oct-17 5:58am
View
issue got resolved,so closing
Member 13089825
12-Oct-17 11:58am
View
the below i have tried but still its throwing exception
CBitmap *bitmap = new CBitmap();
if (bitmap)
{
bitmap->GetBitmap(&bm);
}
Member 13089825
12-Oct-17 11:48am
View
even when i use below code then also itsthrowing exception
CBitmap bitmap;
/* if (bitmap)
{
bitmap->GetBitmap(&bm);
}*/
// ((CBitmap*)bitmap)->GetBitmap(&bm);
bitmap.GetBitmap(&bm);
Member 13089825
12-Oct-17 11:40am
View
when i used below code its throwing compiler error as "unintialzed local variable bitmap used
CBitmap *bitmap;
if (bitmap)
{
bitmap->GetBitmap(&bm);
}
Member 13089825
11-Oct-17 10:53am
View
hi,create is returning true only.
i have passed like CRect rectDummy(0,0,40,40);but its showing new window on dialog
could you please suggest me what we have pass rect value
Member 13089825
11-Oct-17 9:04am
View
i have added like below but still throwing exception
CRect rectDummy;
rectDummy.SetRectEmpty();
m_combobox.Create(WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | CBS_SORT | CBS_OWNERDRAWVARIABLE, rectDummy, this, 1);
m_combobox.AddString(L"item 0");
m_combobox.AddString(L"item22") and if i comment addstring its not throwing exception and drawitem is not getting calling when calling create()
Member 13089825
11-Oct-17 8:17am
View
When im inserting data like below its throwing exception
TestDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
m_combobox.InsertString(0, L"item 0"); // m_combobox is member ofMyComboBox and declared it in testdlg.h MyComboBox m_combobox;
m_combobox.InsertString(1, L"item 1");
Member 13089825
11-Oct-17 7:50am
View
HI thank you for your suggestion
drwaitem is getting calling but im getting some junk data here.
combox have the data is "item0","item 1"(added this in dailog->combobox->Data)
but in drawitem its coming some junk value
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
ASSERT(lpDrawItemStruct->CtlType == ODT_COMBOBOX);
LPCTSTR lpszText = (LPCTSTR)lpDrawItemStruct->itemData;// here getting junk string
ex:'敤'
and please suggest me how to change the color of text and background depending on combobox selected item
could you please suggest me here
Member 13089825
11-Oct-17 5:33am
View
hi i tried to pass CBS_OWNERDRAWVARIABLE in create function but still not getting calling drawitem
BOOL TestDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
MyComboBox m_combobox;
CRect rectDummy;
rectDummy.SetRectEmpty();
//m_combobox = new CJimsUiComboBox();
if (m_combobox.Create(WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | CBS_SORT |
CBS_OWNERDRAWVARIABLE, rectDummy, this, 1))
{
}
Member 13089825
11-Oct-17 5:18am
View
Deleted
hi i tried to pass CBS_OWNERDRAWVARIABLE in create function but still not getting calling drawitem
BOOL TestDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
MyComboBox m_combobox;
CRect rectDummy;
rectDummy.SetRectEmpty();
//m_combobox = new CJimsUiComboBox();
if (m_combobox.Create(WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL | CBS_SORT |
CBS_OWNERDRAWVARIABLE, rectDummy, this, 1))
{
}
Member 13089825
20-Sep-17 5:03am
View
Firstly why are you storing integer values as strings
In registery we can store its as string only so from registery im getting that value(that is string type) and stroring it in CS
this code will be called in BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
}
Member 13089825
5-Sep-17 6:43am
View
sorry,i have followed same but its not working for me(size is not updating in gui and position is updating)
sorry for wasting your time
Member 13089825
5-Sep-17 6:26am
View
void CMainFrame::ShowWindowInitial()
{
OnShowWindow(m_nCmdShow);// we dont have any function OnShowWindow()right (we have only ShowWindow or OnShowWindow(BOOL bShow, UINT nStatus)
}
Member 13089825
5-Sep-17 6:01am
View
void CMainFrame::OnClose()
{
WINDOWPLACEMENT wp;
GetWindowPlacement(&wp);
AfxGetApp()->WriteProfileBinary(_T("MainFrame"), _T("WP"), (LPBYTE)&wp, sizeof(wp));
CFrameWndEx::OnClose();
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
return -1;
WINDOWPLACEMENT *lwp;
// Get placement here
UINT nl;
if (AfxGetApp()->GetProfileBinary(_T("MainFrame"), _T("WP"), (LPBYTE*)&lwp, &nl))
{
m_nCmdShow = lwp->showCmd;// m_nCmdShow i have created locally
// must set this to normal here
lwp->showCmd = SW_SHOWNORMAL;
SetWindowPlacement(lwp);
delete[] lwp;
}
still same issue
Member 13089825
5-Sep-17 4:57am
View
Is the screen size not stored correctly in the registry or is it not applied?
its not applied
// save show state
m_nCmdShow = wpl->showCmd;// throwing error like uninitialzed variable wpl used
Member 13089825
5-Sep-17 3:45am
View
hi jochen,sorry to trouble you
screen position seems to be remembered correctly, it is the screen size that doesn't get remembered
Member 13089825
5-Sep-17 3:41am
View
x and y position is updating correctly but width and height not updating
Member 13089825
5-Sep-17 3:30am
View
I read that as:
- Returning old values = Data saved at last program exit are read: OK
- But GUI is positioning as per that values = ? gui is not positioning as per the values
"that" would then refer to the data read which are the correct ones.
Member 13089825
5-Sep-17 3:03am
View
void CMainFrame::OnShowWindow(BOOL bShow, UINT nStatus)
{
CFrameWndEx::OnShowWindow(bShow, nStatus);
static bool bOnce = true;
if (bShow && !IsWindowVisible()
&& bOnce)
{
bOnce = false;
WINDOWPLACEMENT *lwp;
UINT nl;
if (AfxGetApp()->GetProfileBinary(_T("MainFrame"), _T("WP"), (LPBYTE*)&lwp, &nl))
{
SetWindowPlacement(lwp);
delete[] lwp;
}
}
}
Still same issue
Member 13089825
5-Sep-17 2:46am
View
i have debugged ,values are restoring correctly but GUI is not updating with restoring values
Member 13089825
5-Sep-17 2:45am
View
Deleted
hi i have used above code ,its restoring values correctly( i have debugged and checked ) but GUI is positioning correctly but size is not updating correctlt
Member 13089825
8-Aug-17 7:52am
View
thank you,its working fine now
Member 13089825
4-Aug-17 6:09am
View
hi i have tried this,but its not thorwing error when i give test+,test>(if i give combination then its not throwing error)
bool ValidateLoginid(const CString& inputString)
{
std::wregex stringpattern(L"[!/\\[\\]:;|=,+*<>]*");
return !std::regex_match(inputString.GetString(), stringpattern);
}
Member 13089825
4-Aug-17 5:55am
View
its throwing error when im giving those charcters alone
but when i enetred like below
test>
<]test
>test]++
its not throwing error but i need to throw error even inthat case also(my string should not contain those charactes)
could you please suggest me
i have tried like
bool ValidateLoginid(CString inputString)
{
//..std::regex stringpattern("[a-zA-Z0-9][0-9a-zA-Z_!@#$%^&()']*");
std::regex stringpattern("[!/\\\\[\\]:;|=,+*<>]*");
std::string s_input(CW2A(inputString.GetString()));
if (std::regex_match(s_input, stringpattern))
{
return false;
}
return true;
}
Member 13089825
27-Jul-17 8:52am
View
thank you very much.
Its working fine now.
Member 13089825
27-Jul-17 2:31am
View
HI thank you for your reply.
Could you please give me some more guidance.
here i want resize the controls both left right(only width need to be updated as per resizing ) and top to bottom(y position need to be changed for top to bottom)
Member 13089825
19-Jul-17 3:37am
View
i have added like this
lvim.cbSize = sizeof(lvim); // // Must set the cbSize member
//memset(lvim.cbSize, 0, sizeof(LVINSERTMARK));
lvim.iItem = 0;
lvim.dwFlags = 0;
lvim.dwReserved = 0;
if (m_probelist_ctl.GetInsertMark(&lvim)) //Pass the address of the structure
{
// Access structure element
int nitem = lvim.iItem;
}
but still its showing -1
Member 13089825
19-Jul-17 3:26am
View
"An insertion point can appear only if the list-view control is in icon view, small icon view, or tile view, and is not in group-view mode"
HI even when i use iconview also getinsertmark is returning false.
Member 13089825
18-Jul-17 9:30am
View
now also returning false and lvim have the below valuse
cbSize = 16
dwFlags = 2147483648
iItem = -1
dwReserved = 3435973836
do i need to call the setinsertmark before call the getinsertmark?
Member 13089825
18-Jul-17 9:16am
View
hi thank you its compiling successfully now but GetInsertMark(&lvim)is returning false alwyas.
im doing is im deleting an item in list and after that im calling the GetInsertMark(&lvim) but its returning false alwyas
Member 13089825
18-Jul-17 2:03am
View
thank you its working now
Member 13089825
17-Jul-17 3:22am
View
hi thank you for quick reply.
the link you have provide is for ip address control but in my case im storing ip address in to strings so i have to parse the sting and need to compare.
if you have any example on this could you please help me.
Member 13089825
14-Jul-17 6:47am
View
if possible could you please provide some example for ip address parsing
Member 13089825
13-Jul-17 7:48am
View
it will stored as "11.1.1.1" because ctlList.GetItemText(row, s_cnIpFilterRangeEnd);will be rturn cstring
i want to compare for less than or greater than purpose
Member 13089825
22-Jun-17 8:58am
View
thank you jochen for your quick reply.
is it possible to implement own shortcuts(i mean override existing one with new one)
Member 13089825
18-May-17 7:04am
View
hi,yes your are correct but it's working only on intial loading time(only initial application opening time its working)
I mean suppose initially its diable and after clicking some functionality I made it as enable
now I opened another dialog and move back to buttons dialog but this time its not disable and its showing enable
I want to disable these buttons when ever I'm loading that dialog on form view
sorry my english is not good
Member 13089825
18-May-17 6:27am
View
thank you for your suggestion
but I want disable the buttons in constructor
so could you please suggest me
CConfig::CJimsUiSrxClientConfig(CWnd* pParent)
{
// here I want disable the buttons (constructor)
}
bcz when ever this dialog loading that time ive to reset
Member 13089825
27-Apr-17 3:35am
View
Do you need split functionality for the right view (do you want to resize the three parts individually)?
>> I want to one tabcontrol(rightview(listview) will replace with tabcontrol )and one bottom parts(with optional hiding bottom part alone)
Member 13089825
21-Apr-17 6:35am
View
whenever entering as 0.0.0.0 its considering as empty (blank)and its not displaying on edit control.
(as per you suggestion I have checked the blanked state for each edit control.
whatever input contain 0.0.0.0. its considering as blank.
could you please suggest how to show 0.0.0.0 on edit control
Member 13089825
21-Apr-17 6:28am
View
I'm using the edit control
when I did below thing
CIPAddressCtrl* pCtrl = (CIPAddressCtrl*)GetDlgItem(IDC_EDIT_IP_RANGE_START);
if (pCtrl->IsBlank())//Nonzero if all of the IP Address Control fields are empty; otherwise 0
{
AfxMessageBox(L" empty");
}
its coming as empty after enter the values as 0.0.0.0
Member 13089825
21-Apr-17 5:57am
View
sorry I have missed previsously
when I used below thing
CWnd* pwndCtrl = GetFocus();
int ctrl_ID = pwndCtrl->GetDlgCtrlID();
if (!((CIPAddressCtrl*)pwndCtrl)->IsBlank()) {
AfxMessageBox(L"not empty");
}
its always going to inside(printing not empty)
could you please suggest me how to show 0.0.0.0 on cedit
Member 13089825
21-Apr-17 5:57am
View
thank you for your reply.
when I hused below thing
CWnd* pwndCtrl = GetFocus();
int ctrl_ID = pwndCtrl->GetDlgCtrlID();
if (!((CIPAddressCtrl*)pwndCtrl)->IsBlank()) {
AfxMessageBox(L"not empty");
}
its always going to inside(printing not empty)
could you please suggest me how to show 0.0.0.0 on cedit
Member 13089825
14-Apr-17 4:59am
View
yes,but (CMainFrame*)(AfxGetApp()->m_pMainWnd)- wont have the OnDrawPane
so could you please suggest me how to use
sorry i am new to mfc(VC++)
Member 13089825
14-Apr-17 4:45am
View
is it possible to add text from rightside on statndard staus bar using below one
(CMainFrame*)(AfxGetApp()->m_pMainWnd)->setMessagetext(string);
Member 13089825
14-Apr-17 2:47am
View
i want to show on satus bar is the way line number i shown in th evisual studion status bar "LN n"
so for above requiremnet i am doing like below
CString status;
status+= "connected"
CRect rect;
GetClientRect(&rect)
for (inti=0;i<rect.width()-100);i++)
{
status+=" ";
}
status += "LN " and after thil LN i am appending the my current line number(or rownumber which is getting from list view whilcking clicking time)
(CMainFrame*)(AfxGetApp()->m_pMainWnd)->setMessagetext(status);
but here problem is its not showing corrctly while minimizing window its showing some place and maxmizing time its showing some place
could you please help me here how to show staus bar text on correct place while chnaging window width
Member 13089825
13-Apr-17 9:57am
View
here we are using (CMainFrame*)(AfxGetApp()->m_pMainWnd)->setmessagetext(L"string")so using this how can we set on right side
here we are using standard status bar
could you please helm me if you have any idea on this
Member 13089825
13-Apr-17 9:57am
View
here we are using (CMainFrame*)(AfxGetApp()->m_pMainWnd)->setmessagetext(L"string")so using this how can we set on right side
here we are using standard status bar
could you please helm me if you have any idea on this
Member 13089825
13-Apr-17 6:25am
View
thank you for your reply.
could you please provide some example if possible
Member 13089825
6-Apr-17 9:38am
View
thank you for your reply
sorry i didnt get you answer,
My requirements is VC++ along with MFC
could you please help here how can i get selected text from listview
Member 13089825
5-Apr-17 9:28am
View
but my intial class wont contain that methos because its inherting from CFrameWnd
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnUpdateViewStyles(CCmdUI* pCmdUI);
afx_msg void OnViewStyle(UINT nCommandID);
DECLARE_MESSAGE_MAP()
sorry im beginner to MFc so only asking this type of doubts
Member 13089825
5-Apr-17 9:15am
View
So you want to replace the complete listview by another window?
>>yes ,is it possible to insert a dialog on listview?
yeah your idea is good but for that i haveto modify total design but i will try this idea once
Member 13089825
5-Apr-17 8:59am
View
i have one mainframe(derived from CFrameWnd)and this class i have devided into two parts one is leftview(derived from CTreeView)and another is rightview(derived from CListView)
the below methos i have devided two parts
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
CCreateContext* pContext)
{
if (!m_wndSplitter.CreateStatic(this, 1, 2))
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(100, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CJIMSRightView), CSize(100, 100), pContext))
{
//|| !m_wndSplitter.CreateView(0, 2, RUNTIME_CLASS(CFilters), CSize(100, 100), pContext)
m_wndSplitter.DestroyWindow();
return FALSE;
}
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
m_wndSplitter.SetColumnInfo(0, 175, 20);
m_wndSplitter.SetRowInfo(0, 175, 20);
}
when i clicked some text on leftside window then i have to insert one dialog on right side view(and it should be embedded and not popup)
could you please provide your mail id so that i can share some screenshots
Member 13089825
5-Apr-17 8:33am
View
For reference please see below link
https://www.codeproject.com/Articles/4408/Creating-embedded-dialogs-in-MFC?msg=5381464#xx5381464xx
Member 13089825
5-Apr-17 8:30am
View
Do you want to implement some filter elements?
No just i want insert one dialog(its not any filter,here my dialog name is filter thats why maybe u got confused,sorry).
Member 13089825
30-Mar-17 1:36am
View
for reference you can see in below link
https://www.codeproject.com/Articles/4408/Creating-embedded-dialogs-in-MFC
but in that they have embeddedthe dialog on to dialog but in my case i have embed into the listcontrol
Member 13089825
30-Mar-17 1:20am
View
actually in my requirement we have to insert a dilaog on listcontrol instead of showing popup
Member 13089825
29-Mar-17 7:44am
View
i want to Creating embedded dialogs
it means when i click some button on listview i have to show new dialog that should be embedded with the list view
sorry for confusing you with my question
Show More