Yes I have looked at this function, but could use a few pointers on how to use it. I know I can send a bmp to the clipboard with this, but is there anything I need to know when sending jpg or gif?
Stirfie
Posts
-
copy jpg to clipboard -
copy jpg to clipboardI am trying to write a function that copies a jpg or a gif to the clipboard, when I pass the path to it. ie jpgclip("C:\test.jpg") Can anybody help me? Regards Paul
-
showwindowThanks, this worked. Regards Paul
-
showwindowThis may be a simple thing but I,m stuck. In the last function of this class I am trying to show m_image_new. This is not for a serious project I am just learning, but the project will not compile. The class is:- // dlg_new.cpp : implementation file // #include "stdafx.h" #include "EditTest.h" #include "dlg_new.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // dlg_new dialog dlg_new::dlg_new(CWnd* pParent /*=NULL*/) : CDialog(dlg_new::IDD, pParent) { //{{AFX_DATA_INIT(dlg_new) m_image_new = _T(""); //}}AFX_DATA_INIT } void dlg_new::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(dlg_new) DDX_Control(pDX, IDC_BUTTON_IMAGE, m_image_button); DDX_Text(pDX, IDC_STATIC_IMAGE, m_image_new); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(dlg_new, CDialog) //{{AFX_MSG_MAP(dlg_new) ON_COMMAND(ID_VIEW_NEW, OnViewNew) ON_BN_CLICKED(IDC_BUTTON_IMAGE, OnButtonImage) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // dlg_new message handlers void dlg_new::OnViewNew() { // TODO: Add your command handler code here } void dlg_new::OnButtonImage() { //using ::CWnd; m_image_new.CWnd::ShowWindow( SW_SHOW ); // TODO: Add your control notification handler code here } The error I get is that CWnd is not a member of CString. Please help regards Paul
-
Line numbersCan anyone tell me how to show line numbers in the editor in visual studio 6. I've looked and cant find out how. Regards Paul
-
jpg supportThanks Guys
-
jpg supportDoes anyone know if visual c++ 6 MFC will let me insert jpg files. I have found in the properties box of a picture object Bitmap, Icon, etc. I tried importing a jpg, but did not seem to work. Regards Paul
-
mfc verses .netI am starting to learn c++, and have managed to get hold of a copy of Visual stutio 6. I looked into .net and found that if somebody does not have the .net environment, the apps will not work. Is an MFC app compiled with all the necessary classes to run under its own steam, or does it rely on other files? In other words, if I create an MFC app, will it run on a standard install of win 98,2000, xp. I know mfc adds a little overhead to the finnished app, but at this stage my apps will be tiny anyway. Regards Paul
-
c# or c++Thanks guys
-
c# or c++I have started learning c++, I would like to learn to create some small windows apps. Would I be better off learning c# instead? I wonder at this stage if I spend a long time on c++ then have to switch to c#, I may as well do it now. Regards Paul
-
coutThanks
-
coutIs there a way to use cout<< or something like it without including iostream. I have a simple app with one cout statement and no inputs. The file is 5k without iostream included, but 260k with it. Regards Paul
-
compiled file sizeI have a script that I have compiled on two different computers. On one the file size is 500kB, and on the other 1.23MB. Both were compiled with DEV C++. They both seem quite large given the script. Can anybody explain this. I should explain I am a beginner. The script is:- #include #include using namespace std; int GetDir(char* dPath) { WIN32_FIND_DATA FileData; HANDLE hFile; hFile = FindFirstFile(dPath,&FileData); if ( INVALID_HANDLE_VALUE == hFile ) { cout << "No files" << endl; return false; } for ( ;; ) { cout << FileData.cFileName << endl; if ( 0 == FindNextFile(hFile, &FileData ) ) break; } return true; } int main() { GetDir("*.jpg"); system("PAUSE"); return true; } Regards Paul
-
search current folder for fileI am currently trying to learn c++, and am looking for some help. I need to know how to search the folder that my app.exe is placed in, to find all jpg files, and store the names in an array. Regards Paul
-
clipboardThanks guys
-
clipboardThanks for the reply Can anyone tell me which header file I have to include to use the clipboard functions. Is it hust windows.h ?
-
clipboardIs it possible to create a console application to send an image to the clipboard using:- c:\image.jpg (for example) as part of the command line parameter. I have just started learning C++ and am trying to create some simple console apps to get started. Regards Paul