|
|
Thank you!!
That is just what I need!.
I have found some handles which are associated with registry key operations.
thanks very much again.
Takanobu Maekawa
|
|
|
|
|
hi
I write a program, and I want my program cannot not be kill by TaskManager, same easycafe. But I don't know the way to do this.
When i choose client.exe (exe file of easycafe) and click End Process, the process still run.
|
|
|
|
|
You could write the program as a service so that it'd run under the SYSTEM account and then you couldn't kill it without admin privillages.
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Hi. I want to call, from an application made with Visual C++, Excel or Matlab so that one of both could represent a mathematical function. How can I do that?. Someone can help me?
|
|
|
|
|
|
I want to make some form.
It's properties are : alway on top, transparency and NOT CLICKED.
ur...what I means is: the window look like a translucent glass.
well, another word, a concept like the 'layer' of the Photoshop.
(sorry, my english level is very~~ low... )
Does this form is possible? and how?
:: the major point is 'never clicked'
thanks!
|
|
|
|
|
Hi There,
Does anybody know if there is a way that you can prevent a
CSplitterWnd from resizing? For example if user's mouse is on
the CSplitterWnd border, the icon should not change and the user
should not be able to make the window smaller or bigger.
Second question, if you have a couple of nested CSplitterWnd's,
how can you show and hide a specific CSplitterWnd?
I would appreciate it very much if any one could help me
on these questions.
Thanks
Gerhard
|
|
|
|
|
hello guys,
I need in one of my dialogs a combobox with the directory tree of the PC.
You know, like the one you see in the open-file dialog of VC Studio ( the "Look in" combo)..
Is there an easy method to accomplish this?
or will I need to querry for the directorys myself and set icons etc....
Any advice welcome,
thx
Davy
|
|
|
|
|
Do you mean something like the CB_DIR message?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
I would like to know if I can I add a CButton to a CScrollView?
If so, how can I do it or is there some sample.
Regards,
Magnus
|
|
|
|
|
Doubtful, but you can add one to a CFormView , which is derived from CScrollView .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Great!
A CFormView was just what I needed!
Thanks,
Magnus
|
|
|
|
|
hi all,
i am getting this error
error LNK2001: unresolved external symbol "public: __thiscall CMyCrypto::~CMyCrypto(void)" (??1CMyCrypto@@QAE@XZ)
<br />
<br />
class CMyCrypto {<br />
...<br />
CMyCrypto(LPTSTR lpPassword, ALG_ID algorithm);<br />
~CMyCrypto();<br />
<br />
BOOL Encrypt(LPBYTE pData, LPDWORD pdwDataSize, <br />
DWORD dwBufferSize, BOOL bFinal);<br />
BOOL Decrypt(LPBYTE pData, LPDWORD dwDataSize,<br />
BOOL bFinal);<br />
<br />
...
why is this error?
thank you
mani kanth
|
|
|
|
|
~CMyCrypto(); This line declares, not does not define, the destructor of CMyCrypto . If this class is yours (i.e. you have written it) than you'll have to supply the destructor. Possibly a do-nothing destructor will do:
class CMyCrypto {
...
~CMyCrypto()
{
}
Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I want to display the % completed on top of my progress bar.
I was looking around on here and found what seems to be the perfect solution:
http://www.codeproject.com/miscctrl/text_progressctrl.asp
HOWEVER:
That was last updated in VC++ 6.
I'm using VC++ 7 (aka VC++ .NET), and it won't compile it.
There's something wrong with the message map handlers (in that thier typing is incorrect somehow) but I can't figure out for the life of me how to fix it.
I have a fair ammount of C/C++ experience but only 2 weeks of Visual C++ and MFC experience (!) so I'm not entirely sure on all the Microsoft defined types etc.
The other thing that's throwing me is that these are (possibly) scope errors, and so far as I can see the function definitions and declarations are in scope.
Here's an example of what I'm getting:
<br />
c:\Documents and Settings\xxxxxx\Desktop\progress temp\TextProgressCtrl.cpp(158) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CTextProgressCtrl::* )(WPARAM,LPTSTR)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'<br />
None of the functions with this name in scope match the target type<br />
That is generated from the following member function/function call.
PLEASE NOTE THAT THE FUNCTION IS DECLARED PRIVATE! But this shouldn't matter because the message map is in the .cpp which is within scope of private for that class, right?
Message map (in .cpp)
ON_MESSAGE(WM_GETTEXT, OnGetText)
Definition (in .cpp)
LRESULT CTextProgressCtrl::OnGetText(WPARAM cchTextMax, LPTSTR szText)<br />
{<br />
if (!_tcsncpy(szText, m_strText, cchTextMax))<br />
return 0;<br />
else <br />
return min(cchTextMax, (UINT) m_strText.GetLength());<br />
}<br />
Declaration (in .h)
afx_msg LRESULT OnGetText(WPARAM cchTextMax, LPTSTR szText);<br />
Any help very much appreciated.
|
|
|
|
|
I think the problem is due to stricter type checking in .NET version of MFC: the message handlers must have the right signature, which is not the case for CTextProgressCtrl::OnSetText and CTextProgressCtrl::OnGetText . I've made the following changes and things seem to work:
...
afx_msg LRESULT OnSetText(WPARAM, LPARAM);
afx_msg LRESULT OnGetText(WPARAM, LPARAM);
...
LRESULT CTextProgressCtrl::OnSetText(WPARAM, LPARAM lParam)
{
LPCTSTR szText=(LPCTSTR)lParam;
LRESULT result = Default();
if ( (!szText && m_strText.GetLength()) ||
(szText && (m_strText != szText)) )
{
m_strText = szText;
Invalidate();
}
return result;
}
LRESULT CTextProgressCtrl::OnGetText(WPARAM cchTextMax, LPARAM lParam)
{
LPTSTR szText=(LPTSTR)lParam;
if (!_tcsncpy(szText, m_strText, cchTextMax))
return 0;
else
return min(cchTextMax, (UINT) m_strText.GetLength());
} Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks for your reply, I'll definately give that a go.
I came up with my own solution in the end but it's rather dirty and doesn't catch certain events (like the window going being brought to the foreground from behind another window). I was just painting the text onto the progress bar when I needed to update it and in the onpaint function, using a combination of clipping areas and DrawText.
|
|
|
|
|
Hi all,
I am trying to reterive the OCX properties such as string name,index value through HWND of third party applications.Could any one please help me to solve this issue.
Thanks,
Mohan
mohan@tek.com
|
|
|
|
|
when i want to import library - do i have to write all the path?
the reason i asked this question is because i use the
WSALookupserviceBegin() function,so i included the "winsock2.h"
and in Project->Settings->Link tab i added this path:
C:\Program Files\Microsoft Visual Studio\VC98\Lib\Ws2_32.Lib
but i get this message:
LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj'
also,i forgot to say that i'm developing in embedded visual c++,
but it's not working on visual c++ too.
thanks again,eli.
|
|
|
|
|
No, you only need to write the lib file name. Alternativley you can also try following line after #include.
#pragma comment(lib, "Ws2_32.lib.lib")
I have only tried this on VC++, not embedded one.
Arsalan Malik
|
|
|
|
|
Thanks,i will try this...
|
|
|
|
|
I’m successfully manage to run the zipprogram gzip.exe programaticly like this:
<br />
ShellExecute( NULL, "open", "C:\\gzip.exe", strParam, "C:\\Program Files\\Ceco", NULL ) ) )<br />
How do I after this call wait until gzip.exe has returned. (The file that gzip.exe creates do I want to rename.)
_____________________________
...and justice for all
APe
|
|
|
|
|
I would recommend a read of
http://www.codeproject.com/system/newbiespawn.asp
But it would be something like
(Code Taken from the article above)
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "c:\\MyProgram.exe";
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
Regards
Darren
|
|
|
|
|
Another good article is
http://www.codeproject.com/threads/asyncprocnotify.asp
Hope it helps
Darren
|
|
|
|