|
Hi,
I saw your posting about APP(Asynchronous Pluggable Protocol).
I'm in same situation. I have a sample on MSDN but I can't make it "RUN" from VC++ 6.0.
It looks working in normal situation, but I can't trace the codes in VC++.
I hope to get advice to trace APP sample or similar sample in VC++.
I'm working in IE 5.5, Windows 2000 with sp1, VS with sp4.
Thanks in advance.
Regards,
Ryan
|
|
|
|
|
Hi all,
I have a dialog which has a static textbox that says "The file c:\foo\bar.txt cannot be loaded. You must decide what to do now." and a few buttons beside the textbox to present the user with the choices. There is no problem with the dialog except when the pathname is really long (i.e. 4095 characters long), then the textbox cannot include the whole sentence. What do I do?
I have think of a few ways already but these won't fix the problem:
1. Use a messagebox(but I need more buttons than just OK and Cancel)
2. Use a ellipsize function. (but I want to present the user with the full filename, that's the whole point of having another dialog box)
3. Use "Resizing text to fit in rect" in an earlier article by Jason Phillips. (but this will result in some really ugly code and break a lot of other codes)
What I'm thinking of is, is there some GUI design techniques that will solve this common problem of long filename?
Thanks in advance.
|
|
|
|
|
Instead of a static text box, I recommend you use a "Read-Only" edit box. This will still chop off the name when it's long, but at least the user will be able to scroll through it with the cursor and even copy it to the clipboard if he/she wants.
Regards,
Alvaro
|
|
|
|
|
Dear eng,
I agree; a read-only edit box is the way to go. Also, you can turn on its "Word-Wrap" style simply by turning of the Auto HScroll and Horizontal Scroll styles.
Then make it so that it looks like a listbox (as in area), so that the filename will wrap and add a Vertical Scroll bar (but turn off Auto VScroll) so theu user can scroll the text. They also get a context menu that they can use to copy text to the cliboard with!
Yours,
Brian Hart
|
|
|
|
|
|
Dude, make it multi line text. use \n inside the text string to tell the static control to show the text in the next line. Also you need to increase the width of the control in order to see the rest of the lines.
I hope this helps.
vance
http://upside.hypermart.net
|
|
|
|
|
Hi
I think you can go for multiline scrollable editbox with readonly attributes.
|
|
|
|
|
First of all excuse my english level, I'm just a begginer with it.
I would like to serialize an array of structures, how should I do it?
Thank you very much for your help.
|
|
|
|
|
Look at how the CStrokeList in the Scribble example is serialized - exactly what you need.
|
|
|
|
|
I would like to be able to edit the subitems of a ClistView that's on a SDI app., could you tell me how should I do it?
Thanks a lot for your attention.
|
|
|
|
|
SetItemText should work.
Regards,
Alvaro
|
|
|
|
|
If you mean that you want to allow the user of your program to edit the data, such as in a spreadsheet perhaps, then there is quite a bit of programming required to do that. I am not familiar with the articles available in this web iste, but there is probably at least one article describing that kind of stuff. I know that the CodeGuru has at least one.
|
|
|
|
|
I'm about to post an article that will show you how to do this. Hassle me in a day or so if it doesn't appear.
- Chris
|
|
|
|
|
Will the version you post be strictly an ATL/WTL version? There are plenty of MFC solutions out there. I'm having trouble with the whole PreTranslateMessage stuff and WTL.
Thanks,
Twain
|
|
|
|
|
Can anyone post a quick sample code on how to use StrecthBlt?
I have a bitmap that I want to resize to its half-size.
Thanks a lot in advance.
|
|
|
|
|
assume your image is in m_bmp, and pDC is a window DC.
CDC memDC = CreateCompatibleDC(pDC);
CBitmap *pOldMemBmp = memDC.SelectObject(&m_bmp);
pDC->StretchBlt(outX, outY, bmpWidth / 2, bmpHeight / 2, &memDC, 0, 0, bmpWidth, bmpHeight, SRCCOPY);
memDC.SelectObject(pOldMemBmp);
--
if you don't know bmpWidth and bmpHeight :
BITMAP bm;
m_bmp.GetObject(sizeof(BITMAP), &bm);
bmpWidth = bm.bmWidth;
bmpHeight = bm.bmHeight;
-c
|
|
|
|
|
Does anyone know of a tutorial or webpage that discusses how to create an app that uses more than one document types? i would be very grateful if someone could help. thanks!
|
|
|
|
|
Just add more document template(s) for your other doc/views
and see what happens when you select File / New. You'll be able to go on from there.
Else the VIEWEX sample that came with Visual Studio does what you want.
|
|
|
|
|
We use a lib and a dll to store our shared dialogs.
At compile time we get the following warning:
i:\eldis3\bib_source\eurodialoge\errdlg.h(19) : warning C4275: non dll-interface class 'CDialog' used as base for dll-interface class 'ErrDlg'
c:\programme\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'
This warning seems to be really just a warning (We cant find any real problems...
...but...
...a warning is a warning.
Does anyone knows how to get rid of this?
This is how we declare our class:
class LIB_EXPORT ErrDlg : public CDialog
where LIB_EXPORT is:
#ifdef _AFXDLL // Sonderfall MFC-Klassen in DLL
#define LIB_EXPORT AFX_EXT_CLASS
#else
#define LIB_EXPORT __declspec( dllexport )
#endif
#else // UNIX
#define LIB_EXPORT
#endif
|
|
|
|
|
Hi
seems to me that you are using MFC staticaly linked, so CDialog isn't in a DLL but in the lib. Guess youget rid of that warning when you use MFC as a shared DLL.
|
|
|
|
|
The MFC is shared (in every project)
|
|
|
|
|
I m developing a COM object for using as ASP component. Problem is that I need to do something like this.
"I want to get physical hard disk path of ASP page which uses this COM. I want to get this physical hard disk path from within VC. When ASP calls Server.CreateObject("Object") and then call some methods of COM, then in COM I want to get physical hard disc path(e.g. c:\testing\ASP\) of ASP page that uses this COM".
I think my problem is clearly understandable for you.
If someone knows its answer then please mail me at haider_haidee@usa.net
Thanks!
Haider
|
|
|
|
|
Hi,
You can get the physical hard disk path of the asp
as follow.
<%
Response.Write (Server.MapPath ("/"))
%>
Regards
Alfadhly
|
|
|
|
|
Hi,
You can use the MapPath() method of the IServer interface in C++.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
Hello
It is no problem to set an icon in a button,
but I have problems to set a user defined icon.
The icon size in a buton is only 32 x 32, but
I need a schowable size of 32 x 64 (or bigger).
I use this code :
CButton m_Button;
HICON m_Test;
m_Test = AfxGetApp()->LoadIcon(Icon_Test);
m_Button.SetIcon(m_Test);
Another Question:
How can I set an icon and a text in a button ???
thank`s and bye,
Sascha
|
|
|
|