|
okay, it's done.
Still the same problems and I need to run a workaround still. Is it known that STL implementation is a little clumpsy? Had no problems on Unix platform.
|
|
|
|
|
Regarding STL compliancy with ISO, indeed you are very unlikely to be able to compile without a slight change, such like project settings or one or more #ifdef#define. Post a code snippet if you are stuck, I am sure one of the people out there will help you in no time,
And I swallow a small raisin.
|
|
|
|
|
okay - thanks a lot for offering help! I got the hint already to use 'stlport' or other supplementary STL libraries. I'll post problems, when it can't be solved with a little googeling.... have a nice weekend
|
|
|
|
|
What problem are you running into? There may be a fix you can apply or the other option is to use another implementation of STL such as http://www.stlport.org[^]
I've run into problems before (can't remember exactly what) and had to work around them.
Todd Smith
|
|
|
|
|
I have an MDI application where the view class has a dialog box as a member. When I change between the views I want to hide the dialog box. In the CView::OnActivateView function i hide the dialog when I change between the two views.
My problem is when i change from the dialog box to the the other view. I don't know how to hide the dialog box i that case. Can somebody please help?
I also committed the crime of posting a programming question in the Lounge.
|
|
|
|
|
Hi.
I want to display thumbnails of images. I tried using the "Imaging for Windows" ActiveX control imgthumb.ocx (Kodak image thumbnail) that comes along with Windows2000. I use VC++6.0.
I want to dynamically create the thumbnails. I am unable to figure out which functions to call.
Here is my code snippet.
It does not show any error, but nothing is displayed.
Can you point out what is wrong?
m_thumb = new CImgThumbnail;
BOOL res = m_thumb->Create("Thumbnail", WS_CHILD | WS_VISIBLE | WS_BORDER,
CRect(100, 100, 170, 170), this, 1341);
m_thumb->SetThumbWidth(50);
m_thumb->SetThumbHeight(50);
m_thumb->SetImage("c:\\flowers.jpg");
m_thumb->SetEnabled(true);
m_thumb->SetThumbCaption("seen???");
m_thumb->SetThumbBackColor(0);
m_thumb->SetThumbCaptionColor(100);
VARIANT image, page;
BSTR bst;
CString str="c:\\database_n\\flowers\\21099_wallpaper110.jpg";
bst = (unsigned short *)str.GetAt(0);
image.vt = VT_BSTR;
image.bstrVal = bst;
page.vt = VT_I2;
page.iVal = 1;
m_thumb->UISetThumbSize(image, page);
VARIANT thumbno, options;
thumbno.vt = VT_I4;
thumbno.lVal = 1;
options.vt = VT_I2;
options.iVal = 0;
CString str1 = m_thumb->GetImage();
m_thumb->DisplayThumbs(thumbno, options);
//m_thumb->Refresh();
However, the thumbnail is displayed when I put the control in a dialog box (using the editor), and set its properties.
Where am I going wrong in the dynamic creation process?
Hope somebody can throw some light.
Thanks.
Logic is a systematic method of coming to the wrong conclusion with
confidence.
|
|
|
|
|
I did that in CDlg::OnInitDialog() implementation :
CRect rect(10,10,150,150);
m_pCtrl = new CThumbnailctrl1();
BOOL bOk = m_pCtrl->Create(NULL,
"thumb",
WS_CHILD|WS_VISIBLE,
rect,
this,
100);
m_pCtrl->SetImage("c:\\011.jpeg");
And when I ran tha dialog-based MFC app, I saw the actual image on screen. At least this works so far.
And I swallow a small raisin.
|
|
|
|
|
That is working for me too.
But my aim is to place the control in a CHtmlView-derived window. It is not getting displayed there.
Can you figure this out?
Thanks for the response.
Logic is a systematic method of coming to the wrong conclusion with
confidence.
|
|
|
|
|
Easy to figure out, CHtmlView is a placeholder (understand : just a window border) for the web browser OCX. Hence you have no chance of displaying your control on top of it, if that's that what you'd like to do.
Well to be honest, you may achieve some "BringToFront()" or something if you hack down COleControl internal behaviours, but as you can imagine, it is highly not recommended.
I don't know exactly what you want to do wrt to CHtmlView. I would understand with a CDialog but I don't get it with CHtmlView. By default, I would suggest to create a default CView (would behave exactly like a window, but in a SDI/MDI model), and to create one or more of thumbnail controls in it,
And I swallow a small raisin.
|
|
|
|
|
Thanks for your reply.
My aim is to display the thumbnails of all images contained in a selected folder. For this, I have created an Explorer-style app, with a CTreeView-derived window as the left pane and I just put a CHtmlView-derived window as the right pane (anticipating future use). Using the left pane, the user can navigate to the various folders in the system. When the user clicks a particular folder, it will expand in the tree view. Also, I want the thumbnails of images avl. in that folder to be shown in the right pane.
(If you have used the IrfanView software, you will come to know that I am trying to implement the Thumbnail option avl in it).
But after you have pointed out, I have realized that it's not possible to display thumbnail control in the CHtmlView-derived window.
So, I have a plain CSrollView-derived window now as the right pane. But my problem is, I don't want to create/destroy the thumbnails every time a new folder is selected. I want the thumbnails to be remembered once they are created; something like the CTreeView behavior itself.
Can ou suggest some way out?
Thanks a lot.
Logic is a systematic method of coming to the wrong conclusion with
confidence.
|
|
|
|
|
Display folder images is part of the operating system.
You've got all the Html+ActiveX code for that in <windowsdir>\web\folder.htt.
What you may do if the Kodak activex handles a particular image file format that you need to support, is replace the default ThumbCtl class in the .htt code with Kodak,
If you need to include all this in your MFC app, I guess you can put a CHtmlView on the right and call
CHtmlView::Navigate("res://<windowsdir>\web\folder.htt?folder=...").
Modifying the .htt file for your own purpose does no harm and should bring you your entire app working fine within a couple of hours,
And I swallow a small raisin.
|
|
|
|
|
Hi,
I read the article on MPCStatusBar. It helps but I tried to use a Button and would like to include a message handle for the button click.
I'm not sure how to do this. Also the Button appears disabled.~
Anyone have a suggestion
regards
Rui
|
|
|
|
|
How I can draw bitmap on window caption ?
I want draw picture near system button[minimize,maximize,close].
Sorry my english!
|
|
|
|
|
You'll have to handle WM_NCPAINT.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
|
Is it enough to use IXMLDOMNode::put_nodeTypedValue and IXMLDOMNode::put_dataType in order to encode the data for some node?
rechi
|
|
|
|
|
I thought I'd have one last try to see if I can get some help on this, sorry to all who are sick of seeing me post this, think its the 3rd time
I'm using VS.Net with MFC and I'm using the CFtpConnection class. There is a member function, Command, which will allow you to create new commands to send to the ftp server and get responses back. I'm really needing to use this but I'm having a problem getting a response back from the server The problem is the 2nd parameter. My code just now is
CInternetFile* responseFile = ftp1->Command(pasvCommand,ftp1->CmdRespRead,FTP_TRANSFER_TYPE_ASCII);
ftp1 is a valid connected cftpconnection object and pasvCommand is just the string PASV for sending to the server. The 2nd parameter is the one that specifies if you want a response or not and is defined in the afxinet.h header as an enum with CmdRespRead the one for getting a response back. Setting the 2nd parameter in the call as CmdRespRead will throw a compiler error that its unrecognised, by using ftp1->CmdRespRead it will compile but doesn't take a response back from the server.
Does anyone know what I should put in here because I'm about to delete this project and start work on a winsock version if I can't get it fixed, not good as I know nowt about winsocks
Thanks all who read & can help
|
|
|
|
|
I don't no anything about this but did you check the return value. If responseFile == 0 you can call GetLastError to get some more information why the call failed. Can you get a response back from the server by sending a different command?
If every fool wore a crown, we would all be king - Lard
|
|
|
|
|
Nope, I tried that a couple of days ago but no luck. I've tried it on a couple of different servers and using different commands but didn't help
Thanks for replying though
|
|
|
|
|
We are trying - unsuccessfully - to import classes form a DLL (build by others developpers)
They provided us the corresponding *.lib.
Can anybody tell me how we can ensure that the DLL do export this classes?
Thanks.
CMK
|
|
|
|
|
Use dependency walker - the class names will be mangled but you should be able to work them out. They should also have given you a header file. And last of all they should have at least given you a sample app to demonstrate usage of those classes.
bibamus, edamus, cras moriemur [eat, drink, for tomorrow we die]
|
|
|
|
|
OK. Thanks. we already resolved the problem.
Indead, the .h and .lib wasn't OK. We open the .lib with notepad and noticed the names of classes wasn't the same:
CMyClass versus CMy_Class for instance.
Resolving the problem: shooting them!!!
Thanks.
|
|
|
|
|
I'm still not clear exactly about what an owner drawn control is. How is it different from a regular control? I didnt find anything describing the basic concept of what it means to be owner drawn. Any links would be appreciated.
Thanks,
ns
|
|
|
|
|
Ordinary windows controls (text box, list box, list view, button, tree view, combo box, etc.) are not owner drawn. You just have to create it. When a dialog is repainted (it gets WM_PAINT message) Windows repaints controls. For exaxmple if you have a button, and the dailog was repainted, Windows draw it using GDI functions (DrawLine, DrawText, DrawRectangle, etc.)
If you want the button to look different, you can crete an owner drawn (not by Windows but by an owner!) button. You have to draw it by yourself, using GDI functions.
I will quote a part of MSDN article about Tab controls (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/CommCtls/Tab/Tab.asp):
Owner-Drawn Tabs
If a tab control has the TCS_OWNERDRAWFIXED style, the parent window must paint tabs by processing the WM_DRAWITEM message. The tab control sends this message whenever a tab needs to be painted. The lParam parameter specifies the address of a DRAWITEMSTRUCT structure, which contains the index of the tab, its bounding rectangle, and the device context (DC) in which to draw.
By default, the itemData member of DRAWITEMSTRUCT contains the value of the lParam member of the TCITEM structure. However, if you change the amount of application-defined data per tab, itemData contains the address of the data instead. You can change the amount of application-defined data per tab by using the TCM_SETITEMEXTRA message.
To specify the size of items in a tab control, the parent window must process the WM_MEASUREITEM message. Because all tabs in an owner-drawn tab control are the same size, this message is sent only once. There is no tab control style for owner-drawn tabs of varying size. You can also set the width and height of tabs by using the TCM_SETITEMSIZE message.
Ñ There is only one MP Ð
|
|
|
|
|
see http://www.codeproject.com/combobox/listboxex.asp
|
|
|
|