|
I checked my Administrator has Full right Access. But Still i could not delete the registry Key that i Mentioned.
|
|
|
|
|
|
I have my custom listview control:
dwStyle = WS_CHILD|WS_VISIBLE|WS_BORDER|CBS_DROPDOWN;
When I am using mouse to select value in combobox, dropdown is just closed (but combobox is not destroyed) and CBN_SELENDOK meessage is not send.
Does anyone knows why ?
|
|
|
|
|
Where and how did you try to process the message?
I ask because the message is send to the parent of the combo box. If you want to handle the message by your combo box class you can use message reflection:
BEGIN_MESSAGE_MAP(CMyComboBox, CComboBox)
ON_CONTROL_REFLECT_EX(CBN_SELENDOK, OnCbnSelendok)
END_MESSAGE_MAP()
BOOL CMyComboBox::OnCbnSelendok()
{
return FALSE;
}
|
|
|
|
|
actually it is so
m_editData.hwndEdit = CreateWindowEx(0,
_T("COMBOBOX"),
_T(""),
dwStyle,
rect.left, rect.top,
rect.right-rect.left, 150,
hwnd,
0,
m_hInstance,
0);
and then
m_editData.defEditWndProc = (WNDPROC)SetWindowLongPtr(m_editData.hwndEdit, GWLP_WNDPROC, (LONG_PTR)MCLV_EditCtrlWndProc);
SetWindowLongPtr(m_editData.hwndEdit, GWLP_USERDATA, (LONG_PTR)this);
so it has its own handling
|
|
|
|
|
So you are not using MFC and can not use the MFC message reflection.
Then you must handle the message (WM_COMMAND , CBN_SELENDOK in high order word of WPARAM , combo box window handle in LPARAM ) in the window procedure of your m_editData window because that is the parent of the combo box.
Your MCLV_EditCtrlWndProc() function set for the combo box window will not receive the message.
|
|
|
|
|
You were right parent should pass that message...
|
|
|
|
|
I am trying to compile a chunk of C++ code on VS 2008.
I keep experiencing the LNK2001 error about the symbol _recalloc, for unknown reasons.
I know the warning means that some library is missing , but this is not the case. I put in the right #include
(which is , according to MSDN, both <stdlib.h> and <malloc.h>), I specified the path to atlsd.lib (which seems to be the library the linker looks for when operating), I even added the library to the additional dependencies on the linker configuration but nothing seems to change.
This is my first time using C++ on VS .net ( I have been using VC++ 6.0 previously), so I sure lack experience and knowledge , but I start wondering whether switching to .net wasn't a bad mistake .....
Any idea ?
thank you
|
|
|
|
|
I'm not sure exactly what you are doing here (it does not sound like you are creating a .NET program), but the _recalloc() function is defined in the standard C library. I just added a call into a small C++ program and the linker did not need any extra library definitions to find it. Maybe you need to give a few more details about your code.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
You are right Richard my post was not clear, I am going to explain . I wrote a small program which uses the CA2X () conversion class (need to turn ascii strings to unicode).
The linker error I get shows in the detail that the method ATL::AtlConvAllocMemory() , which calls _recalloc() , is the source of the error.... since , this method is contained in "atlsd.lib" (I suppose) that's why I mentioned it ... The method ATL::AtlConvAllocMemory() is in turn called by CA2X(), hence the error.
Now, I am wondering what can be wrong since I included everything MSDN is asking me for, both header and .lib files .
I have atlbase.h and atlconv.h in right places, and both malloc.h and stdlib.h are included beforehand.
But whatever I try to change, it seems the outcome doesn't change.
I am quite clumsy with this environment, I had experiences in c# and minor ones in vb .net , other than VC++ 6.0 so I am new at this .... I am not quite sure but I guess I am not using the framework here, that is I am compiling to native code, since I can't find the /clr switch anywhere in the settings (but , as I told you, I am not sure ....).
Thank you for answering
|
|
|
|
|
tiwal wrote: I have atlbase.h and atlconv.h in right places, and both malloc.h and stdlib.h are included beforehand. That is not relevant to the problem; header files are used by the compiler to convert source code into object code. Your problem is within the linker phase combining the object files, when references to functions that exist in system libraries are not being found. Under normal circumstances when you create a project in one of the Microsoft IDEs the system and common libraries are automatically included. You need to look at the linker properties of your project to see that the 'standard' libraries are being included.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
.lib standard files are all included in the linker settings . More, I manually included (though I don't think it was really needed) the atl lib file in the linker settings ,as well as the path to it . But what leaves me baffled is that, it seems that the object code of a standard function like _recalloc() can' t be found anywhere in the standard libraries.
|
|
|
|
|
I can only assume it is something to do with using ATL or your project settings. I coded a very simple program that made a call to _recalloc() and it found it in the standard MSVCRT100 library without me having to add anything to the project's properties.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i tried to change the settings in every possible configuration, playing with the Atl and Mfc use switches ... all I could get is different methods involved, but always errors LNK2001 and LNK2019, always from methods relating to Atl. This smells like an environment flaw ....
|
|
|
|
|
The only thing I can suggest is to try creating a new project and seeing if that builds successfully.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I set up a minimal application which just uses CA2WEX,, and I kept getting the same errors.
Then, I eliminated the CA2WEX and substituted that with an explicit LPWSTR variable .. this, as I expected, eliminated all the Atl errors.
What I didn't expect though (well, almost..) was another error: "internale Error during IncrBuildImage" (LNK1000).
After that, a popup appeared stating that the linker had stopped working .... this sounds quite hilarious to me .... ))
|
|
|
|
|
Sorry, but I have no real idea of what is going on, and cannot understand what it is about your VS setup that is causing the problems.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
A couple of seconds ago, I just eliminated the "atlsd.lib" library from the Additional Dependencies ... though I have a "ImageList_Create()" call that, according to MSDN, requires the library "ImgCtl.lib", this library doesn't seem to be anywhere. So I just added "comctl32.lib", and everything linked correctly .
Please don't ask me why, since I did the same thing at the beginning and it didn't work ...
I just ask myself if I can really trust this environment.....
Thank you anyway for the support.
|
|
|
|
|
The environment is fine, but you seem to be using some strange libraries. For example, look at the documentation for ImageList_Create() [^], there is no mention of ImgCtl.lib; what documentation are you working from?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I am using MSDN for VS 2008 ... actually when looking at ImageList_create(), I didn't realize I was reading the Windows CE 5.0 documentation, which includes "ImgClt.lib". Just trying I realized comctl32.lib is enough. Anyway the real problem seems to have been my inclusion of atlsd.lib, which I did when I realized the _recalloc() couldn't be linked. I don't know what changed but now it seems to be ok ... anyway I keep having serious doubts about the reliability of the environment , since more than once , building twice the same application without making any change between builds, I got different and contrasting results ...
|
|
|
|
|
There are probably millions of people around the world using Visual Studio to build their applications. If there was such a fundamental flaw in it then I think it would have been brought to Microsoft's attention by now. I have used the express versions (2005, 2008 and 2010) and never come across anything even vaguely resembling your problem. But if you are trying to include CE libraries into a standard desktop application it's little wonder that things are looking strange.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Well I agree with you .... even though , there are tons of people who see such strange things and never report to Microsoft ... and most of them don't even dare thinking there's a problem ... .... Anyway , I don't think what I saw, that is , those two differents results with two builds of the same version, can be caused by any programmer's error....
|
|
|
|
|
tiwal wrote: I don't think what I saw, that is , those two differents results with two builds of the same version, can be caused by any programmer's error Don't you believe it. I've had many more 'strange' problems that were caused by me, than were caused by Visual Studio.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I want to develope web service in c++ (.net 2003).
i have no idea to do it please guide me
|
|
|
|
|
Start here[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|