|
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.
|
|
|
|
|
OK, I thought you were going for an effect like WinAmp. (That is, you can move the window by clicking and dragging in any open part of the dialog.) The code in your original post didn't come out very well (not your fault) so I couldn't really tell what you were trying to do.
|
|
|
|
|
when transferring data across the internet, what is a good way to decide in
what size blocks to send the data?
thanks
Adam
pandcc3@comwerx.net
|
|
|
|
|
There is an old rfc (approx 971? ) that deals with the limitations of certain routers / gateways in the size of packet they can send on the internet - something like ~573 bytes.
This size, or something like it, often forms the basis for the MTU (Max Transmission Unit) on a windows PC - especially win 9x.
So, if you send large blocks, you add some processing overhead as the data block is fragmented by the socket into smaller units for transmission.
This process can be avoided, I think, if you stick to a block size of 512 - (leave enough for the IP header etc).
Tim
|
|
|
|
|
Unfortunately when you send a block via TCP/IP across the internet, you don't get too much choice as to what size you want to send.
Windows likes blocks that are 4096 bytes long (at least on PC's). If you are sending via ethernet, the block will be divided to 1500 byte blocks, which will likely become 1460 bytes of data with a 40 byte TCP/IP header.
TCP/IP allows a block to be divided into smaller blocks. For instance, an ISDN router may be capable of sending 512 byte packets. At this point your blocks will be cut to 512 bytes each.
In short, I don't know how much difference it makes if you are sending a lot of data. Just my 2 cents...
|
|
|
|
|
Hi,
Is it possible to create a splitter window without using MFC, or will I need to create my own control?
regards
Richard
|
|
|
|
|
Hi
sure. MFC does it using the Win32 SDK after all - so I guess looking at the way MFC does it should show you how to do it.
Kurt
|
|
|
|
|
sorry i don't write the english wall
please read under work...
this problem is my work.
i don't access the webdatabase on client computer
how can use it?
winsock?... or remote access
please help me
have you nice day
|
|
|
|
|
If you look at microsoft word or at wordperfect, when you get to the bottom of a page, a little line appears that looks like the following:
-------------------------- End of Page --------------------
It is any way of creating this feature for an edit box? Please, please, please any response any one can give me will be greatly appreciated.
Sincerely,
Erich J. Ruth (an overworked graduate student)
|
|
|
|
|
Hi
simply use DrawText or ExTextOut of the CDC class.
Kurt
|
|
|
|
|
Hello....
I have to write an application that can load one image and let the user draw on it two lines: the application must tell the user the degree among the two lines.
Can You help me?????
Thanks
|
|
|
|
|
If you still remember high school trigonometry, this problem is easy to solve!!
OK, here we go..
Let the endpoint of the 1st line be (x1, y1) and (x2, y2)
Let the endpoint of the 2nd line be (x3, y3) and (x4, y4).
Let the slope of the 1st line be m1 and the 2nd line be m2. [the slope can be calculated by m1 = (y2 - y1)/(x2 - x1)]. Then the angle between the two lines is given by
arctan[(m1 - m2)/(1 + m1*m2)].
Of course you have to deal with many other factors and boundary conditions, the type of coordinate system you're using, and convert radian to degree, etc...
Hope this helps.
Eddie
|
|
|
|
|
Is there a workaround for the setup program for Visual Studio 98 to install w/o
having to install IE4 first? I already have HTMLHelp 1.3 and Common
Controls 5 on my system. Any solution is welcome, even cheap hacks.
Thanks.
|
|
|
|
|
Here is a cheap hack:
Use Registry Monitor from www.sysinternals.com, start it before the setup and look what key the setup looks for to query the presence of IE4.
If it does not query the registry, but a file, use the File Monitor from the same guys.
|
|
|
|
|
Hello,
I'm a beginner (since about 8 month with c++) and I would like to write a small application, which I can use as a reference. Problem is, I don't have an idea what app to write! The application should not be network dependend (because I don't have a client/server at home), should not need MAPI or the internet (cause I have dialup and that would be a pain in the butt). The last limitation is the database. I would prefer an application that doesn't use a database.
After all these limitations, does anybody still have and idea? Preferable something that would be of use for daily development (like the includes browser, which is excellent).
So, any wild ideas are very welcome. Please note that I will do this in my free time. If the project is too large, I could only do it in tandem with somebody different.
Thanks in advance
Matthias
|
|
|
|
|
Hi, codegurus around the world.
I pointed out your one of misunderstandings.
Without the network, we can write the client-server program.
That is, we can use 127.0.0.1 IP address in our own machine
to check the functionality of the client-server. This also
applies the web development. Try to type 127.0.0.1 or localhost in the address bar of the browser.
If you doesn't have your own idea of what you want, this is not time to write you interested application. Before this, you had better learn the other stuffs like the database, network, and so on.
As you write the high-level application, we notice that we have to solve the problem by ourselves basically.
Good luck.
-Masaaki Onishi
|
|
|
|
|
Someone has asked a tool for VC++ to see tree of included headers.
|
|
|
|
|
This already exists and is called Includes Browser. I don't know whether this application is available on this site. I have found it at the www.codeguru.com.
Thanks for help anyway,
|
|
|
|
|
It is difficult to find something that doesnot exist.
If you found something, there is no warranty it does not exist. Probably you just do not know.
There are many manufacturers of bikes, BTW. And all have customers.
|
|
|
|
|