|
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
|
|
|
|
|
hi i'm charli
i don't make a file upload program on vc++ language
how can do it!!
you? yes sure ^_^
please wirte this board
please help me ~ help me~
about use wpPost or another method..
T_T
|
|
|
|
|
The following code works fine with Windows9x, but not with NT/2000. Can someone help me fix it? Or is there a better approach for moving the window rather than tracking the mouse position and use SetWindowPos(...)?
Thanks!
p.s: I know it's a Delphi code, but it's using Win32 API, not the VCL. After all, I'm converting the code to VC++
program testwin;
{$i-} // for loggin option
uses
windows,
messages;
const
szAppName = 'test window';
szClassName = 'test window class';
var
WndClass: TWNDCLASS;
Msg: TMSG;
hInst: HWND;
hMainWnd: HWND;
bDragging: Boolean;
nOldX, nOldY: Integer;
logf: Text;
function WndProc(hMainWnd: HWND; Msg, wParam, lParam: LongInt): LongInt; stdcall;
var
r: TRECT;
begin
case Msg of
WM_CLOSE:;
WM_DESTROY:
PostQuitMessage(0);
WM_LBUTTONDOWN:
begin
SetCapture(hMainWnd);
bDragging := TRUE;
nOldX := LoWord(lParam);
nOldY := HiWord(lParam);
end;
WM_LBUTTONUP:
begin
bDragging := FALSE;
ReleaseCapture;
end;
WM_MOUSEMOVE:
begin
if ((wParam = MK_LBUTTON) and
(bDragging = TRUE)) then
begin
GetWindowRect(hMainWnd, r);
r.left := r.left + (LoWord(lParam) - nOldX);
r.top := r.top + (HiWord(lParam) - nOldY);
SetWindowPos(hMainWnd, 0, r.left, r.top, 0, 0, SWP_NOSIZE);
writeln(logf, 'r.left = ', r.left);
writeln(logf, 'r.top = ', r.top);
end;
end;
end;
result := DefWindowProc(hMainWnd, Msg, wParam, lParam);
end;
procedure PreWindow;
begin
hMainWnd := CreateWindow(szClassName, szAppName,
WS_VISIBLE or WS_POPUP or WS_SYSMENU,
0, 0, 200, 100, 0, 0, hInst, nil);
ShowWindow(hMainWnd, SW_SHOWNORMAL);
UpdateWindow(hMainWnd);
end;
procedure PreClass;
begin
hInst := GetModuleHandle(nil);
WndClass.style := CS_DBLCLKS;
WndClass.lpfnWndProc := @WndProc;
WndClass.lpszClassName := szClassName;
WndClass.hCursor := LoadCursor(0, IDC_ARROW);
WndClass.hInstance := hInst;
WndClass.hbrBackground := COLOR_BTNFACE + 1;
RegisterClass(WndClass);
end;
begin
PreClass;
PreWindow;
AssignFile(logf, 'testwin.log');
Rewrite(logf);
while (GetMessage(Msg, 0, 0, 0)) do
begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
closefile(logf);
end.
|
|
|
|
|
There's a one-line way to do this! When you receive a WM_LBUTTONDOWN message, do
PostMessage ( hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0 );
|
|
|
|
|
err...
before i try it out, may i ask, what's the effect?
does it work like winamp's easy move?
thx!!!
|
|
|
|
|
well, i tried it.
but umm, that's now what i want.
i'll give you the sample code if you feel like to play with it. it's in vc++ code. just e-mail me.
|
|
|
|