|
Is there a configuration file under WindowsXP, etc., that lets you set up the maximum number of files you may want to open with fopen()? I know there is a way to set this with a call to a function in <stdio>, _setmaxstdio()...but I thought it could be done another way.
Thanks.
Jerry
|
|
|
|
|
What limit are you currently running into? Is the same limit imposed on you when using CreateFile() instead?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi everyone,
I saw source code of 'Visual C++ .NET Bible' Tom Archer,
Buttons in he's code is in XP-Style i try to find how
it is happen but i can not found anything that change from
original project!
then i refer to codeproject MFC button and see all of them
use derive class and use that class to do this.
Is there anyone know how do that ?
the source code of his book is here. you can see this in chapter one project.
http://eu.wiley.com/WileyCDA/WileyAncillary/productCd-0764548379,typeCd-DOWNLOAD.html
IS it OCX?
Best Regards.
Mostafa.
|
|
|
|
|
Hi everyone
Does anyone know how to resize a user selected image with new user choosen length and height? I know that there is bitblt but I dont know how to use it. I've looked everywhere for a website that tells how to use it but i found nothing. If you want to see what my current image resizing dialog looks like click on the link below, save the pic to your hard drive and look at it through a windows image previewer. I dont know if I need to add something to the dialog or if i am missing any code.
Any help would be greatly appreciated.
Heres the link:
http://i2.photobucket.com/albums/y18/geoffism/imgresizer_pic.bmp
|
|
|
|
|
I have code to minimize my dialog to the system tray. Right now when the minimize button is pressed, the dialog prompts and asks "Minimize to the System Tray?". I would like to add an extra button to the Title Bar (just to the left of the minimize button) to control sending the dialog to the system tray.
I have searched CodeProject but to no avail.
rodge
|
|
|
|
|
|
So the user will have a choice whether they want to minimize to the Taskbar or the Taskbar Notification Area (sometimes erroneously called the tray)? Is that right?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
That's right. The way I have it set up now is that when the user clicks the minimize button, a YES/NO message box asks you if you want it minimized to the system tray. If YES it goes to the "Taskbar Notification Area", if NO it is just minimized to the taskbar.
I want another button next to the minimize button that will be used to send the dialog to the "Taskbar Notification Area".
rodge
|
|
|
|
|
Hello,
I am having problems in justifying a text which is placed in a rectangle. I have placed the text inside the rectangle using DrawText() method, with DT_WORDBREAK flag so that the text can be clipped and can appear in multi lines. If i opt for this, the text is aligned Left or Right. Its not justified. Therez another method of SetTextJustification() which is used with TextOut and extTextOut(), if i use ExtTextOut (since i have to place the text in a rectangle) the text appears in a single line, without any clipping.......this remains a problem. can any 1 provide a solution which can place the text in the rectangle which is justified.
Thanx
Nadir
|
|
|
|
|
I think DrawText and Textout can't justify text.
You can use a RTFControl (Has to be Version 2.0 or higher)
* create an invisible RTF Control (be sure to use RTF2.0 or higher)
* Set Text with SetWindowText
* SelAll
* SetParaFormat with paraformat2.wAlignment to PFA_JUSTIFY
* set target device EM_SETTARGETDEVICE
* set wrapmode
* use EM_FORMATRANGE to draw content to a dc
have a lot of fun
Ralf
|
|
|
|
|
Thanx, but i wanna know can i generate these controls at runtime, bcoz i have to have an unknown number of rectangles at runtime !!!
Thanx
Nadir Maroof
|
|
|
|
|
yes you can !
Create one or more instances of CRichEditCtrl !
I would not use the standard create method of MFC because it uses RTF Version 1.0. It is important to create it without WS_VISIBLE Style
To create Version 2.0 or higher you have to use
LoadLibrary("riched20.dll")
see msdn LoadLibrary("riched20.dll")
Ralf
|
|
|
|
|
What about the SetTextJustification method !! can it solve the problem !!!
Nadir Maroof
|
|
|
|
|
Hi,
I am searching for a way to connecnt unlimited number of clients to a server.I
Know I can use these ways:
1-To create CAsyncSocket varaibles in array and dynamically.
2-To create CAsyncSocket pointers in a threads.
But I don't know none of them.
Please Help me!
Tell me if there is any good and simple article.
Thanks you.
|
|
|
|
|
Search for information on Windows Sockets. You should be able to find examples.
With sockets, on the server side try:
listen(socket, MAX_CONNECTIONS), after the call to bind().
Set MAX_CONNECTIONS with a define statement to some large value. I hope this helps you out.
Jerry
|
|
|
|
|
I must be missing something somewhere, but it isn't obvious to me with such an ambiguous error msg...
I've tried every connutation of line 79 "(WindowOne ->Create(NULL,NULL,WS_CHILD,);", but none seem to help, unless I actually comment it out.
Is there another section of code where I should go to make edit corrections?
I've tried deleting the offending line and recompiling before retyping it back in to no avail.
Any help/advice is greatly appreciated!
The offending code...........
void CSplashScreen::OnGo()
{
// TODO: Add your control notification handler code here
CWnd *WindowOne = new CWnd;
WindowOne ->Create(NULL,NULL,WS_CHILD,);//line 79
WindowOne ->ShowWindow(SW_SHOW);
}
Thomas
|
|
|
|
|
Try this
CWnd* pWnd = new CStatic;
pWnd->CreateEx
(WS_EX_CLIENTEDGE, // Make a client edge label.
_T("STATIC"),
"Dialog",
WS_CHILD |WS_TABSTOP | WS_VISIBLE |WS_CAPTION,
5, 5, 300, 300,
m_hWnd,
(HMENU)1234);
m0n0
|
|
|
|
|
Thanks very much! This works, and I'm sure I will be ale to put it to good use. A question regarding the use of CStatic...
I want to be able to access the window produced as if it were a List box. The item choosen from this list box will be applied to a second window which will bring up the properties of the item chosen from the first window.
Can I do this with the CStatic window just created?
Thanks in advance,
Thomas
|
|
|
|
|
i think u r missing a few parameters, just try this one;
void CSplashScreen::OnGo()
{
// TODO: Add your control notification handler code here
Rect rect(100,100,200,200);
CWnd *WindowOne = new CWnd;
WindowOne ->Create(NULL,"Window One",WS_CHILD,rect,NULL,NULL,NULL);//line 79
WindowOne ->ShowWindow(SW_SHOW);
}
You missed out the rectangle, and other few parameters, just try this one out.
Cheers
Nadir Maroof
|
|
|
|
|
Sorry i missed a thing, it is;
CRect instead of only Rect in the declaration, now ur code should look like this;
void CSplashScreen::OnGo()
{
// TODO: Add your control notification handler code here
CRect rect(100,100,200,200);
CWnd *WindowOne = new CWnd;
WindowOne ->Create(NULL,"Window One",WS_CHILD,rect,NULL,NULL,NULL);
WindowOne ->ShowWindow(SW_SHOW);
}
Hope this helps,
Cheers
Nadir Maroof
|
|
|
|
|
|
the MSDN tells us :
int CString::Delete( int nIndex, int nCount = 1 )
throw (CMemoryException );
...
Remarks
If nCount is longer than the string, the remainder of the string will be removed.
i thought the following line of code would work :
m_strDateDay.Delete(2, INT_MAX); but i'm afraid, it doesn't !!!
instead of this, it gives me an "Unhandled Exception in Prog.exe".
when i debug, i see that memcpy() is making the error within CString::Delete().
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
m_strDateDay.Delete(2, INT_MAX);
What does m_strDateDay.Delete(2, INT_MAX - 1) yield?
If that does not work, how about:
m_strDateDay = m_strDateDay.Left(2);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
actually, i've already tried with INT_MAX - 1 , and also with m_strDateDay.GetLength() (which i was certain at the moment that it was no longer than 5 chars).
i currently use CString.Left() , but i wanted to know if anybody had already encountered that problem, or could find a reason to that behavior...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
So these two statements do not work for you:
m_strDateDay = "12345";
m_strDateDay.Delete(2, INT_MAX - 1);
m_strDateDay.Delete(2, m_strDateDay.GetLength()); Is that correct?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|