|
I did manage to get the row and col of a list control by putting the option LVS_EX_FULLROWSELECT on for the list control, but it looks a little messy with one whole row selected. When I turn this setting off I aways get -1 for the row (item) and thats with GetNextSelectedItem() and pNMHDR methods.
I dont know a better way to get both the row and col of a list control.
I am sure someone will know of a neater solution.
grahamfff
|
|
|
|
|
Hi all
How can remove window boarder,caption ,minimize maximize and close button.
infact i want to keep only and only client area of the window using win32 api.
can any body help me with code.
|
|
|
|
|
Are you using CreateWindow() ? Try using WS_POPUP | WS_VISIBLE as the third parameter.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi David.
well this code i think wil work for those window which will be created by createWindow().( i will check this in short while)
but my problem is not that .what iwant is i want to remove all these decoration stuff(caption,window freame , min,max,close etc) against any click .and again against some even i want these decoration should back.
and i have to implement this for any window either made my application or some othere application which is already runing .
After getting handler of other process window i want to implement this remove/add decoration functionality .
say for example :i want to add/remove decoration of WindowMedia player.
pl see if you can hekp me.
Regards.
Harris.
|
|
|
|
|
Not all styles can be added/removed at runtime.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hey Friends
I have created an application which dials out a number and plays a .wav file.Now i need to test the application but on my current premises, I do not have a Phone Line.
Is there any way by which i can test my application without Phone Line and Modem ?
|
|
|
|
|
You can use one of these.
www.teltone.com
http://www.teltone.com/products/simulators/tls3/home.htm
Teltone's TLS-3B is an inexpensive simulator that makes it easy to perform basic feature and performance testing of telecommunications equipment including:
Telephones
Modems
Faxes
Caller ID equipment
Anything that connects to a phone line!
The TLS-3B is Teltone's lowest-cost unit. You plug in a phone to one of the two ports, and you will think you are connected to the phone company! Dial the default or programmed phone number, and the other line will ring. It's like having a miniature public telephone network in a box.
The TLS-3B has programmable functions which allow you to configure features like caller ID, test tones, and hot line ringdown.
That's what I used to do.
|
|
|
|
|
Hi
I have some memory leaks in my application.
I found the functions which gives me memory dumps. I use _CrtDumpMemoryLeaks() function but it gives output on standard console...Where as I want it in one text file. Can any one help me how to do that....
Regards
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Hello
I want to make a wizard like the once in Access where we can find the path and select a database then the table and then the fields we want to work with..Is it possible?
Like is there any kinda ActiveX controll or some software I really would like to know..So if you know please tell me..
Thank you very much..
Have a nice day!
|
|
|
|
|
Right here...
http://www.codeproject.com/property/simplepropertywizard.asp
|
|
|
|
|
I have created 2 sockets .
I fr my server application <192.168.2.20> port 80
I fr my client. IP Address assigned: 192.168.0.51 port 80
Both The applications reside on the same machine.
When I execute the server it runs fine
But when I run the Client , it shows error code : 10047
Yeah, After surfing the net I got to know that Protocol family not supported ...
But the problem iz........
Unless the Connection is not established between the two applications
how come it give such error.
What Can there be other possibilities?
The portion causing error is Enclosed.
With hope to recv earliest suggestions i Thnx in Advance.
int main()<br />
{<br />
::<br />
::<br />
sock_creation();<br />
::<br />
::<br />
}<br />
<br />
int sock_creation()<br />
{<br />
int rc,k;<br />
struct sockaddr_in addr;<br />
char *servername;<br />
struct WSAData wsaData;<br />
printf("\n Count 10 n Resume ...\n");<br />
int wsaret=WSAStartup(0x101,&wsaData);<br />
if(wsaret<0) <br />
{<br />
printf("Unable to Initialize Windows Socket Library");<br />
k=getch();<br />
exit(1);<br />
}<br />
<br />
else <br />
{<br />
printf("\n Initialized Windows Socket Library");<br />
<br />
}<br />
<br />
<br />
conn=socket(AF_INET,SOCK_STREAM,0);<br />
servAddr.sin_addr.s_addr=inet_addr("192.168.0.51");<br />
servAddr.sin_port=htons(u_short(8080));<br />
<br />
<br />
if(conn==INVALID_SOCKET)<br />
{<br />
printf("\n But Unable to Initialize Windows Socket");<br />
k=getch();<br />
exit(1);<br />
}<br />
else <br />
{<br />
printf(" \n Initialized Windows Socket As Well.....");<br />
<br />
}<br />
if(bind(conn,(sockaddr*)&servAddr,sizeof(servAddr))!=0)<br />
{<br />
printf("\n But Failed to bind !!! Error Code %d\n ",WSAGetLastError());<br />
k=getch();<br />
exit(1);<br />
}<br />
<br />
<br />
servAddrSrvr.sin_addr.s_addr=inet_addr("192.168.0.20");<br />
servAddrSrvr.sin_family=AF_INET;<br />
servAddrSrvr.sin_port=htons(80);<br />
<br />
return 0;<br />
}<br />
amit mishra
|
|
|
|
|
Seems you are trying to bind the client socket also at port 80 which is not necessary .You can not bind two sockets on a same port ( exceptions are there but you wont need it )
So do this way ...Create a server socket , bind it to port 80 of you IP and make it listen for incomin connections . Next create a client socket . *Dont* bind it toany port (or bind it to non-80 port ) and connect toserver at 80 ...
Dharani Babu S
redindian
|
|
|
|
|
Thnx fr guiding me . This being my fst attempt in socket prg.
Yeah i cud move ahead all bcoz of u , but caught again midway.
In my server program when i use recv() it gives the failed to bind and failed to listen errors. When i m trying to print the acceptance after the accept function it shows the connection. That <client ip="" address="" is="" connected="">
On other side When i use recv fn in Client application some garbage is printed in . I use it like
<br />
{<br />
<br />
char buff[512];<br />
servAddrSrvr.sin_addr.s_addr=inet_addr("192.168.0.20");<br />
servAddrSrvr.sin_family=AF_INET;<br />
servAddrSrvr.sin_port=htons(80);<br />
connect(conn,(struct sockaddr*)&servAddrSrvr,sizeof(servAddrSrvr));<br />
recv(conn,buff,sizeof(buff),0);<br />
printf("%s\n",buff);<br />
}<br />
Can u say me where i went wrong.
amit mishra
|
|
|
|
|
You're ignoring the length of received data (returned by recv() ), you're not checking if all data is read in a single call to recv() and you're assuming that the data placed in buf by recv() is zero-terminated.
|
|
|
|
|
Hi all! I am Alex and wanna get help for how to Open the binary data file in C++ through the code. Actualy, the information in these data files are in hexadecimal forms, so I wanna ask how to use code to convert hexadecimal number to decimal number!
Weclome for all help!
Thank you very much!
Alex
|
|
|
|
|
Alex Wong 19 wrote:
...how to Open the binary data file in C++ through the code.
I would suggest CFile for this.
Alex Wong 19 wrote:
...how to use code to convert hexadecimal number to decimal number!
This is limited information, but my first inclination would be to use strtoul() . This assumes you would be reading the data in as a string.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi world,
I'm want limiting a folder size. My application create some files inside this folder but I don't want exceed the desired size. Thus this application must delete older files when I want to add new file (to always respect the size limitation).
Anybody have an idea to do that?
Thank in advance...
Hello World!!!
from Raphaël
|
|
|
|
|
U may monitor that specified folder
ReadDirectoryChangesW is the API
it gives u many notifications (including size change, files added etc)
I hope this will help u
|
|
|
|
|
Rather than handle this at the software level, why not use quotas offered by the OS?
If you must attack this via software, a rough example is located here. It's specific to cookies, but you can alter the code as necessary to clean out old files.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello everyone,
I am using an MFC dialog based application where a gif is loaded into the dialog. Now, the problem is that some of the controls within the dialog become hidden by the image.
What I want to do is to place the controls infront of the image as a background. Can anyone guide me.
Thanx in advance
|
|
|
|
|
Call SetWindowPos(wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE) to all hidden controls.
Robert-Antonio
"It's a good luck, when you meet a real fink. Then you get a respect to
normal, mid-honest people."
|
|
|
|
|
is this one able to replace IAMMultiMediaStream::open file?
i want a sample of using it.
who can do me a favor?
|
|
|
|
|
I have an editor applications which should bring up a window or dialog with the list of keywords. Based on the selected keyword the window should show the appropriate controls in the window. Filling up input into these controls and clicking insert the keyword should get inserted into the editor.
PLease someone help with some ideas on this.
|
|
|
|
|
The simplest approach is, that you create all controls in Dialog editor. In OnInitDialog you parse the keywords and set CWnd::ModifyStyle(WS_VISIBLE, 0, 0) to appropriate controls. This function makes the controls invisible.
Robert-Antonio
"Love without sex is like a fish without antlers"
|
|
|
|
|
also, I would put each set into a vector collection so that for each collection you can use the iterator to iterate through each one and set the visibility appropriately.
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|