|
Hi,
i have a Slider ctrl and im calling SetRange(1,3,TRUE) and when im trying to drag the slider from one position to the other ..ie OnHScroll(UINT nSBCode,UINT nPos,CScrollBar *pScrollBar) is called...
and in this if the nsBCode is SB_PAGEDOWN im always getting the nPos value is 0 eventhough the position of the slider is changed...and when the nsBCode is SB_THUMBPOSITION evrything works fine...
Please help me regarding the same...
|
|
|
|
|
p_1960 wrote: and in this if the nsBCode is SB_PAGEDOWN im always getting the nPos value is 0 eventhough the position of the slider is changed
MSDN says
For the TB_THUMBPOSITION and TB_THUMBTRACK notifications, the high-order word of the wParam parameter specifies the position of the slider. For all other notifications, the high-order word is zero; send the TBM_GETPOS ( GetPos ) message to determine the slider position. The lParam parameter is the handle to the trackbar.
|
|
|
|
|
can anyone please tell me how to create the message digest using openssl library in linux....
????
|
|
|
|
|
Looking at the documentation for MD5 in openssl[^], it looks like it's as simple as calling the MD5 function:
const char* msg = "This is my message";
unsigned char digest[MD5_DIGEST_LENGTH];
MD5(msg, strlen(msg) * sizeof(char), digest);
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanx man...
I did it but that method is a bit long using the evp.h
|
|
|
|
|
shrims4u wrote: that method is a bit long using the evp.h
Sorry - don't quite follow you there.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
As the title suggests I'm having a problem compiling MFC based applications, this problem started immediately after installing the windows server 2003 platform SDK and now even when I try to compile a new MFC project I get the following errors:
c:\program files\microsoft platform sdk\include\zmouse.h(141) : error C2146: syntax error : missing ';' before identifier 'HwndMSWheel'
1>c:\program files\microsoft platform sdk\include\zmouse.h(141) : error C2433: 'HWND' : 'inline' not permitted on data declarations
1>c:\program files\microsoft platform sdk\include\zmouse.h(141) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\zmouse.h(142) : error C2065: 'PUINT' : undeclared identifier
1>c:\program files\microsoft platform sdk\include\zmouse.h(142) : error C2146: syntax error : missing ')' before identifier 'puiMsh_MsgMouseWheel'
1>c:\program files\microsoft platform sdk\include\zmouse.h(142) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\zmouse.h(147) : error C2059: syntax error : ')'
1>c:\program files\microsoft platform sdk\include\zmouse.h(148) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft platform sdk\include\zmouse.h(148) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\microsoft platform sdk\include\commctrl.h(29) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
1>c:\program files\microsoft platform sdk\include\commctrl.h(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\commctrl.h(29) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier
1>c:\program files\microsoft platform sdk\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier
1>c:\program files\microsoft platform sdk\include\prsht.h(97) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft platform sdk\include\prsht.h(97) : fatal error C1903: unable to recover from previous error(s); stopping compilation
in some cases I solved the problem by including/moving windows.h and defining WIN32_LEAN_AND_MEAN at the top of stdafx.h. However for large projects that uses static and dynamic linking to other libraries the proposed solution did not work. I'm not really sure why this is happening as I've also tried to reinstall the platform SDK to no avail.
Any help is appreciated.
Thanx 
|
|
|
|
|
Check the vc++ directory settings( Tools->options->vc++ directories ) of visual studio. if it contains path from SDK folder, remove it.
|
|
|
|
|
I would if I don't want to use the SDK...
|
|
|
|
|
Whats is that SDK 2003 has and VS 2005 dosen't...?
|
|
|
|
|
I need to use Icftypes for firewall controlling which is only available in platform SDK 
|
|
|
|
|
Well in that case you have to download the latest SDK
|
|
|
|
|
I would try a repair/reinstall of VS 2005 through Add/Remove Programs.
The platform SDK installer can change some paths or configurations and it may be faster to just do the repair than to try to track down a few changes.
|
|
|
|
|
hi all,
i want to convert bstr to chra[];
eg:- char a[256];
BSTR bstr=L"hello";
i want hello into a
thank you
|
|
|
|
|
|
|
ashish8patil wrote: BSTR bstr=L"hello";
Please never do this.
Read the article suggested by Rajesh (or BSTR documentation [^]) to discover why.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hello all,
I am making client server application in which
1)On client side it search required update for PC then make its list and send it to server.
2)On server side it is downloading respective file for updates from its url and storing on server.
till this point I done it.
3) Now I want to install that update on client machine how should I install it, please help me.
Thank You,
ashish p.
|
|
|
|
|
Hi!
I have ATL Webservice (SOAP or DIME Webservice ) already hosted on IIS.
IT is perfectly working from past 10 years. no issues.
Already we are using SOAP SDK on client side.
Now We need to use MTOM on client. Actually All our components are in C++ with out .net framework.
I need a solution to use MTOM on C++ without .net framework.
Please suggest me
|
|
|
|
|
gSOAP[^]?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I wonder if someone can help me understand why, when I made changes to the following code worked (more like, gave me the result that I wanted) and if I did something wrong which can come back to haunt me later on (don't bash me )
Original Code:
CFileDialog fOpenDlg(true,NULL,NULL,NULL,_T("All Files (*.*)|*.*||"),this);
CString fName = NULL;
string name;
fName = fOpenDlg.GetFileName();
name = fName;
Error: error C2679: binary '=' : no operator found which takes a right-hand operand of type 'CString' (or there is no acceptable conversion)
now the Modified Code (not the final one):
CFileDialog fOpenDlg(true,NULL,NULL,NULL,_T("All Files (*.*)|*.*||"),this);
CString fName = NULL;
string name;
fName = fOpenDlg.GetFileName();
name = *fName;
Observation: if I open a file named test.txt fName gets set to test, and name gets set to t
Final code (giving me the result I wanted, discovered accidentally while applying it elsewhere):
CFileDialog fOpenDlg(true,NULL,NULL,NULL,_T("All Files (*.*)|*.*||"),this);
CString fName = NULL;
string name;
fName = fOpenDlg.GetFileName();
name = (fName+"");
Observation: now if I open a file named test.txt, fName gets set to test, and name ALSO gets set to test. I've been wondering how that +"" changed the behavior
Thanks
|
|
|
|
|
Are you doing a Unicode or an ANSI build?! This works for me, and I am doing a Unicode build.
std::wstring cppStr;
CFileDialog cfd(true);
if(cfd.DoModal()==IDOK)
{
cppStr = cfd.GetFileName();
wcout<<cppStr.c_str();
}
I hope you can figure out your mistakes.
Also, I don't understand why do you need to use std::string if you're already using MFC. Why not use CString ?!
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
oh, i do do a "DoModal()==OK", I thought it didn't concern with the reason the strings behave (which I guess is what I wanted to know). and you are saying I don't need to use std::string with MFC eh? hmm... interesting point, I was basing that part of my code on basic- opening files, loading the data into buffer, copying the data into another file sort of operations. btw, on a new note, how does working with MFC change the need to use different types of variables (in this case, work with CStrings and not with CStrings and std::strings)?
thanks for the patience mate
p.s. oh there's another part of my code which isn't working (based on the examples I read on CFileDialog examples. I wanted to set the default directory to my C: drive when I click the Open button. my code for it is:
fOpenDlg.m_pOFN->lpstrInitialDir = (LPCWSTR)("C:");
which doesn't seem to be working... again im guessing on the way strings behave? (boy my string concepts are weak )
|
|
|
|
|
You can even write inline assembly to manipulate everything. But the question is: Do you really need to do it, given that you're already using a framework which makes things much more simpler?
I am saying that you should not be using std::string in an MFC program. But given that CString does everything that you need to, I simply fail to see any justification for using std::string. (OK, you're manipulating files? Then you could use CFile or CStdioFile or ...).
And why do I use MFC when I can do everything with vanilla C or C++? Because I'd like to leave for home at 5.
I may use something like an std::string within an MFC program very rarely (may be I'm using some third party code and a function expects a reference to an std::string, or whatever)...
sadman89 wrote: drive when I click the Open button. my code for it is:
You are again providing code in bits and pieces. That works for me and I can't tell you why it didn't work in your case unless I can see the whole of your code (relevant code, please).
See if this helps:
CFileDialog cfd(true);
CString szStr;
cfd.m_pOFN->lpstrInitialDir = _T("C:\\");
if(cfd.DoModal == IDOK)
{
szStr = cfd.GetFileName();
AfxMessageBox(szStr);
}
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|