|
W2A
ddddddddddddddddddddd
|
|
|
|
|
I have a class written in WTL 7.0 but I want to use it in my MFC application.How can i do that. The class use WTL CString but I think it isn't recognized in MFC
I tried to add the class into my project but I got the following code when I conpiled:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Can you help me?
Thanks a lot!
|
|
|
|
|
That depends on what WTL features it uses. WTL::CString is a clone of MFC::CString so that won't be a problem to drop it into an MFC project. If it uses windowing classes, it will depend on whether it's a stand-alone control (like say CHyperLink ).
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
hi all,
i want to pass a struct parameter ,but i don't known what data type i should use for my custom struct,thank you!
Any help would be greatly appreciated!
|
|
|
|
|
I think SAFEARRAY can be used here.
Have a great day ahead!
Regards,
Sohail Kadiwala
(My Blog - http://blogs.wdevs.com/sohail/[^])
modified 21-Apr-21 21:01pm.
|
|
|
|
|
hi Sohail Kadiwala,
thanks for your help,the problem has been solve d, i'm thank you very very much!
|
|
|
|
|
you can convert pointer to long ,and convert to former pointer after passed
ddddddddddddddddddddd
|
|
|
|
|
A new Java-like framework has just been released by SwingC.com.
SwingC is a great UI framework that can be used in place of MFC, or any other GUI framework. It has a java-like syntax, and works flawlessly.
|
|
|
|
|
|
Al Baraki wrote: A new Java-like framework has just been released by SwingC.com.
HeartFriend wrote: where can i get it?
|
|
|
|
|
<quote>
How You Can Use SwingC.
You have, subject to the terms and conditions of this Agreement, a non-exclusive, non-transferable personal license to use the Software for your own Non-Commercial Purposes.
"Non-Commercial Purposes" means use of the Software by an individual for publishing that does not directly or indirectly support any commercial efforts. Use of the Software for any purpose by any non-individual entity, including but not limited to any commercial entity, corporation, non-profit organization, educational institution, governmental body or group, is not permitted under this Agreement. If you wish to use this software in commercial applications, we offer a commercial license for that purpose.
Agnitech reserves the right to determine whether your use is for a Non-Commercial Purpose. Agnitech owns all rights, title and interest in and to the Software, including all intellectual property rights, and reserves all rights to the Software not expressly granted in this Agreement.
|
|
|
|
|
I have created ATL Composite control in VC++, it is running fine from Activex control test container. I have created a VB client program for the control it is running fine if i press F5 inside VB. but when I generated a .exe file of the vb program it generates an assertion.
assertion details:
if (m_spInPlaceSite->GetWindow(&hwndParent) == S_OK)
{
m_spInPlaceSite->GetWindowContext(&spInPlaceFrame,
&spInPlaceUIWindow, &rcPos, &rcClip, &frameInfo);
if (!m_bWndLess)
{
if (m_hWndCD)
{
ShowWindow(m_hWndCD, SW_SHOW);
if (!::IsChild(m_hWndCD, ::GetFocus()))
::SetFocus(m_hWndCD);
}
else
{
HWND h = CreateControlWindow(hwndParent, rcPos);
</code><FONT color=red>ATLASSERT(h != NULL); </font><code>
ATLASSERT(h == m_hWndCD);
h;
}
}
pIPO->SetObjectRects(&rcPos, &rcClip);
}
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!
Program: D:\Work\vbtemp5\Debug\Project1.exe
File: c:\program files\microsoft visual studio\vc98\atl\include\atlctl.h
Line: 842
Expression: h != 0
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
|
|
|
|
|
Hi,
ASSERTS are part of Debug builds. Are you mixing Debug and Release (from VB's perspective) versions?
Jeff
|
|
|
|
|
though it doesn't been covered.
|
|
|
|
|
|
i use AtlAxCreateControlEx to create a flash activex control and attach it to m_wndChild. I can receive the IUnknown of the created control, but how can i get the hwnd of this control?
code like this:
AtlAxCreateControlEx(
wszClsid,
m_wndChild.m_hWnd,
NULL,
NULL,
&m_spControl,
Flash::DIID__IShockwaveFlashEvents,
(IUnknown*)(IDispEventImpl<1, CFlashWindow, &Flash::DIID__IShockwaveFlashEvents, &Flash::LIBID_Flash, 1, 0>*)this
);
-- modified at 3:41 Monday 10th October, 2005
|
|
|
|
|
hi
i m new to the atl i want to know would i need to install extra software for the atl programming in visual c++6 or 7. and if its documnetation or help is present in the msdn2004. like mfc help present is msdn
ddd
-- modified at 4:11 Friday 7th October, 2005
|
|
|
|
|
tasleem143 wrote:
i m new to the atl i want to know would i need to install extra software for the atl programming in visual c++6 or 7.
No.
tasleem143 wrote:
and if its documnetation or help is present in the msdn2004. like mfc help present is msdn
Yes.
Kevin
|
|
|
|
|
Anyone know of a good book covering Boost?
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
|
Hello,
I just switsched from C++ 6.0 to VS .NET, and some code that compiled before does not compile any more:
CString cNum = "123";
unsigned short* ss;
DWORD dwRet = (DWORD)wcstod(cNum.GetBuffer(0),&ss);
error C2664: 'wcstod': conversion of parameter 1 von 'ATL::CSimpleStringT<basetype,t_bmfcdll>::PXSTR' into 'const wchar_t *' impossible
What do I have to do? I do NOT want to use the .NET framework nor ATL, only MFC? I suppose I have to switch some compiler parameters?
Thanks a lot!
Martin
|
|
|
|
|
Assuming you're doing a Unicode build, the GetBuffer() call is unnecessary. The first param to wcstod() is a LPCWSTR , and CString has a conversion operator that will be called automatically.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
Ford, what's this fish doing in my ear?
|
|
|
|
|
Thanks a lot, due to your answer i was able to get the code compiling now. I thought new .NET projects were unicode by default, as i could not find a switch. but now i found it and it works fine.... i appreciate it very much, thanks....
Martin.
|
|
|
|
|
Although you already have an answer to the CString -related issue, I note that you are using wcstod(...) instead of wcstoul(...) .
I could understand if you might be handing strings that contain values in the higher ranges of the double type, but you are truncating them via the cast to DWORD ...
Passing an unsigned short type as the second parameter to the wcstod(...) function might be technically incorrect now, too; it should be wchar_t , as wchar_t is (can map to) a native type in VC++ .Net and above (see __wchar_t for details).
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hi,
hope somebody can help me with this question:
I'm writting a BHO that needs to be aware of user actions with mouse in explorer window. Most of the work is done easily using elementFromPoint to retrieve html element under current cursor position. However I've got a hard time with combo boxes within the page. I cannot find a way of getting what the user has selected (expanding the menu and clicking on an item).
Messing around with spy++, I found out that whenever a selection is made, the TridentCmboBx class receives a CB_GETCURSEL request and responds with the actual selection. Which is exactly what I need. However this is not sent to Explorer_Server class, nor any other explorer window I can track through spy.
So what I'm asking is, does anybody have any more info on this? MSDN states vaguely that the msg is sent to "interested application".
I guess another solution would be to hook/subclass the combobox to get the messages my self, but if there's a page with many combos then its hard whereas if the msg is sent to a window i already watch like Explorer_server this would save me the trouble.
Thanks in advance.
petevam
|
|
|
|