15,890,506 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 10307999 (Top 29 by date)
Member 10307999
19-Nov-15 1:49am
View
Thank you, Kreskowiak! Your explanation let me understand more clearer!!
Member 10307999
18-Nov-15 23:02pm
View
MacCutchan, Thanks for your reply and it give me a inspiration! Finally, I set the path of the ActionLog.txt to C:\ProgramData and it works!! Thank you again!!
Member 10307999
18-Nov-15 21:36pm
View
Deleted
MacCutchan, Thanks for your reply! Could you explain more clearer? Thank you!!
Member 10307999
17-Mar-15 23:12pm
View
Thanks Holguin for your reply!
But I can't understand absolutely...
Would you please revise my code or show another sample example to me?
So appreciated!
Member 10307999
24-Nov-14 22:06pm
View
Many thanks :)
Member 10307999
18-Nov-14 23:07pm
View
Hi Lancaster,
Thanks for your reply! I've research the essay you posted, and I can encrypt & decrypt a CString like:
[Head file]
CCrypto crypto;
CByteArray arBytes;
[cpp file]
void CEncryptionDlg::OnBnClickedButton_Encrypt()
{
crypto.DeriveKey(_T("ABCD"));
CString sPassword=_T("Hello");
crypto.Encrypt(sPassword,arBytes);
}
void CEncryptionDlg::OnBnClickedButton_Decrypt()
{
CString strDecrypted;
crypto.Decrypt(arBytes, strDecrypted);
MessageBox(strDecrypted, _T("Notify"), MB_OK);
}
And then, I want to save the sPassword but the type of data is CByteArray between the encrypt() and decrypt().
If I want to save the CByteArray in a txt file, I gotta transform into CString.
It failed it...
my code:
[Head file]
CCrypto crypto;
CString sContent;
[cpp file]
void CEncryptionDlg::OnBnClickedButton_EncryptString()
{
crypto.DeriveKey(_T("ABCDEF"));
CString sPassword=_T("Hi");
CByteArray arBytes2;
crypto.Encrypt(sPassword,arBytes2);
CString str2(arBytes2.GetData()); //CByteArray to CString
sTest=str2;
}
void CEncryptionDlg::OnBnClickedButton_DecryptString()
{
CByteArray byteArr;
//CString to CByteArray --- start
BYTE *pByteArray = (PBYTE)(LPCTSTR)sTest.GetBuffer();
byteArr.SetSize(sTest.GetLength());
memcpy(byteArr.GetData(), pByteArray, sTest.GetLength());
//CString to CByteArray --- end
CString sDecrypted;
crypto.Decrypt(byteArr, sDecrypted);
MessageBox(sDecrypted, _T("Notify"), MB_OK);
}
But the sDecryprted is NOT "Hi" I want to get :(
Could someone give me some suggestions?
Thanks!!!
Member 10307999
5-Nov-14 5:13am
View
Thanks for your suggestion! I finds my question!! So appreciated for your help!!!
Member 10307999
5-Nov-14 0:56am
View
Thanks for your reply!
Sorry! I don't specify exactly.
In local machine, I can download the correct file from the server first time.
If the file changes the content, I CAN'T update the correct file again in local machine.
in local machine, it will produce the oldest file which is I first download, if I press the GetFile button afterwards.
Thanks!
Member 10307999
4-Mar-14 22:41pm
View
I think whether I can call a existing program through lpName(in my case, it's the "Test program")?
But I cannot find the relative functions...
Member 10307999
4-Mar-14 21:19pm
View
Dear du[DE]:
Thanks for your response, but I still don't have a idea...
Would you specify it concretely?
Thank you!!
Member 10307999
9-Dec-13 22:33pm
View
I'm so sorry for spending your a lot of time.
I have tried what you taught me. However, it's similar like the SetRedraw().
Furthermore, I find a new thing(maybe it's the real problem for this case) when the application run and I opened the explorer.exe(ex. any folder), the application became abnormal display, too.
Is there any notification can retrieve the event?
In addition, if you will, I can sent my code for you.
Thank you!
Member 10307999
9-Dec-13 4:24am
View
I try it:
void TabDlg::OnActivate(UINT nState,CWnd* pWndOther,BOOL bMinimized )
{
switch(nState)
{
case WA_CLICKACTIVE:
case WA_ACTIVE:
case WA_INACTIVE:
{
m_tab.SetRedraw(true);
}
break;
default:
break;
}
CDialog::OnActivate(nState,pWndOther,bMinimized);
}
, but the abnormal display was still alive :(
Only when I clicked the application anywhere, the display became normal
(by WA_CLICKACTIVE).
Did I miss something@@?
thanks!!
Member 10307999
8-Dec-13 9:28am
View
I have read the WM_ACTIVATE form your link, but I still don't understand how to use it...
Would you teach me how to use it, maybe a easy example, please.
Thanks for your help!!
Member 10307999
6-Dec-13 2:36am
View
Thank you, SA!! there methods can solve the abnormal Tab.
Because I don't know when the user redraw the desktop of OS(I guessed what causes the abnormal), I scanned the application by OnTimer function (0.5 sec),
but it let my application glistened.
I only wanted to redraw the Tab Page, so I used the SetRedraw() to reduce the redraw area,
but it still glistened obviously T_T
I think if there is a function that could judge the desktop of OS has redraw, and then I can SetRedraw() if the OS has redraw.
Thanks a lot!!
Member 10307999
5-Dec-13 20:56pm
View
Deleted
Yes,that's situation happened in my application.
How can my solve this problem?
Thank you!!
Member 10307999
5-Dec-13 20:42pm
View
Deleted
Yes,that's situation happened in my application.
How can my solve this problem?
Thank you!!
Member 10307999
5-Dec-13 20:41pm
View
Yes, you are right!
That situation happened in my application!
How can I solve this problem?
Thank you!
Member 10307999
5-Dec-13 0:46am
View
thanks for your reply again!
Sorry, I don't know what the "half-hide" is,
so I can't understand what you said in step2.
Could you illustrate clearly?
Appreciation!!
Member 10307999
4-Dec-13 4:28am
View
I tried the test which you said, and it's normal. The abnormal display appears only if I press Ctrl+Alt+Del or opened the another application with UAC. I don't know why...
Member 10307999
4-Dec-13 3:35am
View
Deleted
Thanks for your reply, Cherednik!
1.I created the two class CTabPage1 & CTabPage2 for the two sub-dialogs respectively.
And then I declared
CTabCtrl m_tab;
CTabPage1 m_page1;
CTabPage2 m_page2;
in the class CtabDlg : public CDialog (by the way, CtabDlg is my project).
2.Even though I used the another way to create the page, like:
m_page1.Create(IDD_DIALOG1, &m_tab);
m_page2.Create(IDD_DIALOG2, &m_tab);
But the problem don't disappear...Q_Q
Member 10307999
4-Dec-13 3:17am
View
thanks for your reply, Kryukov! I have tried the way which you said, and I found it will happen in Ctrl+Alt+Del, too... But the other cases didn't abnormal@@
Member 10307999
9-Nov-13 7:41am
View
Thank you,merano.
I will study it!!
Member 10307999
6-Nov-13 9:24am
View
Very thank you, Beyer!!
I can change the color by your method!
But the style became very traditional@@
Like this image http://ppt.cc/iAUU
(I compared the ProgressBar before and after Using the SetWindowTheme)
Is it normal?
I want to know whether or not I can keep the normal style, and just change the color.
I'm so sorry that it spent you so much time >_<
Thanks AGAIN!!
Member 10307999
5-Nov-13 9:05am
View
Mr.nv3, you let me learn a lot about that!
Thank you, too!!
Member 10307999
5-Nov-13 8:58am
View
Thanks for your reply, Beyer!
I have linked the uxtheme.lib and include the uxtheme.h in my xxxDlg.cpp,
and want to add the SetWindowTheme funtion in CxxxDlg::OnInitDialog().
but I created the ProgressControl by Wizard. There was not handle.
How can I create the handle about ProgressControl?
Thank you :)
Member 10307999
4-Nov-13 9:43am
View
Thanks for your reply, merano!
I have added the code you wrote in my code,
and in the CMyApp::InitInstance(), I use your code instead of the original code:
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
But the bar is still green... Did I miss something?
Thank you!!
Member 10307999
4-Nov-13 9:29am
View
Thanks for your reply, Beyer!
So the manner cannot use in MFC, right?
>_<
Member 10307999
4-Nov-13 9:29am
View
Thanks for your reply again!
Member 10307999
3-Nov-13 7:34am
View
Thanks for your reply, Wombaticus!
But I don't know where the Application.EnableVisualStyles is.
Is it a code or attribute of Progress Control?
Thank you!!
Show More