what is STDMETHOD ?
Anand for every one
Posts
-
STDMETHOD -
Problem in Uploading FilesI want to Upload a file. Here is my code.. Page 1: WebClient client = new WebClient(); client.UploadFile( "http://ft-rt-005/test/upload1.aspx","POST","G:\\\\Water lilies.jpg"); Page 2: foreach(string f in Request.Files.AllKeys) { HttpPostedFile file = Request.Files[f]; file.SaveAs(Server.MapPath(".\\upload\\"+ file.FileName)); } I am uploading a file to Page 2 using client.UploadFile().From Page 2 ,i am saving to the server.But whenever client.UploadFile() is invoked,my application searches the file in server.It is not searching in the client machine. I want to upload from the client machine.Can anybody help me.. Thanks Ramesh
-
ToolBarI want to handle WM_MOUSEMOVE event of the toolbar. how to do it? i created one class for that as below. class CAnnotationBar : public CToolBarCtrl { // Construction public: CAnnotationBar(); // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAnnotationBar) //}}AFX_VIRTUAL // Implementation public: virtual ~CAnnotationBar(); // Generated message map functions protected: //{{AFX_MSG(CAnnotationBar) afx_msg void OnMouseMove(UINT nFlags, CPoint point); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; and i created a instance variable for this class in my ActiveX control class. i Added the following code in OnCreate. CRect rc(0,0,600,50); m_AnnotationBar.Create(WS_CHILD|WS_VISIBLE|CBRS_TOP|CCS_TOP ,rc,this,IDR_TOOLBAR); m_AnnotationBar.MoveWindow(0,0,600,50); m_AnnotationBar.ShowWindow(SW_SHOW);
-
CTwain : With ActiveX control. It does not working ! . Help me please.see this link first : http://www.codeproject.com/audio/twaintest.asp I used CTwain from there. I included CTwain with my ActiveX control. When i call selectSource it worked. When i call Acquire , the source's user interface is displayed. But the following condition in ProcessMessage(MSG msg) is not become true when clicking on Close(Cancel or Exit) , Ok (or Scan). if(GetRC() != TWRC_NOTDSEVENT) { AfxMessageBox(_T("In TWRC_NOTDSEVENT in ProcessMessage" )); // it not executed always TranslateMessage(twEvent); } Thus TranslateMessage is not called. I subclassed my control class from CTwain. and in OnCreate i included the following line. InitTwain(m_hWnd); if(!IsValidDriver()) { AfxMessageBox("Unable to load Twain Driver."); } and in PreTranslateMessage (BOOL CImgAnnCtrl::PreTranslateMessage(MSG* pMsg)) i included the following line. ProcessMessage(*pMsg); Plese help me. What is the problem. I followed the same procedure in a stand alone(exe (mfc)) application it worked well.
-
Restart the processSee you said you terminated the process. Then how can you resume it ? Only Suspended process can Resumed. Not Terminated Process. You should not terminate it.Just Suspend it.
-
GDI+ Simple Help meI am using GD+ in my ActiveX Control. It Works. But TSTCON32.exe not removed from memory.It is still running even after i closed testContainer(TSTCON32) application. Please look at this simple code and tell me problem. Here is the Code.It simply initialize in InitInstance and Shutdowns in ExitInstance. AfxStd.h ///// #if !defined(AFX_STDAFX_H__C2F7B03D_540F_42F2_B794_2FEF9ED71973__INCLUDED_) #define AFX_STDAFX_H__C2F7B03D_540F_42F2_B794_2FEF9ED71973__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, // but are changed infrequently #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #include // MFC support for ActiveX Controls #include // MFC extensions #include // MFC support for Internet Explorer 4 Comon Controls #ifndef _AFX_NO_AFXCMN_SUPPORT #include // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT #include using namespace Gdiplus; #pragma comment(lib, "gdiplus.lib") // Delete the two includes below if you do not wish to use the MFC // database classes #include // MFC database classes #include // MFC DAO database classes //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STDAFX_H__C2F7B03D_540F_42F2 TestApp.H - Application class header file. #if !defined(AFX_DFDSF_H__B2B70A2B_F958_46E4_B51D_CE3FE9A11D59__INCLUDED_) #define AFX_DFDSF_H__B2B70A2B_F958_46E4_B51D_CE3FE9A11D59__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // dfdsf.h : main header file for DFDSF.DLL #if !defined( __AFXCTL_H__ ) #error include 'afxctl.h' before including this file #endif #include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CDfdsfApp : See dfdsf.cpp for implementation. class CDfdsfApp : public COleControlModule { private: GdiplusStartupInput gdiplusStartupInput; // GDI+ Object ULONG_PTR gdiplusToken; // GDI+ Pointer public: BOOL InitInstance(); int ExitInstance(); }; extern const GUID CDECL _tlid; extern const WORD _wVerMajor; extern const WORD _wVerMinor; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarati
-
SHA EncriptionI need a Sha Encription alogorithm. Anyone could please help me? :cool:
-
How to get text on screendo you want the text to appear within your application window or anywhere in screen(including the area out of your application window). 1) if you want the text to appear within your application window, handle WM_LBUTTONDOWN OR onLButtonDown(in mfc), and within that get the device context of client(GetClientDC(this)) and display the text using TextOut or DrawText.(use point for mouse location) 2) if you want the text to appear anywhere in screen, -Capture the mouse using SetCapture. -Get the screen device context, using CreateDC(NULL). -display the text using TextOut or DrawText.(use point for mouse location) :cool:
-
DIB to BITMAP,BITMAP to JPEGAnyone could please tell me, How to convert from DIB to BITMAP? How to convert from BITMAP to JPEG? How to convert from DIB to JPEG? :cool:
-
SmalltalkAnyone could please tell me in which plateform the language smalltalk is used. :cool:
-
MacAnyone could tell me what is primary language in Macintosh like VC++ in Windows. :cool:
-
Image Capture from DeviceI need to capture Image from devices like digital camera, Webcam, Scaner,etc. I don't anything about this. Anyone please direct me.provide links, samples if you know. :omg:
-
Redraw Bitmap Window MessageYou no need to handle any other messages for this. Just write your code that displays the image inside the OnPaint or WM_PAINT.:cool:
-
Mouse event , ActiveX controli have wiritten a activex control. I testted it using ActiveX test containser and in web application (in html). It works well. But when include my activeX control in a dialog based application , mouse mouse events are not correctly posted to my activex control. Sometimes it posts sometimes it doesn't. mouse down is also not posted. only when i clicked two times(not double click.one click after few seconds another click), one mouse down message is posted to my activex controls.:omg::omg::omg:
-
CDialogBari'm writting an Activex control. i have CDialogBar attached to it. There uis a listbox in the CDialogBar. i tried to add a string to CList box. But it gives an Runtime error. I used the Folllowing code. CListBox *listBox=(CListBox *)GetDlgItem(IDC_LIST1); listBox->AddString(L"Hai"); i think listbox pointer not asigned to point the list box. Please help me.
-
ActiveX or GDI+ (i don't know which one gives me Problem)I am witting an activeX control to display jpg image. I am using GDI+ to load and display the Image . It Works fine. But When i closed the ActiveX test container,the window is closed but TSTCON32.EXE is running. i saw it in TaskManeger. When i used that ActiveX Control in (web) html, it works fine. But iexplorer.exe is running. When i used it in someother vc++ dialog based programs same thing happens. What is the problem ? please anyone help me. :omg:
-
change mouse cursor at run timei am writting an ActiveX control. i want change mouse cursor at run time. i written the following code in OnSetCursor. SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); But OnSetCursor is not called. how call the OnSetCursor. won't framework call it? :omg:
-
text colorthere is any way to set transperent color ? in SetTextColor. :omg::wtf::sigh::^)
-
Toolbar in ActiveX Controli added the toolbar . but now i display a dialog box when double clicking on the activex control. it work fine. but when i touch the title bar to move the dialog box it hangs. please help me. :omg::sigh:
-
Dialog box hangs help mei tried it but it hangs when i touch the title bar :sigh::omg::wtf: