|
but how can I set a minimum width (e.g. when cx has a minimum size of 1024px not more resizing is allowed).
I used WM_SIZE before in order to move the dialog...
|
|
|
|
|
|
Hello,
Somebody can help me in my client/server applicationme because i want to get the user of the session of windows, but i know in the client and i can send to the server,but i dont know how can the server can know the window's user?, Existes something to the server to know the window's user of the client when the client stablish a communication with the server sending the IP, port,...
Or better, somebody know how can i get the window's user of one computer but without the function GetUserName?.
Thanks a lot
Hej.
|
|
|
|
|
look for NET* prefix functions!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi world,
My question is simple:
How can I write file with a sequencial access type?
I want this to accelerate the writing bandwidth of my HD.
With a litle application (not open source) I obtain:
- For a random writing access, my HD bandwidth is 5 MB/sec
- For a sequencial writing access, 15 MB/sec
Thanks for all answers...
Hello World!!!
from Raphaël
|
|
|
|
|
|
Thanks a lot for this solution... I will test that now...
Hello World!!!
from Raphaël
|
|
|
|
|
Is there a way my app can get the path of files dropped from it?
Example... The user drags the file "test.txt" from my app into windows explorer... can I retrieve the path the file was dropped into?
I'm using OnBegindragFilelistbox function to begin the drag process and a COleDataSource to implement the procedure.
Thanks in advance.
|
|
|
|
|
Use SHChangeNotifyRegister a window for retrieve all Events and all entries, and DoDragDrop a unique tmp file, then when the window retrieve SHCNE_CREATE, if the filepath inclue the unique tmp file, then the path is your request.
|
|
|
|
|
Hi all,
I am getting problems with my code in Release mode.because this one works in debug mode.
I had read all the articles here and even then i'm unable to solve my problem.
Always my application crahses after I reach this function in release version.
func(start,&count,&ipbytes,0,&returnbuff,compid)
here :
start value starts from 0 and go on increments
count is always 1
ipbytes will receive some data and I initialized it with 0 inside the function
returnbuffer also receives some data to store.
id is also a constant value.
My program in release version crashes at this function and says "Access Violation:Integer divide by zero".But no problem in debug mode.
I gave all the values in the function as 1(ie non-zero).Even then i am getting the same problem.
Can anyone suggest me the solution?
|
|
|
|
|
Look around for buffer overrun/underrun problems. Allocation is padded in DEBUG builds and sometimes hide these kinds of problems.
You can also "manually pad" your local and class-instance variables by putting small buffers around them. If things work after adding the buffers, you likely have an overrun/underrun problem.
From:
<br />
int iVal;<br />
double dVal;<br />
char caSomeBuffer[ 16 ];<br />
To:
<br />
BYTE btaBuffer1[ 64 ];<br />
int iVal;<br />
BYTE btaBuffer2[ 64 ];<br />
double dVal;<br />
BYTE btaBuffer3[ 64 ];<br />
char caSomeBuffer[ 16 ];<br />
BYTE btaBuffer4[ 64 ];<br />
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanx for ur reply,but I didnt understood ur idea.
And also i will specify my function in detail.
func(long,long*,long*,long,char***,long)
and I think it may not be a problem with buffer as if i give count value to zero,the code passes thru this function in release mode,But as per the logic of this function the count value must be 1.
Thanx in advance.
Regards
|
|
|
|
|
Anytime you are handling a non-const pointer to something, you are likely dealing with a buffer (or buffers). This even goes for pointers to native types like long s, where the address of a long variable is basically a pointer to its internal storage (AKA, a buffer). Thing of dereferencing as a way of getting you "indirect access" to the internal storage via the type's native capabilities.
Giving it a count of zero and not getting a problem makes it sound more a buffer-handling problem; I take it that if you pass zero, no real activity takes place in the function, so nothing really gets written to any buffers. No writes, no buffer overrun or underruns.
How is the char*** parameter handled in the function? I would start with making sure that parameter is both being created correctly before being passed in to the function, and making sure that the function is handling it correctly.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
This entire code was written by someone and I'm debugging it and succesful with debug mode.
Unfortunately I dont have source code for that function,as the function comes from an Application I installed.I just add its headerfile in my program.
Actually the application takes care of that buffer.
I just declare it as a global variable in my program.
char*** buffer=NULL;
Strangely,my compiler gives the following error when i declare it as char***(as per the function needs char***)
'function' : 'char *** ' differs in levels of indirection from 'char **** '
It works fine in Debug mode iff i declare it as char** and pass it as
func(sf,&fc,&byt,0,&buffer,id);
and code doesnt work even in debug mode if i declare as char***.
and code doesnt work in release mode whether i declare it as char** or char***
I hope u understood my problem.
Regards.
|
|
|
|
|
prgr wrote:
I had read all the articles here...
Including this one?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I need to get a IStream interface from a file.
Is it possible?
I got a function ParseData( IStream* pStream ) . But data is huge and is located in a file.
So if I could open a file and get a IStream from it somehow it would be great. But how do it do that ?
I think I need a CFile like class that also have the IStream interface to it or something.
Anyone got something like that ?
/Mathias S.
|
|
|
|
|
Something like ::OpenStreamOnFile(...) ?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
How could I have missed that? I been searching like crazy.
And after search for the one you gave me I also found SHCreateStreamOnFile that is even better.
Thanks !
/Mathias S.
|
|
|
|
|
Just be sure to pay attention to the minimum shell version required for SHCreateStreamOnFile ...!
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I'm having trouble getting the date when the user picks a date from the drop down calendar.
I added the control as an activex control to my dialog box. i created a member variable to it. So now i want to retreive the date. I created by events and they work. When a user picks a date from the drop down calendar it drops to that event. But I'm not sure how i get the date back from the control.
Thanks
|
|
|
|
|
hiho@ll
i need some resources (tutorials, ...) for CDO programming using C++
i want to sync apointments/calendar and contacts with an web application (most programmed in php)
i found a interessting project here for outlook, to read the contacts and mails, ...
but i need some infos about writing such contacts back to outlook and doing both (reading and writing) using the exchange server
i found only a few articles which helped me not much for this (caus, i'm at a beginning level in CDO)
so, anybody knows good resources for tips, tutorials (or a opensource prog, which does the sync for me!?)
thx@ll
|
|
|
|
|
Is there any way to display window created in another application inside the frame (window) in other application. Circumstances are:
- Application obtains frame-applications window handle with FindWindow(...)
- Application (MFC) creates a window (CDialog ancestor) with Create and gives queried handle as a
parent parameter
- Application notifies frame-application with PostMessage that window is created. frame-application then tries to move the window in right position inside its frame
Dependding on tricks (SetParent, SetPos etc...) best I can do is that window appears inside
frame-applications frame in weird location and does not move regardless what I do. Window is also
not displayed properly (transparent caption etc...)
In general (if possible) what would be a proper way to achieve this kind of behauviour ?
|
|
|
|
|
I like to do a component ActiveX with the following characteristics:
-a method carried a file
-the information of the file were presented in a propertysheet for alterations
-the propertypage didn't have size restriction
-the file was returned to who called the ActiveX
For that I have as tools:
Visual C++ 6.0
After researching in the internet I verified that the information on propertysheet inside of component ActiveX are confused. If it was
possible to present a sample with the general idea of as to do this I would be thankful.
|
|
|
|
|
I have class, all of my database functions are in it. I wonder, using all these functions as static and calling them staticly or make it as standart object and declare it in document class and call the functions by GetDocument()->....
which one is better? What are the advantages of static funtions?
|
|
|
|
|
Static functions in a class means that they are 'not bound to a particular instance of the class'. That means you can call this function directly like that:
CMyClass::StatFunc();
In fact the function is 'shared' across all instances of the class. But that also means that inside this function, you cannot make call to other non-static function of the class or use non-static member variables of the class. So I really don't understand what you try to achieve by doing this ?
Why don't use a normal class for doing that ?
|
|
|
|