|
Okay!
That sounds great! Appreciate it,
ns
|
|
|
|
|
Do I say DestroyWindow() in the mainframe::onclose()?
Thanks,
|
|
|
|
|
|
Nishant S wrote:
("Sure?","?",
Short. Adn to the point. I like it.
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]
"It's The Soapbox; topics are optional" Shog 9
|
|
|
|
|
If you look up the ID for that menu handler ID_APP_EXIT on MSDN you will find the answer. It contains a short explanation how many standard menu commands are implemented.
ID_APP_EXIT: Exit the application.
CWinApp::OnAppExit handles this command by sending a WM_CLOSE message to the application's main window. The standard shutting down of the application (prompting for dirty files and so on) is handled by the CFrameWnd implementation.
Customization of this command handler is not recommended. Overriding CWinApp::SaveAllModified or the CFrameWnd closing logic is recommended.
If you choose to implement this command, we recommend you use this command ID.
|
|
|
|
|
Hi @all!
I want to use a CDragListBox. I have read inside this forum: First I must make a CListbox with a member variable of the type CListBox. Then I must change the type of the member variable in CDragListBox.
My Problem: When I run the programm I got a debug error!!!!!
What do I have to still change?
Greetings,
MFC is the Best
|
|
|
|
|
|
The programm does not start. After the linking comes the debug error:
"Debug Assertion Failed!!"
MFC is the Best
|
|
|
|
|
Okay
I am gonna make a guess here, but I think I am gonna back my guess
I just added a listbox to a new dialog and associated it with a CDragListBox object, compiled, ran and got the debug assert
The problem is that, by default the dialog resource editor will set the LBS_SORT style for the list box control. That's what causing the assert.
Take properties and make the Sort property to False , it'll be True by default.
Now you won't have the error
Regards
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Thank you very much! It works......
|
|
|
|
|
First step is to tell us where it crashes, otherwise we are just guessing.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
In the MessageBox:
File: winctrl2.cpp
The Debug makes the error in this function:
extern "C" int WINAPI
_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
// call shared/exported WinMain
return AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
}
MFC is the Best
|
|
|
|
|
I want to export from my apploication (VC++ 6.0 + MFC) an XML string. How do I use msxml to create that string ?
It should be semething like this:
<workspace>
<object>
//properties.... (other fields )
I don't know what interface to use, and what methods ...
Thank You !
|
|
|
|
|
Create a new DOMDocument object called say xdoc. Add nodes to the XML tree of the type IXMLDOMNode, and then call doc.xml to return the XML as a string.
There are a few articles on CP showing you how to #import and make use of the COM objects.
MS have provided two XML parsers. The DOM parser, and the SAX parser. The DOM parser basically does what its told as its just a series of objects and calls to manipulate them, where as the SAX paser is event based which can make it quite useful for parsing big documents in a distrubuted environment.
http://www.codeproject.com/soap/iexmlparser.asp
|
|
|
|
|
For creating high performance socket server, we use the technique of IO completion ports. We create IO completion port and related threads ourself using the function CreateIOCompletionPort().
There is also another function called BindIOCompletionCallback(). If we use this function we don't have to do the manual work. We simply let windows to create IO completion port and associate threads with it.
My question is that which solution is the more efficient, either manual creaton of IOCP or the later one.
|
|
|
|
|
what is the difference between Berkely sockets (Winsock2) and IO completion ports?
|
|
|
|
|
It sits on top off.
IO Completion ports are a WinNT feature that relate to all IO from disk access to Sockets. Basically you can use a limited number of threads to manage a large pool of connections at the same time while IO is pending.
Say 5 threads for 1000 connections is not unheard of. Because your not using a wasteful thread per connection with all the thread context switching goind on as the system scheduled them, then you get better efficiency, and the system is less likely to run out of resources, and suffer a denial of service attack. It helps get a lot more out of IO features on Windows which is useful for servers.
Read these to get a better feel.
http://www.codeproject.com/internet/winsockiocp.asp
http://www.codeproject.com/internet/iocp.asp
Also if you can get hold of a copy read Programming Server-Side Applications for Windows 2000 - Richter - MS Press. Has a good example of using them for searching files on the hard disk at a blinding speed.
|
|
|
|
|
Anonymous wrote:
BindIOCompletionCallback
This is only avaliable on Windows 2000 and later. If you need to support WinNT4 then you cannot use this as NT4 cannot manage the thread pool for you.
|
|
|
|
|
i create a CToolBar with no any buttons and dock it, it works well.
next i want to paint it, but i can't.
i override OnPint(), OnNcPaint() and disable WM_ERASEBACKGROUND message etc.
but the tool bar is still painted by microsoft, do u know how to paint it or disable which message so microsoft will not paint it then i can paint myself?
thx
includeh10
|
|
|
|
|
Handle NM_CUSTOMDRAW. You can change colors and button styles in response to that message - see the MSDN docs for the full list of capabilities.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
i create a CWnd with WS_THICKFRAME style (need to resize the window), and want to paint its border.
in OnNcPaint() message, i try all DCs:
1. CPintDC(this), not work, noly for client area
2. CWindowDC(this), only can draw left and top borders, not available for right and bottom borders
3. GetDC(0), OK, but draw on screen DC, sometimes makes screen dirty.
could u give me a hint?
thx
includeh10
|
|
|
|
|
Handle WM_NCPAINT
NC == Non Client
Normski. - Professional Windows Programmer
|
|
|
|
|
before u waste time, read question first, or waste my time also
includeh10
|
|
|
|
|
before you send emails to me, don't be so f***ing rude.
Normski. - Professional Windows Programmer
|
|
|
|
|
Hi,
I have a bitmap file with image size 720*480. Now i want to draw a part of this image, such as draw the image within a rectangle
rect(360, 420, 240, 280). Is there a simple method to do this?
Best Regards,
chen
|
|
|
|