|
Yes I want to make a progranm that runs the other two but I want the program to bind them.
Look to put it in another way. I make a prg and I want to bind it with another one. How do I di this frm the programming part
gabby
|
|
|
|
|
This is a wierd thread. Im guessing you have someother motivation than starting winamp and visual studio together. Hopefully you are not trying to attach some trojan hourse to someones application. Your basic problem is that if you link 2 exes you will have two entry points to the new program. Take a look at the linker documentation and see if it can do what you want
|
|
|
|
|
euacela wrote:
I want that when I start for example VC++ winamp to start as well.
This sounds like a job for CreateProcess() .
If you are wanting one EXE to be a resource of another, check out this article.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
Im creating a dialog box that uses tab controls. I dont want to use the MFC library. I have two questions.
1. When a tab is selected, is everything done automatically, or do I have to manually have to hide one set of controls and show another set (or something like that)?
2. What messages/notifications do I need to know about and deal with to get the tab functionality?
Thanks in advance
Zak
|
|
|
|
|
Sounds like you want a property sheet, instead of managing the tabs yourself. Look up the PropertySheet() API.
If you do need to manage the tabs youself, handle TCN_SELCHANGE to know when a different tab is selected. In the handler, you need to show/hide the controls youself.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
You cannot stop me with paramecium alone!
|
|
|
|
|
i need sourse code for 2d blender using openGL visualC++ programming..help me plz....
|
|
|
|
|
I'd be happy to quote on the job for you. But you'd probably benefit more from trying to do it yourself and just asking questions when you get stuck.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi!
I want to exchange data between serial port and sockets thus i think i need to use waitformultipleobjects() function.. but I do not know how to use it. I want to capture the packet if it is on the com1 and send it to socket or if it is on socket take it and write to serial port. Can anyone explain me how should I use this function?
HANDLE handles[2];
state = WaitForMultipleObjects(2, handles, TRUE, INFINITE);
is this a true use?
but how can I assign that the data is coming from socket or from serial?
thanks..
Burge
|
|
|
|
|
This is a design issue. Fundamentally, all data on the Win32 platform concise of bytes.
Kuphryn
|
|
|
|
|
Hello Kuphryn,
Sorry could not understand.. this is my first socket programming trying Have you got any suggestion for me?
thank you..
Burge
|
|
|
|
|
Check out MSDN.
I highly recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund.
Kuphryn
|
|
|
|
|
The return from WaitForMultipleObjects() specifies the event that caused the function to return.
If it was one of the handles being signalled you can find out which one by:
DWORD dwIndex = (state - WAIT_OBJECT_0);
However if more than one object is signalled then it will be the lowest index that is returned.
See MSDN[^]
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hello Antony,
If data is available at the socket part then handles[0] will return nonzero or if dta available at com1 handles[1] will return nonzero if both of them have data then handles[0] will.. did I understand correct the use of this function?
But again still I don´t know how to relate handles[0] with my process (converter function which changes the header of the datagram). I checked msdn but it was not enough clear for me to understand!
thank you for the answer..
Burge
|
|
|
|
|
If you look at CreateEvent() , SetEvent() this will help you out.
Basically you need to:
1) Create an event for handle[0] and handle[1]
2) set the appropriate event either handle[0] or handle[1] depending on what data you recieve.
The WaitForMultipleObjects() will then return with the signalled handle.
Any clearer?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Sorry!! Still I can not understand..
for (i = 0; i < 2; i++)
{
hEvents[i] = CreateEvent( NULL, FALSE, FALSE, NULL);
if (hEvents[i] == NULL)
{
printf("CreateEvent error: %d\n", GetLastError() );
ExitProcess(0);
}
}
state = WaitForMultipleObjects( 2, hEvents, FALSE, INFINITE);
??? i think here i should inform which handler is belonging to which event
switch (state)
{
// hEvent[0] was signaled.
case WAIT_OBJECT_0 + 0:
break;
...
..
.
I do not know how to hEvent[0]=>relate to select event
Can you tell me where can I find a sample which explain how to do this?
Thank you Antony!
Burge
|
|
|
|
|
Do you have a seperate thread(s) that is reading the data from serial port or socket?
I am unclear on how you get the data. It is there that you do the signalling. i.e. you signal the appropriate event when data arrives.
Generally when waiting for events to occur you are waiting for another thread / process to signal that it has something you are waiting for. When a thread enters WaitForMultipleObjects it stops execution of that thread while it waits. Subsequent code in that thread only executes when WaitForMultipleObjects returns.
Does this help?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
[edit] solved
Hi,
I have a List View Ctrl on a WTL dialog, with EDITLABELS style. However, as soon as I start editing the label, and press any key, applicaiton closes.
I had this behavior before, but I don't know what did fix it
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
Hi!
I have been having problems using this function, iI just can't seem to get it work. I have a CBitmap object, and I have to pass it to the function as a "Pointer to the file in memory from which to create the texture."
Can anybody help me, or even better, post some working code? I have tried many ways but none of them work
Thanks
Eugi Games
|
|
|
|
|
Hello!
It seems to me that setscrollinfo both updates the position of the thumb and scrolls the window. this annoys me very much because I want to scroll the window, and setscrollpos just ruins everything.. Is there a function that only sets the position of the thumb?
I'm using mfc.
|
|
|
|
|
You could try calling the API-version ::SetScrollInfo .
|
|
|
|
|
If i recall, position of the thumb is always relative to other information.
if Min is 0 and Max is 100, and pos is 50, then thumb position will be 50%. The scrollbar is probably attached to the document you're viewing so its normal that changing the pos or scrollinfo will move the view of the document.
Why are you trying to change only the thumb position ?
DarkByte
|
|
|
|
|
Because I'm writing an application that behaves like mspaint, and I use SetViewportOrg for scrolling.. Do you have a better suggestion?
|
|
|
|
|
How about you create the scrollbar yourself instead of relying on the scrollbars of the window. You could even subclass the scrollbar to add your behavior.
Other possibility is to control the repainting behavior so that you decide yourself when you try to repaint offsetted and when you dont.
There's probably many other different ways, but they all involve changing some default behavior somwhere.
DarkByte
|
|
|
|
|
Okay.. I just talked to a guy, who told me that I shouldn't be using CScrollView, because it behaves differently from other views. And true enough. When I switched to a standard CView, SetScrollPos didn't scroll my window anymore. I think that's werid.
|
|
|
|
|
i want to get the information and icon of shortcut of desktop by selecting with mouse. i get the list view of desktop shortcut and also i can get the selected index number of shortcut. i am using VC++6.0 and windows 2000 professional. "what i want is to get the icon image and icon name and shortcut link file name". the following code i am using. Mouse hooking is not needed.
HWND hWnd = ::FindWindow("Progman", NULL);
if (NULL != hWnd)
hWnd = FindWindowEx(hWnd, NULL, "SHELLDLL_DefView", NULL);
if (NULL != hWnd)
hWnd = FindWindowEx(hWnd, NULL, "SysListView32", NULL);
if (NULL != hWnd)
{
UINT count = ListView_GetSelectedCount(
hWnd
);
INT mark = ListView_GetSelectionMark(
hWnd
);
int nItem = ListView_GetItemCount(
hWnd
);
... ... ...
}
|
|
|
|