Click here to Skip to main content
15,170,096 members

Comments by Member 14594285 (Top 112 by date)

   
I saw in internet that I can use

SQLGetInstalledDriversW ( LPWSTR lpszBuf,
WORD cbBufMax,
WORD * pcbBufOut
)

but I don't understand how use this function
   
yes But I don't know how I must inizialized lpszBuf, cbBufMax and pcbBufOut
   
yes driver ODBC
   
so Must I write :
if PathFileExists(_T("/S C:\mysql-connector-odbc-5.1.8-win32.msi");?
   
I saw in internet that I can use

SQLGetInstalledDriversW ( LPWSTR lpszBuf,
WORD cbBufMax,
WORD * pcbBufOut
)

but I don't understand how use this function
Member 14594285 13-Dec-21 9:52am View
   
I don't find article, I cancel my comment
Member 14594285 13-Dec-21 9:15am View
   
Deleted
m_pieChart.Invalidate();
m_pieChart.RemoveItemAll();
m_pieChart.UpdatePieChart();
m_pieChart.UpdatePiechartPoints();
m_pieChart.UpdateData();

with this code works
Member 14594285 7-Dec-21 2:53am View
   
thanks I solved
Member 14594285 6-Dec-21 12:26pm View
   

void CCReadQueryDlg::OnBnClickedButton3()
{
AfxMessageBox(L"dsfds", MB_OK);	
}
<pre>

I have a button on the dialog and if I press box of AfxMessageBox is hidden
Member 14594285 6-Dec-21 11:27am View
   
In fact I thought this
Member 14594285 6-Dec-21 11:21am View
   
but I don't understand relation between Create and afxmessageBox
Member 14594285 6-Dec-21 11:19am View
   
I found out that this code:
<
CRect rect1;
rect1.left = 250;
rect1.top = 10;
rect1.bottom = 530;
rect1.right = 1250;
m_pieChart.Create(L"", rect1, this, 1);
>
block afxMessageBox , if I remove this row ''m_pieChart.Create(L"", rect1, this, 1);''
I can see afxMessageBox
Member 14594285 6-Dec-21 5:51am View
   
thanks, I used debug and breakpoint arrives in that point but then program is blocked
Member 14594285 6-Dec-21 5:20am View
   
I want to tell that my code doesn't execute this row of code:
AfxMessageBox(...)
Member 14594285 8-Oct-21 3:31am View
   
I wrote:
COleDateTime aa;
COleDateTime bb;
int t;
aa.SetDate(01, 02, 2021);
aa.SetTime(0, 0, 0);
bb.SetDate(02, 02, 2021);
bb.SetTime(0, 0, 0);

aa.GetStatus();
bb.GetStatus();

BOOL b1;
BOOL b2;
BOOL b3;
b1 = aa == bb; // TRUE
b2 = aa < bb; // FALSE
b3 = aa > bb; //FALSE

so values of b1,b2,b3 are incorrect
Member 14594285 7-Oct-21 12:04pm View
   
I must understand if date1 is later then an other, if I write date1>date2 it doesn't work.
Member 14594285 7-Oct-21 11:59am View
   
yes later, sorry..
Member 14594285 1-Sep-21 11:06am View
   
Ok thanks, now it works
Member 14594285 6-Aug-21 10:07am View
   
I found out that option topmost of the dialog is the cause, so, like I said before, it depended on option of dialog
Member 14594285 6-Aug-21 8:57am View
   
I know but I don't understand because I have this problem, maybe there is an option f dialog
Member 14594285 6-Aug-21 5:48am View
   
is there an option relative to the dialog where I decide if dialog is in the foreground?
Member 14594285 5-Aug-21 6:10am View
   
I understand but in my case it doesn't work, so I must find an alternative method
Member 14594285 5-Aug-21 5:55am View
   
Deleted
for my dialog I mean
Member 14594285 5-Aug-21 5:55am View
   
if I WRITE
bool b = this->GetForegroundWindow(), b is true, so how I can put false setForegroundWindow? For my dialog I mean
Member 14594285 5-Aug-21 5:28am View
   
ok, I hope this question is clear
Member 14594285 28-Jul-21 6:31am View
   
yes I know, but I need killFocus, I tried with your method but it isn't suited, I need kilLFous with key enter, thanks
Member 14594285 1-Dec-20 9:48am View
   
it's the same thing, I have grey and not blue
Member 14594285 27-Nov-20 2:37am View
   
ok, done
Member 14594285 6-Mar-20 11:08am View
   
or an other thing I think more simple..Can I calculate the max x size of my window when I maximize? in pixel
Member 14594285 24-Feb-20 8:29am View
   
I wrote: m_listbox.ModifyStyle(LVS_SINGLESEL, NULL, 0);

but if in resource I set singleselect I can't modifie..this row doesn't work
Member 14594285 24-Feb-20 8:16am View
   
yes but I want to do run_time..how must I write?
Member 14594285 24-Feb-20 6:18am View
   
I used:
m_listbox.SelItemRange(TRUE, 0, m_listbox.GetCount());

but how must I write to set multiple selection?
Member 14594285 24-Feb-20 6:07am View
   
I use mfc c++
Member 14594285 7-Feb-20 8:56am View
   
ok thanks, so it isn't possible, thanks
Member 14594285 7-Feb-20 8:17am View
   
I have a parent dialog e when I click a pushbutton an other dialog opens..my problem is that the last dialog is fixed, I can't move it...is there a setting that permit me to move it?
Member 14594285 7-Feb-20 5:28am View
   
my dialog is fixed, it doesn't be moved..how Can I do?
Member 14594285 7-Feb-20 5:13am View
   
but I want that my dialog move when I move mouse
Member 14594285 6-Feb-20 12:04pm View
   
so CEvent a = OnKeyDown? I don't understand..sorry but it's the first time for me
Member 14594285 6-Feb-20 6:13am View
   
I solved, thanks
Member 14594285 6-Feb-20 5:00am View
   
sorry..timer of 3402 starts but timer of 3401 doesn't start
Member 14594285 6-Feb-20 4:58am View
   
I didn't say that setTimer(3401) is inside function of setTimer(3402);
Member 14594285 6-Feb-20 4:57am View
   
it doesn't work..timer for 3402 doesn't start
Member 14594285 6-Feb-20 4:57am View
   
mmm...it's strange because if I use a time of 3401 bigger then time of 3402 program dooesn't work
Member 14594285 6-Feb-20 3:25am View
   
I wrote:

for (int i = 0; i <= 20; i++)

{
Sleep(100);
WaitForSingleObject(OnKeyDown, 100);
...



but I have errors
Member 14594285 6-Feb-20 2:54am View
   
How must I do? Can I see an example?
Member 14594285 6-Feb-20 2:53am View
   
How must I do? Can I see an example?
Member 14594285 5-Feb-20 12:08pm View
   
mmmm..I saw documentation but it isn't very clear, so in setEvent I can put keyDown event like event that wakes program? Help
Member 14594285 5-Feb-20 4:06am View
   
yes, in fact now it works for CEdit...but if I want only the string that go head?
Member 14594285 5-Feb-20 3:55am View
   
yes, I want to use multiline, and if I want use it only for the string? how must I do?
Member 14594285 3-Feb-20 12:01pm View
   
yes, but I need to move tip inside button
Member 14594285 3-Feb-20 10:42am View
   
I solved, I used pretranslate message, but If I want to show tip inside button?
Member 14594285 3-Feb-20 10:41am View
   
I solved..I wrote:

BOOL CMFCApplication22Dlg::PreTranslateMessage(MSG* pMsg)
{
m_tip.RelayEvent(pMsg);
return CDialog::PreTranslateMessage(pMsg);
}
Member 14594285 3-Feb-20 8:27am View
   
it isn't that
Member 14594285 3-Feb-20 8:27am View
   
so I must do a subclass?? it's so longer
Member 14594285 29-Jan-20 5:01am View
   
I solved in an other way, always using getPosition and seek, thanks anyway
Member 14594285 26-Nov-19 6:23am View
   
I have:
const char *encodings[]= {
"ZapfDingbats-Set",
/*"MacRomanEncoding",
"WinAnsiEncoding",
"ISO8859-2",
"ISO8859-3",
"ISO8859-4",
"ISO8859-5",
"ISO8859-9",
"ISO8859-10",
"ISO8859-13",
"ISO8859-14",
"ISO8859-15",
"ISO8859-16",
"CP1250",
"CP1251",
"CP1252",
"CP1254",
"CP1257",
"KOI8-R",
"Symbol-Set",
*/
NULL
}; //stringhe dei titoli per ogni griglia

HPDF_Page_ShowText(page, encodings[i]);

but if I have a buffer of CString that I want put inside my list?
I saw this example:
http://libharu.org/demo/encoding_list.c
Member 14594285 22-Nov-19 5:49am View
   
thanks I solved
Member 14594285 19-Nov-19 3:13am View
   
I tried to use c but it's the same, image isn't loaded
Member 14594285 14-Nov-19 11:56am View
   
so m_timeend.ModifyStyle(0, DTS_RIGHTALIGN) works? it's strange, I see that it doesn't work, I have align on left and not on right, can I see a photo?
Member 14594285 14-Nov-19 11:08am View
   
I tried also:
m_timeend.ModifyStyle(0, DTS_RIGHTALIGN);
Member 14594285 14-Nov-19 9:27am View
   
i TRIED :
m_timeend.Create(WS_CHILD | WS_VISIBLE | DTS_RIGHTALIGN,CRect(10, 10, 200, 35),this, IDC_TIMEEND);

but it doesn't work
Member 14594285 14-Nov-19 6:06am View
   
I solved
Member 14594285 14-Nov-19 5:12am View
   
in that it used a derived class, but I want to know if I wrote fine
Member 14594285 14-Nov-19 5:06am View
   
I used debug and it pass for it..I don't understand
Member 14594285 28-Oct-19 12:23pm View
   
Deleted
thanks a lot, I solved
Member 14594285 28-Oct-19 12:23pm View
   
thanks a lot, I solved
Member 14594285 28-Oct-19 11:30am View
   
I wote:
void contare(vector<string> words)

{
ifstream ifile("C:\\Users\\Mio\\Desktop\\ciao.txt");

string word;

while(ifile >> word)
{
words.push_back(word);
}




}


int main()
{
vector<string> words;



contare(words);



but it doesn't works when I pass wors to contare
Member 14594285 28-Oct-19 11:03am View
   
yes but in this way I write always in a string, I wanto yo write only a word in vw[0], vw[1]...ecc..
Member 14594285 28-Oct-19 10:54am View
   
in my file there is written:
"ciao ciao ciao"

program prints only "c"
Member 14594285 28-Oct-19 3:24am View
   
what is "w"? when you write:
const auto & w : vw
Member 14594285 21-Oct-19 11:14am View
   
now it works, thanks
Member 14594285 21-Oct-19 11:13am View
   
my code it's the same of your and my result is 0.00, I don't see differences
Member 14594285 21-Oct-19 11:04am View
   
rend.Format(_T("%.2f", 46.71438243077313));
Member 14594285 21-Oct-19 10:56am View
   
my result is always 0.00
Member 14594285 21-Oct-19 10:07am View
   
the result is 0.00
Member 14594285 21-Oct-19 9:58am View
   
it doesn't work
Member 14594285 18-Oct-19 5:34am View
   
yes but with join I select all rows that have a correspondence, I want only a specific raw
Member 14594285 17-Oct-19 11:17am View
   
it doesn't work
Member 14594285 17-Oct-19 8:51am View
   
thanks
Member 14594285 11-Oct-19 11:55am View
   
maybe I understood, in my data_scanner there is also hour, I want to remove hour..maybe it's the problem, with hour there are datas all different
Member 14594285 11-Oct-19 11:47am View
   
ok
Member 14594285 11-Oct-19 11:35am View
   
now query works, but a question, when I write code to write my results in a list, I write:
recordset.GetFieldValue(_T("data_scanner"), dtScanner);
recordset.GetFieldValue(_T("somma"), lPezzi);
pLst->SetItemText(nProdotti, 1, strDataScanner);

but there isn't group by data..there is only list of dates
Member 14594285 11-Oct-19 10:46am View
   
now I removed space after SUM and there is an other error, "impossibile trovare l'oggetto desiderato"
Member 14594285 11-Oct-19 10:38am View
   
I wrote only this to try:
strQuery = _T( "SELECT SUM (pel_pezzi), data_scanner FROM PRODOTTI GROUP BY PRODOTTI.data_scanner ");
but it doesn't wotk, it says that in my database there the column SUM, I don't understand
Member 14594285 11-Oct-19 10:30am View
   
but it doesn't work, there is an error in my sintax
Member 14594285 11-Oct-19 10:29am View
   
I wrote:
strQuery = _T( "SELECT SUM (pel_pezzi) FROM PRODOTTI GROUP BY PRODOTTI.data_scanner");
if (CFG->m_bDataScanner)
{
strQuery.Append(bWhere ? _T("AND ") : _T("WHERE "));
strQuery.AppendFormat(_T("PRODOTTI.pel_data_scanner BETWEEN '%04ld-%02ld-%02ld %02ld:%02ld:%02ld' AND '%04ld-%02ld-%02ld %02ld:%02ld:%02ld'"),
CFG->m_dtScannerIni.GetYear(), CFG->m_dtScannerIni.GetMonth(), CFG->m_dtScannerIni.GetDay(), CFG->m_dtScannerIni.GetHour(), CFG->m_dtScannerIni.GetMinute(), CFG->m_dtScannerIni.GetSecond(),
CFG->m_dtScannerFin.GetYear(), CFG->m_dtScannerFin.GetMonth(), CFG->m_dtScannerFin.GetDay(), CFG->m_dtScannerFin.GetHour(), CFG->m_dtScannerFin.GetMinute(), CFG->m_dtScannerFin.GetSecond());
bWhere = TRUE;
}
Member 14594285 4-Oct-19 12:07pm View
   
yes I read about locale identifier, and it says that it's about language used
Member 14594285 4-Oct-19 8:45am View
   
I have already my dialog, it's static, id of my child dialog is IDCANCEL
Member 14594285 4-Oct-19 8:26am View
   
It doesn't work
I wrote in parent dialog:


CString str = _T("Test");
MyDlg2* pChildDlg = new MyDlg2(this);
pChildDlg->Create(IDCANCEL, this);

pChildDlg->ShowWindow(SW_SHOW);

//pChildDlg->SendMessage(UWM_CUSTOM, (WPARAM)&str, 0);
// Better
pChildDlg->PostMessage(UWM_CUSTOM, (WPARAM)&str, 0);
//dlg.DoModal();// TODO: Add your control notification handler code here


in child dialog:

BEGIN_MESSAGE_MAP(MyDlg2, CDialogEx)
ON_BN_CLICKED(IDC_BUTT_DIALOG, &MyDlg2::OnBnClickedButtDialog)
ON_MESSAGE(UWM_CUSTOM, OnCustoma)
END_MESSAGE_MAP()

and:
LRESULT MyDlg2::OnCustoma(WPARAM wparam, LPARAM lparam)
{
CString* pstr = (CString*)wparam;

//testo.SetWindowText(*pstr);
m_text.SetWindowText(*pstr);



return 0;
}

but it doesn't work
Member 14594285 4-Oct-19 6:01am View
   
I wrote:
MyDlg2 * pChild = new MyDlg2;

pChild->SendMessage(UWM_CUSTOM, (WPARAM)&stra, 0);

but when I do debug there is an error
Member 14594285 4-Oct-19 5:59am View
   
I tried but it doesn't work, my parent dialog has a button that when is clicked opens child dialog, I tried like you've wrote but it doesn't work
Member 14594285 4-Oct-19 5:41am View
   
so I must write.
MyDlg * pChildDlg = new pChildDlg;

pChildDlg->SendMessage(UWM_CUSTOM, (WPARAM)&str, 0);
Member 14594285 4-Oct-19 5:34am View
   
anyway I used ShowWindow(true) to show child dialog
Member 14594285 4-Oct-19 5:31am View
   
what is pChildDlg?
Member 14594285 4-Oct-19 4:16am View
   
so with this function I have the language used?
Member 14594285 2-Oct-19 11:22am View
   
ok..so column of database has a name..in this case is "ope_id", how can I get the name of the column of database?
Member 14594285 20-Sep-19 11:27am View
   
i tried :

BOOL CMFCApplication7Dlg::OnEraseBkgnd(CDC* pDC)
{
MSG* pMsg = new MSG;
// TODO: Add your message handler code here and/or call default
if (pMsg->message == WM_LBUTTONDOWN)
{
CRect rect;
GetClientRect(&rect);
CBrush myBrush(RGB(255, 255, 255)); // dialog background color
CBrush *pOld = pDC->SelectObject(&myBrush);
BOOL bRes = pDC->PatBlt(0, 0, rect.Width(), rect.Height(), PATCOPY);
pDC->SelectObject(pOld); // restore old brush
return bRes;
return CDialogEx::OnEraseBkgnd(pDC);
}
}

but it doesn't work..dialog open white before I click mouse
Member 14594285 20-Sep-19 11:22am View
   
I think I must write a similar thing:


BOOL CMFCApplication7Dlg::OnEraseBkgnd(CDC* pDC)
{
if (afx_msg == WM_MOUSEMOVE)
{
CRect rect;
GetClientRect(&rect);
CBrush myBrush(RGB(255, 255, 255)); // dialog background color
CBrush *pOld = pDC->SelectObject(&myBrush);
BOOL bRes = pDC->PatBlt(0, 0, rect.Width(), rect.Height(), PATCOPY);
pDC->SelectObject(pOld); // restore old brush
return bRes;
return CDialogEx::OnEraseBkgnd(pDC);
}

Can you help me?
Member 14594285 20-Sep-19 10:23am View
   
I mistake
Member 14594285 20-Sep-19 9:39am View
   
I solved, I didn't write cmfApplication::Display..
Member 14594285 20-Sep-19 5:33am View
   
I wrote my answers
Member 14594285 19-Sep-19 3:49am View
   
I solved
Member 14594285 18-Sep-19 12:20pm View
   
yes, but I saw that there isn't a function like QTimer::SingleSlot()
this method it's longer
Member 14594285 18-Sep-19 12:12pm View
   
Ok, link doesn't work
Member 14594285 18-Sep-19 11:48am View
   
Sorry but I have problem with link
Member 14594285 18-Sep-19 10:33am View
   
thanks
Member 14594285 18-Sep-19 10:02am View
   
single slot sorry
Member 14594285 18-Sep-19 9:40am View
   
when I click in the link it gave me an error
Member 14594285 18-Sep-19 6:16am View
   
thanks but I wanted an easier example because I'm a beginner..I wrote OnPaint in my derived class..and inside I want to write a code to change color of myu button
Member 14594285 17-Sep-19 11:19am View
   
I created a derived class from Cbutton, but if for example I want my button yellow, Must I use paint in my derived class?
Member 14594285 17-Sep-19 4:33am View
   
I solved, I used:
CButton *m_ctlCheck = (CButton*)GetDlgItem(IDC_CHECK1);

but I don't understand whats GetDlgItem do
Member 14594285 17-Sep-19 3:56am View
   
i WROTE:
if ((check1.IsDlgButtonChecked==BST_CHECKED) || (check3.IsDlgButtonChecked==BST_CHECKED))
text_check.SetWindowText(_T("check_multipli"));// TODO: Add your control notification handler code here
else
text_check.SetWindowText(_T("check2"));
}

but it's the same thing