|
Hi..
i build an FTP application with VC++ 0.6 to upload files to ftp server in my company i test the project from my home computer it works correctly and it lists all directory in the server and perform the upload correctly ..
but in the company it can not list the ftp directory (No error message or warning) ...
i think it's because of the firewalls installed in my company network ..
How can i over come this problem?????
Note: i asked this Q before and i the answer was to change the setting for Firewalls but why we did not do that with regular FTP software which will be in the same case with my application!!!!
|
|
|
|
|
Dear All,
I am trying to make a GUI inferface for a plant system monitoring (Final year project). So, I tried to put (Blt) a pic in a screen and detect the mouse event (X,Y coordinate and Left click button).
My method is to make define a X,Y coordinates of the pic in the file header. afterward, checking the mouse event in windows callback function. My problem is that the vaules of clciking mouse coordinates and pic coordinates are not inconsistance. Is it possible ?
My script is
//***** Define the value of the pic
//-----------button1-----------------------
int button1StartX=250;
int button1EndX=250 + g_menuwidth;
int button1StartY=150;
int button1EndY=150 + g_menuHeight;
ScSurObj g_button1;
//********** Displayframe Function *********
g_pDisplay->Blt( button1StartX, button1StartY, g_button1, NULL);
// ******** Win Main Call back function*********
// To Operate Mouse Detection
case WM_LBUTTONDOWN: /* process left button */
MouseMovementDetection(hWnd,msg,wParam,lParam);
break;
// ******** MouseMovementDetection function*********
if ( XMouse > button1StartX && XMouse < button1EndX )
if ( YMouse > button1StartY && YMouse < button1EndY )
g_FrameDisplay = 2;
Regards,
Anson Tong
|
|
|
|
|
CPoint p(XMOuse,YMouse);
CRect rect(button1StartX,button1StartY,button1EndX,button1EndY);
if (rect.PtInRect(p))
{
}
|
|
|
|
|
Hi Experts,
I suppose this question must be asked alot, but I'm so stuck and really need a simple example which I've been searching for, for almost 3 days
I'm just learning VC++6, and have read lots in the last week, and studied examples, tutorials etc.. but this one is beyond me and I can't get anything to work.
All I want to experiment with is to open a window any window, and LoadResource() (HTML resource) in that window? Is this possible? I've gone through all the "Hello World" tutorials, but each one only demonstrates static text.
I know how to start a project, add a resource, pop open the Win32 Application that says "Hello World", but that's as far as I can get. I've read most of the Microsoft tutorials which are sooo confusing, and tried LoadResource(), RESOURCE_NAME = ""; etc.. I did find some tutorials about loading a resource, but they are so complicated as they are doing much more than "step one".
I hope someone can kindly show me an example I have VC++6, SDK is installed (Core/Internet), WTL, and my programming background is Perl.
Thank you for reading my post.
|
|
|
|
|
|
Thanks for the reply.. however I know how to include a resource, and I tried their example: ShowHTMLDialog : but the problem is how to get it in a window like a "Hello World" tutorial, except the "Hello World" is pulled from an html resource file? Sorry.. I'm a complete noob, and I've searched through all the examples only to get errors everytime I try to loadresource's?
|
|
|
|
|
<shameless_self_promotion>
Try this article[^].
</shameless_self_promotion>
Software Zen: delete this;
|
|
|
|
|
Thank-you so much Gary and Gerald for answering my post.
Gary.. your article is probably really fantastic for someone who's been at this a bit longer than me.. unfortunately it confused me like crazy (It works really great by the way) I feel like a real dough dough head right now!
However... persistance really pays off, as the sun is shining on me today ... I finally found an example (My search string on Google was totally by fluke) that works with the "Hello World" tutorials I've been reading. It loads a resource in the statement block "LRESULT CALLBACK WndProc", which is the coding I was learning for opening a straight forward window.
I'd love to share the code for others that may need it, but I can't explain what it's doing, so maybe one of the experts here could write an article on how to load a resource in a simple window based on the Hello World tutorials. <- That would be fantastic
Once again thanks alot.. this place is really awesome in regards to examples, and help.
|
|
|
|
|
Hi all;
I badly need a DialoogBar in my application. I have include the Dialog Bar included in "registered visual c++ components" to my project and it works just fine. The only problem is that i need to implement tab control on the DialogBar. In order to create, initialise and attach items to the tab control, i need to add a snippet. When i add the snippet in OnInitDialog for a modal dialog, it works fine. The problem is that the DialogBar is of style -> child (Not modal) and i really don't know which event to call to create the tabs on the DialogBar. Can somebody please help me on this thing. I really really need this very quick.
Thank you beforehand guys;
Krugger
|
|
|
|
|
Dll's I have used for years on NT 4.0 and 2000 now don't work. I had these installed on a
Windows 2000 system, where they worked well.
I've now migrated to a Windows XP (SP1) system, and re-installed there.
I now find that they do not work, and the
error I get is consistent with xxxxx.dll not being installed. When I try
using regsvr32 to register xxxxx.dll, I get "DLLRegisterServer entry
point not found".
Any ideas on how to fix this situation? (Apart from the obvious one blowing the %$#@#&^ xp box off the planet?)
Best Wishes,
ez_way
|
|
|
|
|
Hi
Does anyone know how to create a dll to store /retrieve bmp's?
Best Wishes,
ez_way
|
|
|
|
|
Create the DLL as a resource-only DLL. This article[^] in the MSDN should help. I found it using the search term "resource-only DLL" (quotes included). There's another article on the same topic that is VC6-specific, if that's what you're using.
Software Zen: delete this;
|
|
|
|
|
I need my program to test if caps lock is on or off
GetAsyncKeyState() and GetKeyState() dont work too well for testing if it's on or off, they GetKeyState() only seems to work once, GetAsyncKeyState only works when the capslock key is pressed. is there some other way i could check is caps lock is one or off?
|
|
|
|
|
GetKeyState() is what I use, and I have had no problems with it. Just make sure you check only the low-order bit.
BOOL bCapsOn = GetKeyState(VK_CAPITAL) & 0x01;
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
can you explain this low order bit and high order bit stuff to me?
when i use this, i just check if the return value is -32767, like i seen in a VB example of using GetAsyncKeyState
|
|
|
|
|
|
Hi there:
I am double buffering (CMemDC) a view in a multi-splitted window, and I am still seeing flickering in a control that is dynamically created (slider bar) in one of the double-buffered windows. When I create the control it is with the Create function and the parent CWnd is the view within the splitter.
Does anyone know what is needed to get rid of this flickering? Thanks
My neighbours think I am crazy - but they don't know that I have a trampoline. All they see my head bobbing up and down over the fence every five seconds
|
|
|
|
|
I think in your parent window you use the WS_CLIPCHILDREN | WS_CLIPSIBLINGS styles and your children should stop flickering.
I think anyways
HTH
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Hello,
I have an application that uses WTL classes,
I try to add buttons to CToolbarCtrl
CImageList images;
1.
images.Create(32, 32, ILS_ALPHA | LR_CREATEDIBSECTION, 0, 2)
2.
images.AddIcon(CIconHandle().LoadIcon(IDI_FILEMENU, 32, 32))
images.AddIcon(CIconHandle().LoadIcon(IDI_SETTINGSMENU, 32, 32))
3.
TBBUTTON(..)iBitmap = iIndex;
4.
ctrlToolbar.SetImageList(images)
... and buttons have black background (there where should be transparent), of course i could set bg color with
images.SetBkColor, but toolbar in XP might have gradient bg...
What i do wrong ?
How to add an icon, in order to paint it with transparency?
NodeX
|
|
|
|
|
I develop a program for handicapped people. (Sorry for my English, French)
I found to intercept all the messages of the mouse towards my program (with MOUSEHOOK in a Dll) but I still have a problem.
How to simulate that the left mouse button is down (remain inserted)
to help the people for move items or to select text etc...
Thank you for your assistance
Jm Berckmans (jeanmichel.berckmans@skynet.be)
|
|
|
|
|
A very good introduction to global hooks : http://www.flounder.com/hooks.htm[^]
Not having done what you want to do, this is just a guess. How about, when your user presses the left mouse button down, you set a flag in your dll, and while that flag is set you block all subsequent left mouse button messages until the user does whatever they have to to clear the flag. I believe you can block mouse messages by having your hook function return any positive value instead of returning the value returned by CallNextHookEx() .
Untested code, but this should give you an idea.
LRESULT CALLBACK MouseHookProc(int code, WPARAM wp, LPARAM lp)
{
LRESULT ret = CallNextHookEx(m_hMouseHook, code, wp, lp);
if (!m_bFlagSet && wp == WM_LBUTTONDOWN)
{
m_bFlagSet = true;
return ret;
}
if (m_bFlagSet && (wp == WM_LBUTTONDOWN || wp == WM_LBUTTONUP))
{
return 1;
}
return ret;
}
HTH
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
hai all
Is it possible to invoke an application ie already installed in another computer of a network using vc++.
Please help me
Thank you
|
|
|
|
|
Basically, yes, and no.
For example, if you had a computer on the network that has a program MyRunThis installed, and the folder in which the application is was shared, you could start the program by using ShellExec and a command string "\\computer_name\folder\MyRunThis.exe".
In order to run a program on a remote computer, it must be made available by some way. This means that if the target computer's application's folder is not shared or registered as a DCOM server, you cannot start it. This is a security issue, thus making it impossible to execute malicious code without a clear security vulnerability first available.
If the computer resides on a LAN, it shouldn't be a big problem for you to share the target folder, then use ShellExecute to start it. If you have access to the application's source code, register it to support Automation, and this will allow you to create an instance of the application by calling CoCreateInstance.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hello!
I'm not very good at vc++.
Could anyone let me know that how can I call up the Windows print dialog in vc++ (non MFC) ?
And how can I print out a MS Word/Excel doc. using the information retrieved from this print dialog ?
Many thanks for answering my question ! =^^=
|
|
|
|
|
Try using the ShellExecute function, with the operation argument set to "print".
Software Zen: delete this;
|
|
|
|