what did the error mean?how can i correct it?

HWND dlgHwnd = NULL;
dlgHwnd = FindWindow(_T("CSessionNotifyDlg"),NULL);


--------------------Configuration: SipComm - Win32 Debug--------------------
Compiling...
RTCWin.cpp
E:\sipusb\91910\RTCWin.cpp(3562) : error C2440: '=' : cannot convert from
'class CWnd *' to 'struct HWND__ *'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast


0
donkeymaster
9/28/2004 6:35:14 AM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
997 Views

Similar Articles

[PageSpeed] 10

You must be making the call from within a CWnd object... therefore it is
using CWnd::FindWindow() which returns a CWnd *

You have 2 options:
(i) specify the Windows API call:
    HWND hwnd = ::FindWindow()
or (ii) deal with CWnd instead of HWND return value:
    CWnd *pwnd = FindWindow()
It depends what you need it for.


"������" <donkeymaster@163.net> wrote in message
news:eBl6SVSpEHA.3464@TK2MSFTNGP14.phx.gbl...
> HWND dlgHwnd = NULL;
> dlgHwnd = FindWindow(_T("CSessionNotifyDlg"),NULL);
>
>
> --------------------Configuration: SipComm - Win32
Debug--------------------
> Compiling...
> RTCWin.cpp
> E:\sipusb\91910\RTCWin.cpp(3562) : error C2440: '=' : cannot convert from
> 'class CWnd *' to 'struct HWND__ *'
>         Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>
>


0
GuitarBill
9/28/2004 7:12:57 AM
Maybe you are invoke this function in a window, change to this is ok:
HWND dlgHwnd = NULL;
dlgHwnd = ::FindWindow(_T("CSessionNotifyDlg"),NULL);


"������" <donkeymaster@163.net> д����Ϣ����
:eBl6SVSpEHA.3464@TK2MSFTNGP14.phx.gbl...
> HWND dlgHwnd = NULL;
> dlgHwnd = FindWindow(_T("CSessionNotifyDlg"),NULL);
>
>
> --------------------Configuration: SipComm - Win32
Debug--------------------
> Compiling...
> RTCWin.cpp
> E:\sipusb\91910\RTCWin.cpp(3562) : error C2440: '=' : cannot convert from
> 'class CWnd *' to 'struct HWND__ *'
>         Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>
>


0
jh_Zzz (19)
9/28/2004 7:16:07 AM
������ wrote:
> dlgHwnd = FindWindow(_T("CSessionNotifyDlg"),NULL);

dlgHwnd = ::FindWindow(_T("CSessionNotifyDlg"),NULL);


-- 


Sigurd
http://utvikling.com


0
sigurds (118)
9/28/2004 7:16:48 AM
Sigurd Stenersen wrote:

> ������ wrote:
> 
>>dlgHwnd = FindWindow(_T("CSessionNotifyDlg"),NULL);
> 
> 
> dlgHwnd = ::FindWindow(_T("CSessionNotifyDlg"),NULL);
> 
> 

������,

After correcting the error, the code still will not work as you expect. 
   "CSessionNotifyDlg" is a C++ class name.  But the parameter passed to 
FindWindow is a Windows class name, which (unfortunately) is a 
completely unrelated concept.  If you are trying to get a handle or 
pointer to a window that is part of the same program then FindWindow is 
not a good way.  What are you trying to do?

-- 
Scott McPhillips [VC++ MVP]

0
Scott
9/28/2004 12:56:55 PM
Reply:

Similar Artilces:

How to save outlook messages & contacts if I can't start my os ?
Hi, I know how to solve this problem by using outlook express, but I don't know how to do that using office outlook. I mean pc is broken and my task is to take hdd and save outlook messages and contacts somehow. Any Ideas ? thank you Vilius On Tue, 23 Jan 2007 21:23:00 -0800, "Vilius Mock�nas" <v_mockunas@yahoo.com> wrote: >Hi, >I know how to solve this problem by using outlook express, but I don't know >how to do that using office outlook. I mean pc is broken and my task is to >take hdd and save outlook messages and contacts somehow. Any Ideas ? &...

Lost personal folder, can't retrive them at all
I receive a msg that there is an error in opening the inbox it was a grey box in the body of the outlook and prompted me to close this diagloge and go to inbox repair tool to fix the problem, I closed the outlook and try to fix run the orignal office Cds to repair and after that I open the outlook it gave me the same problem so I point the cursor to the personal folder and with right click I press close personal folders. I did look for backup pst files and restored it but they were very old and not the same accounts, I thought I am sure I can open it again but now I cant seem to find...

Excel error message #6
I have Office 2000 on my laptop with Windows XP. When I start, and again when I exit, Excel, I get an error message: "Microsoft Visual Basic Compile error in hidden module TBrun9" How do I correct this? David Look here: http://support.microsoft.com/default.aspx?scid=kb;en-us;272066 In article <1340701c3f712$da6bdd80$a601280a@phx.gbl>, "David" <macconsulting@prodigy.net> wrote: > I have Office 2000 on my laptop with Windows XP. > When I start, and again when I exit, Excel, I get an error > message: > "Microsoft Visual Basic > Compil...

Message Count does not show correct messages
I have a Public Folder that shows 13 items and 3 unread. I am the only machine with the problem. Anyone else who accesses it is fine and they all have the same permissions I have. Any idea why this is happening. I have created a new profile in Outlook 2002 and get the same results. I have tried deleting the folder and then recreating in public folders and same thing. I don't understand why I am so lucky and have this problem. It is quite annoying. I have also checked that there are no filters applied and there are not. I am running Exchange 2000 SP3 with all SP3 Roll ups on the s...

AR
Hello, does anyone know why there is not a distribution error in the AR module like there is in AP: "Distributions for this transaction contains errors." Thanks, Craig Hi Craig, Probably there is no issue with the distributions in the AR which is why you are not getting an error. In AP, you may want to check the distributions by clicking the distributions button from the payables transaction entry screen and verify the accounts. You can click the Default button to reset the accounts. If that didn't auto-populate the default accounts in the distribution...

Can I determine which cells on a sheet are locked and which are not?
Is there any kind of report, etc. I could look at that would tell me what cels are unlocked or vice versa on a protected worksheet? I have 8 worksheetsin a workbook, with each sheet comprised of more than 550 rows and 14 columns. I could tab from cell to cell to determine if I have all the desired cells locked, but with nearly 60,000 cells, that is not at all feasible. Does anybody have any ideas? Basically all I'm wanting to do is to be sure that all of my cells that need to be are locked, so that when I share this workbook I need not worry about others getting into areas they...

GP v10 - windows
Just upgraded to v10 - how can we get the windows we are working in to stay visible on the screen? we often have to work with more than one window at a time and to have them all "hide" at the bottom is a nuisance. The bad news is you can't. The good news is that it grows on you after a while. I still don't like it, but it doesn't drive me crazy anymore. "Pam" <Pam@discussions.microsoft.com> wrote in message news:88C98232-7189-475A-A73B-D3A83B6BAF04@microsoft.com... > Just upgraded to v10 - how can we get the windows we are working in to stay &g...

Close Tag Error from HTML source for web service WSDL
I have developed web services under .net framework 1.1, myWebServ.asmx with methods, getInfo() and getInfo(int). Those are working fine for the clients created by .NET Visual Studio. However, when I used Eclipse to develop Java client to consume the service, I got error massage: the element type "br" must be terminated by the matching end-tag "</br>". I use webbrowser to check the myWebServ.asmx, and found the web method attributes such as [WebMethod(Description="Given...")] are quoted as "<br>Given... " without closed tag <\br&g...

Where can I get on-line training for Visio
I am new to Visio and would appreciate some advice on the best way to 'teach myself'. Many thanks try this, http://office.microsoft.com/en-us/results.aspx?Scope=RC&Query=visio al "annmez" <annmez@discussions.microsoft.com> wrote in message news:E051D59E-5DEF-4484-8BC9-EA62847C17A6@microsoft.com... >I am new to Visio and would appreciate some advice on the best way to >'teach > myself'. Many thanks ...

Workflow
Hi, We have installed Workflow ona MOSS enviornment with BP4 and GP10. We have configured workflow and setup a simple PO approval workflow. When the user submits the PO we get 2 error messages in quick sucession from the Dynamics Log. Error1: System - Provider [ Name] Microsoft.Dynamics.Workflow - EventID 0 [ Qualifiers] 0 Level 2 Task 0 Keywords 0x80000000000000 - TimeCreated [ SystemTime] 2009-07-06T14:58:07.000Z EventRecordID 403 Channel Dynamics Computer TWOIT-GP01.globalsynapse.co.za Security - EventData Action: SubmitForA...

STMP ERROR HELP
Hi, I set up a bt wireless network, I use BT as my email provider but my partner uses dircon. I am trying to get the dircon email to go through outlook xp on our notebook. I had this set up a couple of years ago but recently formatted and reinstalled the software on the notebook but can't remember how I did it. It's receiving email but will not send. I've tried setting up the STMP address as BT's and Dircon's but neither work. Any suggestions? Cheers, Alex are you authenticating with the outgoing mail server? -- Diane Poremsky [MVP - Outlook] Author, Teach Yo...

Compile error on range...
I get a compile error on line 21 below. What is wrong with it? I am trying to color fill a cell based on the XColor value... Help! 0 r = 1 1 Do While ActiveSheet.Cells(r, 1) <> "" 2 str1 = ActiveSheet.Cells(r, 1) 3 str2 = ActiveSheet.Cells(r, 2) 4 comp1 = strip(str1) 5 comp2 = strip(str2) 6 7 If (comp1 <> comp2) Then 8 XColor = 5 9 Else 10 XColor = 25 11 End If 12 13 If (XColor) Then 14 Range("ActiveSheet.Cells(r, 1):ActiveSheet.Cells(r, 2)").Select 15 With Selection.Interior 16 .ColorIndex = 3 17 .Pattern = xlSolid...

Can receive but can't send emails on Windows Mail
An unknown error has occurred. Subject 'good site for random camping sales', Account: 'Rowena', Server: 'smtp.slingshot.co.nz', Protocol: SMTP, Server Response: '421 Cannot connect to SMTP server 202.180.66.218 (202.180.66.218:25), connect error 10060', Port: 25, Secure(SSL): No, Server Error: 421, Error Number: 0x800CCC67 This is the error message I get when I try to send emails. Up until a couple of days ago I have been able so send emails fine but now it has stopped working. Any idea of how I can fix this and send emails again? Cheers This...

How can I change sale price to price A,B, or C
The wizard only lets you marks up or down Items in departments by percents or by a dollar amount most retailers have items in the same department that are price at round numbers like Regular price for a Adirondack chair $149.00 and sale price $99.00 but the foot stool for the chair has a regular price $99.00 and on sale is $79.00 the department is the same but the % of the price change is deferent am I over looking some thing ???????? Is there a work around for this Thanks HI Al, the first thing with your wording is that you are price strcuture set not base on department but base o...

Error bars
How can I add a unique error bar to each bar in a chart? Each bar represents an average with its own unique range. Hi Ann, On the Error-bar dialogbox are two boxes that allow you to specify custom + and - error values. These can be used to specify a range of cells which contain the error values. Ann wrote: > How can I add a unique error bar to each bar in a chart? Each bar represents an average with its own unique range. -- Cheers Andy http://www.andypope.info ...

Can't seem to enforce a newly created Recepient Policy...
Hi Everyone: I just created a new recepient policy. I would like this policy to set my newly created users in a specific OU to assign them a different email domain which in our case is NA.company.com when my users in that OU are created. I have created the new OU, and a universal security group in that OU as well as users. I make sure i put my users in that security group. My policy has the following filter rule: (&(&(&(objectCategory=*)(memberOf=CN=security_group_name,OU=OU_with_new_doma in_users,OU=OU_with_all_domain_users,DC=domain,DC=com)))) Now, when i add my users to...

Can you share a calendar using Outlook web access?
We are using Outlook Web Access only. Is there a way to share calendars? In news:AED7800B-502A-44D1-A386-5A9274753BDB@microsoft.com, betzie <betzie@discussions.microsoft.com> typed: > We are using Outlook Web Access only. Is there a way to share > calendars? You can access a calendar (or any mailbox folder, I believe) if it's already shared - but you can't create the share/set the permissions in OWA. You might post OWA questions in microsoft.public.exchange.clients - OWA is part of Exchange, not Outlook. ...

Can
----------------------------------------------------- I get the following error with my ODBC MS access driver. '(unknown)' is not a valid path. make sure that the path name is spelled correctly and you are connected to the server on which the file resides access network ...

#Error when summing in Form
I add a NEW control to the Footer of a Subform with a Control Source as follows: =([AmtBilled]). This will give me a value from a record of the Detail section of the same Subform. If I change the Control Source to =Sum([AmtBilled]), I get #Error. All of my controls that contain the Sum function are NOW giving me this #Error. I made this to happen with some change I have made, but I can't figure out what I have done to cause this. Can someone point me in the direction to solving this problem? Thanks... You need to sum by control name not by column name. -- Dorian "...

OutLook in XP Office Pro producing this error:
After upgrading from Office 2k to Office XP Pro, I am getting the following error message. I imported my "old" archive and it had/has a folder called "BladePro". Each time my archive runs, I get this message. I have searched my entire hard drive and there are no other archive folders so where is it finding a second "BladePro" folder? This is irritating, to say the least. Error while archiving folder "BladePro" in store "Archive Folders". A folder by this name already exists. If possible, please send your suggestions to: rweeks@cableon...

can you capture info from a cell without retyping in another cell
I'd like to be able to update the salutation in a letter with the person's name in the address without having to retype it. I am using Microsoft Office 2003. See http://gregmaxey.mvps.org/Repeating_Data.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. jallen449 wrote: > I'd like to be able to update the salutation in a letter with the > person's name in the address without having to retype it. I am using > Microsoft Offi...

Trying to sort by row and getting errors.
I'm trying to do a simple sort by rows instead of columns and every time I try to do it I get this message: This operation requires merged cells to be identically sized. What am I doing wrong? First of all, select all cells then Format>Cells>Alignment. Click the "merge cells" option a couple of times to clear it. Now try your sort. Merged cells cause many problems and are very rarely necessary. Use Center Across Selection instead. Gord Dibben MS Excel MVP On 11 Jun 2006 16:57:42 -0700, joe54345@gmail.com wrote: >I'm trying to do a simple sort by rows in...

Can't read some emails
I need help!!! We just installed outlook 2003 and I have a hard time reading some emails. This is all I can see when I open some emails. So i dont know why some emails look okay and readable while others you can read at all.. Sample below: See attached file: WFS610-Bank Teller.doc) --0__=07BBF861DFE24C278f9e8a93df938690918c07BBF861DFE24C27 Content-type: application/msword; name="WFS610-Bank Teller.doc" Content-Disposition: attachment; filename="WFS610-Bank Teller.doc" Content-transfer-encoding: base64 0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/ CQAGAAAAAAAAAAAAAAABAAAAMgA...

can't open email attachment in earthlink with office 2007 trial ve
New to pc's. I'm a mac-er. Bought a backup pc. downloaded the free 60 day office 2007 trial for Vista. I can open MS word but can't open a MS word document that comes as an attachment in earthlink. It's a bit of an emergency and of course, Gateway says call Microsoft who says they dont offer support for the free trial and to find it here. I've looked and don't see the answer. Thank you, pc'ers. Mhughu Sorry, but this newsgroup is for questions about Access, the database product that's part of Office Professional. You'd be best off reposting yo...

Can't add a 0 (zero) to the beginning of a number in a cell
I am trying to put a serial number in a cell but it starts with a zero. After I type in 09867453 and move to the next cell the 0 disappears. Scott You can format the cell to be text and it will then allow a 0 to be added to the front of a number however this may cause problems if you are using that number in inequalities. Scottrow wrote: > I am trying to put a serial number in a cell but it starts with a zero. > After I type in 09867453 and move to the next cell the 0 disappears. > > Scott Scott, The first answer is correct however it may be alot easier if you add an a...