|
Hello,
I want to apply the transcoding of the images using C++.
Background :
As the bigger images with the high resolution are taking a long time to load I want to convert the images into low resolution format and to a restricted size. I am working with c++ and using the GDI+ functions to load the images.
Problem : To apply transcoding of images before actual loading.
Thanks in advance ...
Regards,
Mukta.
|
|
|
|
|
Hi,
where you want to load the image? In memory or any control?
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Hi,
Thanks for the quick reply.
I want to transcode the image and keep it in the memory first.
As and when the user clicks the thumbnail of that image I want to load the transcoded image in the control.
Regards,
Mukta.
|
|
|
|
|
Hi,
AFAIK, without loading the image you cannot do any operation on it. Atleast you have to load it in memory,to do some operations(in your case transcoding).
Transcode the image by keeping it in memory and then display or load it in the control. This will reduce the time delay.
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
we are using dynamic link library for printing purpose.
how to change orientation of default printer through program?
|
|
|
|
|
LPDEVMODE lpdevmode;
...
...
...
lpdevmode->dmOrientation=
|
|
|
|
|
thanx
we have tried this option already, the change is not reflecting in the actual device.
|
|
|
|
|
|
Hi All,
I have a dialog based app, containing two classes:
1)CMyDlg
2)CMyClass
Now, i can grab all the messages of CMyDlg in PreTranslateMessage(), but i dont want that. I would like to grab all the CMyDlg messages in CMyClass.
Anybody having any ideas? Check the link below to findout more abt it.
http://www.codeguru.com/forum/showthread.php?p=1346397[^]
Best regards,
JT!
|
|
|
|
|
You can handle CMyDlg's messages in CMyClass by subclassing the CMyDlg instance after it's been created.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thank you Ryan for you help.
Ryan Binns wrote: >subclassing the CMyDlg instance after it's been created.
subclassing the CMyDlg instance after it's been created. i have taken your post as follows:
1) The CMyDlg's instance is created in CMyApp, and there the dialog is DoModal()ed. So there in CMyApp im supposed to subclass it?
2)How to subclass an instance? can you be more specific with reference to my code at the link i posted in my previous post?
Best regards,
JT!
|
|
|
|
|
jusstujoo wrote: 1) The CMyDlg's instance is created in CMyApp, and there the dialog is DoModal()ed. So there in CMyApp im supposed to subclass it?
You'll have to do it after it's been created. In your WM_CREATE handler in your CMyDlg class would be a good place.
jusstujoo wrote: 2)How to subclass an instance? can you be more specific with reference to my code at the link i posted in my previous post?
You call SubclassWindow() on your dialog window. Have a look at the MSDN documentation to see exactly what you have to do. It's not too difficult.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hello Ryan
Do you really think that i should do this SubclassWindow()?
Isint there means by which i can get msgs in CMyClass without writing anything in CMyDlg??
Well... let me try. Isint there a way that i can do CMyDlg-subclassing in CMyClass?
Thank you.
Best regards,
JT!
-- modified at 4:32 Wednesday 8th March, 2006
|
|
|
|
|
jusstujoo wrote: Isint there means by which i can get msgs in CMyClass without writing anything in CMyDlg??
Not easily. It is far, far harder without putting anything in CMyDlg. Yes, it's possible, but complex, difficult and, in my opinion, not worth the effort.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
MAN! i did log in. and wrote such a long message, when i clicked onto the PostMessage Button... it said you are not logged in as Jusstujoo, and when Backed it didnt even reloaded the text i wrote!!!
Ryan Binns wrote: not worth the effort
Well, i wanted to ask why it isnt a well earned hardwork? and why it is worthless?
Let me tell you wats exactly in my mind.
1) you must have(assuming you do), created and used an application that sends your app to systemtray and restores back when user clicks onto the systemtray icon associated with your app.
2) i want to do the same thing.
3) and to do that you need to put a notify-message in the message map and in the notifyicon structure. and then you get the WM_LButtonDown message when user clicks onto the systemtray icon. now im not asking how to put the app in systemtray and restore it back.
4) the problem is that how to get that notify-message in my Another class, the CMyClass, which is supposed to handle all the systemtray works?
5) what if i give you my that class, and all you need to do is to create an instance, passing "this" as an argument? and everything will be handled by CMyClass(the system tray class). Got it, now i guess it should be more clear?
Best regards,
JT!
|
|
|
|
|
jusstujoo wrote: the problem is that how to get that notify-message in my Another class, the CMyClass, which is supposed to handle all the systemtray works?
You can specify any window for your system tray callback. Just create an invisible window specifically for the other class - you don't need to worry about the dialog at all.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan Binns wrote: You can specify any window for your system tray callback. Just create an invisible window specifically for the other class
you mean that:
1) i should create another dialog class.
2) and show it as SW_HIDE
3) and map the notify-message in CAnotherDlg class?
4) so, when the application icon on the systemtray will be click, it will send the notify message in CAnotherClass?
Is this correct?
Best regards,
JT!
|
|
|
|
|
jusstujoo wrote: i should create another dialog class.
I would just create another simple class derived directly from CWnd, no need to worry about a dialog. This is what I have done in the past:
class CTrayWnd : public CWnd
{
public:
CTrayWnd() { };
afx_msg LRESULT OnTrayIconMsg(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP();
};
BEGIN_MESSAGE_MAP(CTrayWnd, CWnd)
ON_MESSAGE(TRAYICON_ICON_MESSAGE, OnTrayIconMsg)
END_MESSAGE_MAP()
LRESULT CTrayWnd::OnTrayIconMsg(WPARAM wParam, LPARAM lParam)
{
return 0;
}
...
m_pTrayWnd = new CTrayWnd;
m_pTrayWnd->CreateEx(0, AfxRegisterWndClass(0), "Tray Icon Window", 0, 0, 0, 0, 0, NULL, NULL, NULL); But yeah, that's the general idea. I just had this class at the top of one of my .cpp files - no header file is needed, it's only used in one place.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I need to know how I can read the content in a pdf document using c++.
Allang Garder
|
|
|
|
|
|
which tool or switch work for it?
|
|
|
|
|
Just do a text search for "#define".
Steve
|
|
|
|
|
If you are using Visual studio then you can right click on that macro and select Goto Definition or Goto Declaration . This will take you to the file where it is defined.
Nibu thomas
Software Developer
|
|
|
|
|
I do not know what is the macro name. it could be define at .h file in cpp you can not easily to search.
|
|
|
|
|
I am using NtQueryDirectoryFile function to enumerate all files in a certain folder instead of FindFirstFile and FindNextFile. I just want to see their names so I use this structure
typedef struct _FILE_NAMES_INFORMATION {
ULONG NextEntryOffset;
ULONG Unknown;
ULONG FileNameLength;
WCHAR FileName[1];
} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
how do I translate the "FileName" parameter to an multibyte char or a readble char.
I use WideCharToMultiByte(CP_ACP,0,n->FileName,n->FileNameLength,name,sizeof(name),NULL,NULL);
but the name is not totally translated but only the first 4 or 5 characters.
variable "name" being defined like this char *nume=(char *)malloc(n->FileNameLength);
Can someone please help me with this. it is verry urgent
thanks
gabby
-- modified at 21:20 Tuesday 7th March, 2006
|
|
|
|