|
Right now i got 2 icon's
One i control
And the other is a object
And i made a control that every time its pressed, moves the icon +10y direction
It works great but i dont know what codinat it was on, i think if i placed the icon
in cod y10, x10, and then plus 10y every time i press the button, then i know where it is,
with some BASIC math, y20, x10.
But i want to example print the 2 icon's codinat's to a text box
and compare the to icon's codinat's with each other. And if they are equal
They hit.
But i dont know how.
THANKS
|
|
|
|
|
ok
so they're floating around a dialog box ... presumably you would know where they started out and could keep track that way or you could use the GetWindowPlacement function on the icons (buttons, whatever)
also dont look for an exact match of co-ordinates but use a collision hotspot area where you say, for example, that if they overlap in any way by x pixels there is a hit
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Eh, it sound's easy, but i dont quite understand
Do you have a simple source file i could look at
Thank's
|
|
|
|
|
Is there a way to make a window be the lowest at all times? (a window style exactly opposite of the ws_ex_topmost)
|
|
|
|
|
use SetWindowPos with a flag value of HWND_BOTTOM
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
How to disable some system hotkeys such as ctrl+alt+del, alt+tab key
wanghz
|
|
|
|
|
To disable ctr-alt-del key (Win9x) and alt-tab (Win9x & WinNT/2K), see msdn doc at http://support.microsoft.com/support/kb/articles/Q226/3/59.ASP.
To disable ctr-alt-del sequence for Windows NT and 2000, you can find documentation at http://wwwthep.physik.uni-mainz.de/~frink/nt.html.
Mica
|
|
|
|
|
I am developing an application, which involves an publisher/subscriber model, the publisher being one process and the subscribers being different processes, which IPC is the best to achieve this ?
I was trying to use winsock, and it looks like, there is a delay in this approach.
Thanks,
Ravi.
|
|
|
|
|
havent microsoft just recently released a publish / subscribe framework for com+ applications that takes away a lot of the headaches of doing this?
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Hi!
I saw someone with a problem in a CEdit derived class. He has tooltips associated with the edit control, and if the tooltip is displayed (in case of invalid input), and the user moves the dialog, the tooltip can't change the position, because he didn't know how to get the notification about the parent's position changing.
If someone have idea, please help!
Thanks in advance.
Attila Hajdrik
|
|
|
|
|
How about trapping the WM_MOVE and/or WM_MOVING messages in the parent window and then either reposition the child window or send a custom message to the child window??
Haven't tried it myself but I imagine it would work.
HTH
|
|
|
|
|
Handle the WM_WINDOWPOSCHANGED message to be notified when the dialog is moved.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Thanks for Your comments, but maybe i wrote something wrong...I'd like to encapsulate the parents move in my CEdit derived class. I tried to handle all size/move messages, including WM_WINDOWPOSCHANGED but I didn't succeeded.
I tried to subclass somehow the parent dialog, but that's not allowed (
Any other tips?
Attila Hajdrik
|
|
|
|
|
There seem to be no way to prevent DevStudio IDE from closing when accidentaly clicking in the x button in the corner. My projects take a long time to load so I tried automation and BeforeApplicationShutDown event. I can trap it but cannot stop DevStudio from closing anyway. What should I return from the event handler or is there any other ways to do that? Thanks to anyone who can help!
|
|
|
|
|
As far as I know this is not possible. DevStudio is simple informing all add-in and macros that it's closing down. Returning any failure code will not help.
|
|
|
|
|
How does one go about programatically (ie searching the registry, hidden API call, etc) determining the service pack for Visual C++?
|
|
|
|
|
it is enough?
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\ServicePacks]
"latest"=dword:00000004
Mike.
|
|
|
|
|
Hi,
Sorry, this is not a programming VC++ question...
I´m a VC++ programmer now for three years, and I´m thinking in becoming a FreeLance programmer, the problem is .... how to start ?, I´m living in Spain ( Málaga), and I would be interested in getting jobs, working from here and going to see the customer every X months. It is easy to get such jobs ?
Can anybody help me ( and teach me ) , a little about how to begin as a FreeLance programmer in Europe, If somebody is interested I can send my CV.
Sorry for disturbing, Thanks a lot:
Braulio
|
|
|
|
|
Hi,
Sorry, this is not a programming VC++ question...
I´m a VC++ programmer now for three years, and I´m thinking in becoming a FreeLance programmer, the problem is .... how to start ?, I´m living in Spain ( Málaga), and I would be interested in getting jobs, working from here and going to see the customer every X months. It is easy to get such jobs ?
Can anybody help me ( and teach me ) , a little about how to begin as a FreeLance programmer in Europe, If somebody is interested I can send my CV.
Sorry for disturbing, Thanks a lot:
Braulio
|
|
|
|
|
I don't know anything about the Spanish market, but here in the US, such jobs can be quite difficult to get.
The problem comes down to one of trust. They need to trust you to do what you say you will do, and that you can work unsupervised. You will usually need to work for a period of time conditionally, ie if you don't perform, you don't get paid and you don't get paid until you've finished the work.
fixed bid jobs are easier to get. You tell them "I'll do this for this much" and then you do it, and they pay you on completion of the job, no matter how long it takes. This takes a good reserve of cash on your part to keep afloat until they pay you (and they might take weeks or months to pay you after you've delivered).
You also need to check with your government about taxes for independant contractors and what rules you need to follow.
|
|
|
|
|
How do I get the local IP adress from my workstation
Does anyone have an idea
With kind regards
Le Ridder Noir
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
Hello "knoppenbonker"
First rtfm before you ask questions to this forum. For this time I spare you. Here's your code:
WSADATA wsaData;
struct sockaddr_in sock;
char hostname[128];
WSAStartup(0x0101, &wsaData);
gethostname(hostname, 128);
HOSTENT * lpHost = gethostbyname(hostname);
memcpy(&(sock.sin_addr), lpHost->h_addr_list[0], lpHost->h_length);
TRACE2 ("Host Name: %s IP address : %s",hostname, inet_ntoa(sock.sin_addr));
WSACleanup();
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
I am trying to get tooltips to work in a dialog application over a
static control.
In maindlg.h I declare:
CToolTipCtrl ctipQStatus
And in OnInitDialog:
RECT rcTest;
BOOL bTest = ::GetWindowRect(GetDlgItem(IDC_MGOOD), &rcTest);
CToolInfo ctiTest(TTF_CENTERTIP, m_hWnd, IDC_MGOOD,&rcTest, "Tooltip Test");
HWND hwTest = ctipQStatus.Create(m_hWnd);
bTest = ctipQStatus.AddTool(ctiTest);
ctipQStatus.Activate(TRUE);
Am I just completely missing how to use this?
Thanks,
sbl
|
|
|
|
|
I am using an MFC CListCtrl with multiple columns. I have two related problems:
1. I can select an item (column 0) by left or right clicking on it but subitems don't respond when clicked. I would like to pop up a floating menu on any item or subitem when right clicked.
2. There seems to be no way that I can get the control to set the subitem attribute to selected (LVIS_SELECTED) and display blue. I have looked at SetItemState (no good, can't see subitems) and SetItem (does not work, just ignores the status change).
Does anyone know how to make this SOB do as it is told and allow me to select a subitem?
Has anyone done this without MFC using only the SDK API?
|
|
|
|
|
Make this call:
yourListCtrl.SetExtendedStyle( yourListCtrl.GetExtendedStyle() | LVS_EX_FULLROWSELECT;
Then, clicking anywhere in a row will select the whole row. This requires v4.70+ of the common controls.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|