How to solve error c1190 : MFC requires to use Winsock2.h ?

in the name of allah
hi everyone
i work with visual C++ 2008 and i'm a project that contains the c and c++ code together.
the project worked correctly but when i add a .cpp and a .h file to the project, the project
errors the c1189 : MFC requires to use winsock2.h
look the codes in the .cpp and .h files are correctly because when i add these files to another mfc project will work,
but when add to my project this error will happen.
can you tell me what the problem is?
first part of the my .h file is like below :
#pragma once
#ifdef _WINDOWS_
#undef _WINDOWS_
#endif
#include <Afx.h>
#include <afxwin.h>
#include <atlimage.h>
#include <math.h>
in addition i need to use the CWnd and CString and CImage ,... Classes in my project, because of this include the afxwin.h(for CWnd) and atlimage.h(for CImage) and ....
so i have to do these, don't i?
remaining part of .h file is :
class Object{
public:
    CImage Image;
    short int x,y;
class Theme : public CWnd{
private:
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
public:
    CWnd  *Parent;
    CPoint cursor;
    bool drag;
    CString path,imagepath;
    char DialogMove;//0==top to center - 1==center to top - 2==center to down - 3==down to center
    char code,sb;//code = 0=main page - sb=show button=1=ascedung,-1=desceding;
    short int iimage,bstart,bend,//i = index of images-b = index of buttons
    ib;//ib=index of button for clicking and do code
    short int w, h,D;
    float ani_p, ani_max;
    bool ani,mousec;
    CRect WRect,rdesktop;
    CDC *cdc;
    short int lani;
    HWND hwndani;
    Object *Image;
    CRect *Rect;
    bool *BEnable;//enable of buttons-1 = enable
    unsigned char ButtonCount,ImageCount,SysButtonCount;
    bool Transparent;
    int EndMsg;//0=WM_CLOSE        1=PostMessage(IDOK)
    void GotoPage(unsigned char PageNo,unsigned char BStart,unsigned char BEnd);
    void ClearRect(short i,short j,COLORREF color);
    bool IsIn(CPoint point,CRect rect);
    bool IsInRect(CPoint point,CRect rect,CRect Rectangle);
    void Center2Top(int);
    void Top2Center();
    void Down2Center();
    void Center2Down();
    bool AddImage(unsigned char Index,CString ImagePath,unsigned short int X,short int Y);
    void AddButton(unsigned char Index,CRect rectangle,bool enable);
    void DrawImages(unsigned char alpha,int IImage);
    //Theme(unsigned char imagecount,unsigned char buttoncount,unsigned char sysbuttoncount);
    void Init(unsigned char imagecount,unsigned char buttoncount,unsigned char sysbuttoncount);
    ~Theme(void);
    bool CreateTheme(CRect rect,CWnd *parent,unsigned short int W,unsigned short int H,bool transparent);
    afx_msg void OnPaint();
    afx_msg void OnTimer(UINT_PTR nIDEvent);
    afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
    afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
    DECLARE_MESSAGE_MAP()
after that
in my .cpp file i wrote the body of functions.
so where the problem is?
thanks alot
thanks

How did you created your solution is it a MFC app or Win32 App . make sure that From Project Properties Use of MFC is set to Use MFC in a Shared Dll.
Thanks
Rupesh Shukla

Similar Messages

  • How to solve error -1450?

    I have been re-installed iTunes, and it keeps pop-up with the error -1450 ( cannot save music library ), and it reloads all the playlist each time I switch on the computer and open iTunes.
    I have been re-install iTunes after the error appear, and it seems although I have re-install iTunes, the problem doesn't solve and keeps repeat.
    For any kindness, please tell how I can fix this error, as I cannot find any articles on support page about this.
    Thanks

    Does anyone know how to solve error 1450 or even what
    caused it!? This problem is killing me.
    I found this by doing a search on Google for "Error 1450": http://support.microsoft.com/kb/236964/EN-US/

  • TS3694 How to solve error 3194 ?

    How to solve error 3194 in iTunes, when trying to upgrade iPod touch to ios 5 ? Thank you.

    The common errors and their resolution are contained here:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting

  • How to solve Error in http connection. Error -1

    urlMidlet2===http://localhost:8080/testProj?userId=20&selMPBL=23&svMPBL=IPOD+Touch+Screen+e!1!Tue+Jan+06+00:00:00+UTC+2009!Tue+Jan+06+00:00:00+UTC+2009!Sat+Jan+31+00:00:00+UTC+2009!Mp3+Player!IPOD!Rejected!12
    [j2mepolish] Generic/DefaultColorPhone: !1!2!1222!13333
    [j2mepolish] Generic/DefaultColorPhone: Protocol for this connection is http
    [j2mepolish] Generic/DefaultColorPhone: This object is connected to localhost host
    [j2mepolish] Generic/DefaultColorPhone: HTTP Port in use is 8080
    [j2mepolish] Generic/DefaultColorPhone: respCode=====-1
    [j2mepolish] Generic/DefaultColorPhone: Error in opening HTTP Connection. Error#-1
    Why is this error coming? How to solve it?
    Thanks in advance.
    Edited by: J2me_Beginner on Jun 7, 2009 9:38 PM

    I am making a form using an interface. When Activate the Form, I got this error:
    Invalid HTTP connection: ADS
    Message no. FPRUN000
    But I do not know how to solve or config ADS. Any one know how to slove this error ?
    Thanks a lot.

  • How to solve error essbase encoding ?

    Dear All,
    Today, I just wanted to load data into a demo database, however, I found that the load information of data load results is error encoding as below:
    ÕýÔÚ¶ÁÈ¡Êý¾Ý¿â [Demo] µÄ¹æÔò SQL ÐÅÏ¢
    ÕýÔÚ¶ÁÈ¡À´×ÔÊý¾Ý¿â [PLP] ¹æÔò¶ÔÏóµÄ¹æÔò
    ÆôÓÃÁ˲¢ÐÐÊý¾Ý¼ÓÔØ: [1] ¿é×¼±¸Ị̈߳¬¶ø [1] ¿éдÏ̡߳£
    ¼ÓÔØ´ËÊý¾ÝÎļþδÐÞ¸ÄÈκÎÊý¾ÝÖµ
    [LoadData.rul] µÄÊý¾Ý¼ÓÔؾ¹ýµÄʱ¼ä: [9.516] Ãë
    Êý¾Ý¿âµ¼ÈëÒÑÍê³É ['ZZTest'.'Demo']
    ÒÑ×¼±¸ºÃÊä³öÁÐ: [0]
    Of course, I modified the env variable ESSLANG from English_UnitedStates.Latin1@Binary to SimplifiedChinese_China.MS936@Binary. What a pity, it doesn't work.
    As you know, the Essbase Language was set to SimplifiedChinese_China.MS936@Binary when configuring.
    So, who knows how to solve it ?

    Open log with utf8 text editor
    u can remove chines localization if copy to bin files from C:\Hyperion\products\Essbase\EssbaseServer\localized\en\bin

  • How to solve error when run Depreciation (T-Code:AFAB)

    Dear All Experts,
    Hi,
    I found error when run Depreciation for period 9 FYI. I had run Planed posting period Depreciation (TCode: AFAB).  with fiscal year: 2010, posting period: 9, reason for posting run: Planed posting run. Select on Test Run. Then i found error message as below.
    Documents manually posted within dep.doc.number range
         Message no. AA728
    Diagnosis
         In the number range interval for the document type for posting
         depreciation, a document  has been posted which was not created within
         the framework of depreciation posting. The last document posted by
         depreciation posting was assigned the number .
    Procedure
         Contact your Systems Specialist. When changing the number range interval
         for the document type in depreciation posting, you have to specify a new
         interval in which no documents exist. Using organizational measures, you
         can guarantee that there are no documents apart from those created by
         depreciation posting in this number range.
    Would you help me how to solve this error?
    Thank you in advance
    Best Regards
    Utarat.P

    Hi Utarat,
    first question is: have you really manually posted a Documents within dep.doc.number range 
    If you post with RABUCH00, note 193984 could be relevant for you. 
    Check if the intervall in Table TABA don't fits with the Intervall in BKPF.
    Example:
    TABA
    MANDT BUKRS  AFBLGJ AFBLPE AFBANZ BLNRF      BLNRT      XBUKZ  
    100   XXXX   2010   004    01     4200000013 4200000016 X      
    100   XXXX   2010   005    01     4200000017 4200000020 X      
    100   XXXX   2010   006    01     4200000021 4200000024        
    On the other Hand In Table BKPF (or Tr. FB03) you can see that 4200000037 already   
    exits.                                                                               
    BUKRS  BELNR      GJAHR BLART BUDAT      CPUDT      CPUTM    TCODE
    XXXX   4200000024 2010  YY    30.06.2010 06.07.2010 19:36:30 ABF1 
    XXXX   4200000037 2010  YY    30.06.2010 06.07.2010 19:37:47 ABF1 
    Regards Bernhard

  • How to solve error code -1074397179 in Imaq Attribute VI

    I keep getting error message (-1074397179) when I run the imaq attribute VI. What should I do to solve this problem? What are the parameters that i can change to solve this. The error message gave this as img_err_par1. But I have no idea how to solve this problem.
    Attachments:
    IMAQ_Attribute.vi ‏74 KB

    I compared your attribute VI to my own (which is IMAQ 2.6 and working great) and the only differences are in the Attributes input and the Type/Attr/ID input. I have attached my version of the VI in LabVIEW 6.1 below. Try using this and see if it gives you the same errors.
    Hope this helps-
    Julie S.
    Attachments:
    IMAQ_Attribute.vi ‏77 KB

  • How to solve "error occurred in the data manipulation engine"? 64bit Windows 7

    Hi all
    I'm having quite a testing time here trying to use the new SAP PA 2.0. After installation the software launches, the Automated Analytics seems to work fine but not the Expert Analytics.
    Steps as follows:
    Launch PA
    Choose and launch Expert Analytics
    Choose Try with Samples
    Open the Dairy Wholesaler file
    Error: An error occurred in the data manipulation engine. Check the manipulation parameters. (HDB 01001)
    I also get this same error when I try to create my own New Dataset.
    I’m on 64bit Windows 7 Pro
    Is there anyone who knows how to solve this problem. I've searched the SCN and online and have tried the following:
    1. Uninstall and re-install. Doesn't help
    2. Uninstall and delete old lumira related folders on the C drive e.g. the SAPPA and SAPVI folders on the C drive, then re-install.
    Much appreciated if anyone could shed some light on this. I've previously had Lumira working with no issues. I've since uninstalled Lumira, Predictive Analytics, and Infinite Insights (as PA 2.0 is all of this combined)
    Regards
    Ria

    In case anyone has the same problem, I found the the following helpful (taken from Error after upgrading to 1.18 ). The solution is for Lumira however its the same steps for PA2
    1.  You might want to try a ‘clean’ uninstall / reinstall . After uninstalling, try deleting these folders:
    C:\Users\Public\sapvi
    C:\Users\<user>\AppData\Local\SAP\Lumira
    C:\Users\<user>\AppData\Local\Temp\sapvi
    In this step I searched for every SAP related file in AppData in the Public, User, and my own username folder under \Users\
    2.  Next, to launch the application, explicitly click "Run as Administrator" on the install file

  • HT201442 how to solve error 3004?

    Hi All,
              I haveing problem during restoring. Unable to restore due to error 3004. Anybody knows how to solve it. Thk.

    Hello, kyawmyintshein85. 
    Thank you for visiting Apple Support Communities. 
    Here are the steps that I would recommend going through when experiencing restore error 3004. 
    Resolve communication issues
    Check the hosts file or TCP/IP filtering, which might cause communication issues between iTunes, ports, and servers.
    Common errors: 1004, 1013, 1638, 3014, 3194, or 3000-3999. These alerts refer to gs.apple.com, say "There was a problem downloading the software", or say the "device isn't eligible for the requested build".
    Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/TS3694
    Also, make sure to process and updates for iTunes and your computer.
    Cheers,
    Jason H. 

  • How to solve error  : ORA-6512 at APPS.EAM_WORKORDER_PKG

    In new EAM installation process, the next error occurs during the creations of new operations to WO and attachments of new activities, which have several operations.
    ERROR:ORA-06502: PL/SQL :numeric or value error: character string buffer too small
    ORA-06512: at ''APPS.EAM_WORKORDER_PKG'', line 1529
    ORA-06512: at ''APPS.EAM_WORKORDER_PKG'', line 1966
    The implementation is in 12.0.4 version.
    Some one know how to solve this issue en EAM EBS.
    Thanks.

    Thanks for your help,
    I have reviewed all information sent for you. The issue finally was solve with the action plan descibed in the next :
    WICDOL - Autocreate Final Assembly Orders Completing With Warning - "ORA-01400: cannot insert NULL into ("WIP"."WIP_OPERATIONS"."WSM_BONUS_QUANTITY") " [ID 734605.1]
    This particular issue afects the operations creation, assigment of activities with predefined operations and state change.

  • How to solve Error -1074396080 occurred at IMAQ array to color Image

    Hello,
    I am getting above mentioned error.
    Here I have attached my screen shot of the error.
    Could any one Please guide me how to solve this error.
    I am using Kinesthesia kinect driver which generate U24 Bit RGB Image and I want to convert it in IMAQ Image type, But I am getting mentioned error.
    But when I am not using the vision acquisition and vision assistant then every thing is fine means there is no any error which I have attached in attachment 2.
    Please guide me how to solve this problem.
    Thank you very much.
    Solved!
    Go to Solution.
    Attachments:
    invalid image type.png ‏251 KB
    imaq2.png ‏56 KB

    Thank you very much for quick reply.
    I follow your instruction but it give me still same error.
    here in attachment I have attache screen shot as well Vi so you have a look.
    thank you very much once again for help and time.
    Attachments:
    Unbenannt.png ‏174 KB
    kinect templet.vi ‏137 KB

  • How to solve error message in webui

    Hi ,
    Please find the attachment.Ho
    I am getting this error in webui level. How to solve the error messages in webui level.
    Item 30 : Access to changed configuration data is not possible.
    What procedure i will follow can you tell me.
    Regards,
    Sai

    Dear Sai,
    please consider note 1647590, this note might help you tol solve the situation.
    Best regards
    Rene

  • How to solve Error 16 in Adobe Muse for Windows 7

    Hi
    I have the muse subscription but I keep getting the Error 16. I am using Adobe Muse on Windows 7. Please help me to resolve this issue.

    Please check out the following knowledgebase document Configuration error 16 | CC, CS
    You can also look for previous forum threads on the same error (https://www.google.co.in/search?q=site%3Aforums.adobe.com+configuration+error+16&ie=utf-8& oe=utf-8&aq=t&rls=org.mozilla:…)
    It is a generic installation/launch error, nothing specific to Adobe Muse and the documentation as well as the forums posts may be able to help you fix the issue. If you still need help with this, please contact Adobe Support directly at http://helpx.adobe.com/contact.html
    Thanks,
    Vikas

  • How to determine the JDK version required to use a jar?

    Hi all.
    I am using a hosted server that uses JDK 1.4.2 and I cannot upgrade the VM. I have been finding it extremely difficult to install web applications on this server since I find that after installing the app, the web server complains the bytecode used in the jar is newer than the VM can understand (or it complains that the app uses JEE servlet or JSP methods it cannot find).
    To compound the problem, only about 25% of the sites I've visited that provide jars for download mention the minumum JDK version required to use them. (Some do not mention any system requirements at all besides 'requires Java and a Java application server').
    Do any of you know of any tools that can analyze a jar and determine the bytecode version it uses?
    (Another helpful tool would be one that can determine the minimum JEE APIs required to run a web app..., but that's probably wishful thinking :)).
    Thanks for your help.
    Michael N. Christoff

    The major/minor version of the class file is the way to go.
    Also, it's not necessary to write a separate program to get to those. javap prints them out when being passed the -v flag.
    Note, however that "JDK version" is not a correct term, as I can create 1.4-compatible class files with a Java 6 JDK (by passing the -target flag to javac). Those won't look any different than .class files written with a 1.4 JDK.

  • How to solve "Error: code segment of method _jspService(...) too large"

    Hi, I am trying to compile a JSPX Page and I keep getting "Error: code segment of method _jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) too large", in some Forums say that this Error is due to a Limit in the Size of Code that a Try/Catch Block can contain (64K), They suggest to remove such Blocks but I don't know how to do this in JDeveloper 10.1.3.2.0, some advice or suggestion?
    Thanks in Advance.
    PD: I cannot refactor the Code into different Pages.

    Hi,
    if I remember well then the problem is solved by setting the compiler used to JAVAC. This is a setting in the project properties
    Frank

Maybe you are looking for

  • Error in using the JMS Adater using weblogic queue

    I am using weblogic queue in jms adapter to queue the data. i configured the server.xml      <shared-library name="oracle.weblogic" version="10.1.3">           <code-source path="D:\product\10.1.3.1\OracleAS_5\jdk\lib\weblogic.jar"/>      </shared-li

  • Error 7 windows error 127 i want to fix

    Error 7 windows error 127 i want to fix this asap

  • Looping menu

    I created a project with a main menu.  I added motion to the menu with video and audio.  It works as I expected, except the audio loops as I planned, but the video goes to white once the 3.54 minute video is finished.  I tried various things such as

  • FaceTime & Photobooth states Camera not connected on Lion

    I just upgraded to Lion on my macbook air. FaceTime and Photobooth both stated that my camera is not connected. How to fix this problem?

  • K7T Turbo2+New Hard Disk

    im have the k7t turbo2 motherboard with an amd athlon xp 2000....id like to get a new hard disk...im looking at the western digital 20gb(since i dont use a lot of space) it runs at 7,200rpm using ata 100.....my current hard disk is a slower 3,200rpm