|
Thanks DavidCrow buddy!
George
|
|
|
|
|
Hi, everyone!
I know there are three types of exception specifications.
The weak exception spec, the strong exception spec and
the nothrow spec. But I just know the definitions and not
find any sample codes about the basic concept-proof ideas
about the three definitions.
I want to know where can I find some online resuorce of this
topic.
Thanks in advance,
George
|
|
|
|
|
|
Hi all,
I am thinking about developing an application using Visual C++ 6.0 and ASP. What licences will I need in order to be able to sell this application?
Will my customers have to buy any microsoft licences in order to run my application (apart from having IIS installed on their machine (for the ASP pages that will come with my application))?
I thank you in advance,
Chris.
|
|
|
|
|
Anonymous wrote:
Will my customers have to buy any microsoft licences in order to run my application...?
No, if that's all you're shipping to your customers. Any third-party controls, tools, etc. of course have their own licensing requirements.
By the way, if you are looking for a shareware reseller/marketer for your product, I recommend ShareIt. They have given me consistently excellent service, relatively low fees, plus they accept orders from European countries.
Best wishes,
Hans
|
|
|
|
|
Hello!
i'm writing a windows 9x service program and i need to get notified before program is put to death by external processes using TerminateProcess API.
could you please help me how to determine that my program is about to be forcibly terminated by TerminateProcess?
thanks a lot.
|
|
|
|
|
TerminateProcess will stop your program immediately. You will get no message or signal (a la Unix) that you are about to be terminated.
There are some tricks you can play - e.g., TP will not terminate child processes. So you could have a child process (not a thread) monitoring your service. But what happens if your child process gets TP'd?
I assume you are really talking about TP and not a user selecting Shutdown System?
At best, you can check a flag you create in Registry, and when your program starts again, you can check flag and see if orderly shutdown. If not, try to do some cleanup, or check database consistency, etc.
Best wishes,
Hans
|
|
|
|
|
I'm trying to build an application that has multiple(child) windows that are identical, but they are in different states of operation.
Each of these windows really is just a lot of the common controls.
Is this the correct approach
1 base CWnd
then Create a new Class based on CWnd and place my controls on a new CWnd owned by this class, then attach it the the base CWnd
or is there a better approach?
I'm really struggling with what I would have thought was quite easy or is it not??
I can't seem to find many articles etc on this kind of thing
I've already built the application using lots of ATL components, and VB to provide the UI.
The UI currently consists of 8 frames containing Progress bar for current status, and details of the current modem connection speed, the file that is being copied and the state that the program(thread) is in.
UI for each cell looks kinda like this and there are 8 of them (4cols x2 rows).
<br />
Store: [ readonly] Tel: [readonly] Bps:[readonly]<br />
Start: [readonly starttime] IP: [readonly] Err:[readonly]<br />
Status: [readonly]<br />
[Caption showing the current state of the program] [%complete as text]<br />
File: [filename readonly] Bytes: [x of y]<br />
[..............progress bar..............].br />
[Text box for messages to the user]<br />
Sorry for the loss of formatting.
|
|
|
|
|
It's hard to judge without more details. One alternative might be to use MDI app with CFormView-based windows. Another might be to have your app create multiple modeless dialogs.
Maybe if you described what you're trying to do in more detail, and what (if any) requirements there are, you would get better answers.
Best wishes,
Hans
|
|
|
|
|
sorry.. i'll add more detail to the original question.
|
|
|
|
|
hello
actually i m working on one project while running that programme in MFC it is giving error "cannot open mfc42u.lib".......what should i do.....
Regds
vipin
|
|
|
|
|
The error means that your project configuration is trying to link with MFC's Unicode library - that's what the "u" in mfc42u.lib stands for.
There might be an ANSI configuration for your project - to check, go to Build | Set Active Configuration. See if there is a "<project> - Win32 Debug" listed. If there is, select it, and do a rebuild all. This should get rid of the error.
If there is no ANSI configuration, you can either create one (it's not that hard), or you can install the MFC Unicode libraries on your machine (note that Unicode builds will only work on NT-based systems). To install the Unicode libraries, go back to the VS CD, and select the Unicode libraries when it offers you the choice - you may have to drill down through several screens to get to it, I don't remember. You probably chose the default when you installed VS the last time, which does not install the Unicode stuff.
Best wishes,
Hans
p.s. You can customize the VS toolbar so that the "Select Active Configuration" combobox is always displayed on your toolbar. Saves lots of confusion.
|
|
|
|
|
|
i want to know is there any tool availble which will convert win32 programme into mfc....
Regds
Vipin Bokariya
|
|
|
|
|
Long Answer:
MFC provides C++ wrappers for the Win32 SDK functions plus classes, not related to GUI, to help simplify development. When you are accessing Win32 directly, much of the GUI must be designed (drawn) by you. Therefore, in order to convert from Win32 to MFC you would, at the very least, have to rewrite the interface using MFC and import all the code which is not directly dependent on the interface design (a.k.a. drawing interface).
Short Answer:
No.
Trust in the code Luke. Yea right!
|
|
|
|
|
The following program is all right,but if I change the second sentence to such m_bitmap.LoadBitmap("c:\\windows\\cibab.bmp") then
m_bitmap.GetBitmap(&bm) crash. I want to know why.
CBitmap m_bitmap;
m_bitmap.LoadBitmap(IDB_BITMAP);
BITMAP bm;
m_bitmap.GetBitmap(&bm);
//**************
Your answer is greatly appreciated
WuWenGuo
David wu
|
|
|
|
|
|
Hi David,
try this perhaps it helps
CString szFilename;
szFilename="bild.bmp";
HBITMAP hBmp = (HBITMAP)::LoadImage(NULL,szFilename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);
CBitmap bild;
bild.Attach(hBmp);
CWnd* wp = GetDlgItem(IDC_STATIC_BITMAP_GLASROHR); //name of the control on which you want to display the bitmap
CDC *pDC = wp->GetDC();
CDC imageDC;
imageDC.CreateCompatibleDC(pDC);
imageDC.SelectObject( &bild);
pDC->BitBlt(0, 0, 400 , 200, &imageDC, 0, 0, SRCCOPY);
imageDC.DeleteDC();
wp->ReleaseDC(pDC);
|
|
|
|
|
if m_bitmap.LoadBitmap("c:\\windows\\cibab.bmp") failed then m_bitmap.GetBitmap(&bm) will fail.
1) How do you know cibab.bmp exist.
2) Check return values to make sure bitmap was loaded (it does not sound like it was).
3) When you say crash what do you mean? If GetBitmap() failed that does not mean you program CRASHED, it means that you have an invailid bitmap handle. Which causes GetBitmap() to fail. Therefore, see items (1) and (2) above.
4) "c:\\windows" is not portable between Windows operating systems (on WinNT it is "c:\\winnt", before XP).
Trust in the code Luke. Yea right!
|
|
|
|
|
How can I do content of CEdit vertical center?
This quesiton puzzle me for a long time.
Hope anyone to answer!
|
|
|
|
|
lvvvww wrote:
How can I do content of CEdit vertical center?
You can't. The edit control has no provision for this. You would have to roll your own custom edit control. See here to get started.
Best wishes,
Hans
|
|
|
|
|
Just in case someone is searching for a solution.
void CCCenterText::CenterText(CString Text)
{
m_wndEdit.SetWindowText(Text);
m_wndEdit.CenterWindow(&m_wndStatic);
CDC *pDC = m_wndEdit.GetDC();
CFont *pEditFont = m_wndEdit.GetFont();
CFont *pFont = pDC->SelectObject(pEditFont);
TEXTMETRIC tm;
pDC->GetTextMetrics(&tm);
int LineHeight = tm.tmHeight;
pDC->SelectObject(pFont);
ReleaseDC(pDC);
CRect pos;
m_wndEdit.GetWindowRect(pos);
ScreenToClient(&pos);
int LineCount = m_wndEdit.GetLineCount();
int posHeight = LineHeight * LineCount;
m_wndEdit.SetWindowPos(&m_wndStatic,pos.left,pos.top,pos.Width(),posHeight,0);
m_wndEdit.CenterWindow(&m_wndStatic);
}
|
|
|
|
|
I'm currently researching overlapped socket I/O. I see that the WSA stuff basically copies the "ordinary overlapped I/O" functionality. What if I want to wait for ordinary events as well as socket I/O events? It doesn't look like WSAWaitForMultipleEvents is compatible with ordinary HANDLEs.. or is it? The docs doesn't say anything about it..
--
I was quite impressed until I hit the floor
Isn't that what friends are for?
Pain looks great on other people
That's what they're for
|
|
|
|
|
From the almight MSDN Library...
Blocking and Waiting for Completion Indication
Applications can block while waiting for one or more event objects to become set using the WSAWaitForMultipleEvents function. In Windows implementations, the process or thread truly blocks. Since Windows Sockets 2 event objects are implemented as Windows events, the native Windows function, WaitForMultipleObjects can also be used for this purpose. This is especially useful if the thread needs to wait on both socket and nonsocket events.
Hmmm... I expected more from you, Jörgen
"was wir auch tun, wohin wir gehen
die illuminaten sind im system
sie kontrollieren überall
und 23 ist ihre zahl!"
23, welle: erdball
|
|
|
|
|
Hi,
I am trying to use SQL with DISTINCT to search the distinct string in a table, but always have an error that shows it can open the table!
Here what i did: I use a table RoomList and in that table there is a column RoomType. In the colums there are a lot of strings but only 3 different types: Single, Double &Suite ... so I would like to scan this table and hope it will return me only 3 times that contains "Single", "Double" and "Suite"!
So I use the following:
<br />
CRoomList rList(pdb);<br />
CString strSQL;<br />
<br />
strSQL.Format ("SELECT DISTINCT RoomType FROM RoomList");<br />
rList.Open (AFX_DAO_USE_DEFAULT_TYPE, strSQL, 0);<br />
while (!rList.IsEOF())<br />
{<br />
m_typeRoom.AddString (rList.m_RoomType);<br />
rList.MoveNext();<br />
}<br />
rList.Close();<br />
*) Any time it reaches: rList.Open
(AFX_DAO_USE_DEFAULT_TYPE, strSQL, 0) ---> error "GetRow
failed, the Requested column is not a member of this
recordSet!
*) This means the: strSQL.Format ("SELECT DISTINCT RoomType FROM RoomList"); ---> is somehow not correct! I did check the table name RoomList & column RoomType ... they are ok!
By any chance, someone knows I missed some thing here?
Thanks to any help!
|
|
|
|