|
You may also need to select project, settings, c++, code generation (from memory) and make sure that the C runtime is also statically linked.
Cheers,
Rob.
|
|
|
|
|
No need, when you change the MFC link type, it automagically changes the CRT link type as well.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
From DevStudio menu
Project>Settings>General>Microsoft Moundation Classes:
Use MFC in a static library
|
|
|
|
|
Thanks all. I got it changed and running. Sometimes there are too many options and I get wrapped around the axle looking for the right one.
Matt ( Padawan Learner )
|
|
|
|
|
i want to write code in vc that should capture any packet on the network and extract information from it like source ip address, destination ip address, packet length etc. i need some help in writing such code.
|
|
|
|
|
in the win2000/xp section check out my article ! you`ll be astonished !
it`s all about wisock hooking and a fully functional programme !
//if you like rate it ! 10x
I am the mighty keeper of the book on knowledge . Contact me to get your copy .
|
|
|
|
|
This isn't a programming question per say, but I didn't really know where else to post it.
I see a lot of people who use the icons from the Visual Studio.net IDE in their projects on here and I'm just wondering if anyone knows where to get them from. Are they included with Visual Studio.net? Are they downloadable?
thanks.
|
|
|
|
|
Hello,
I am trying to paint a simple yellow border around my CRichEditView.. I tried the following and it paints the border but nothing inside.. Can anyone give me some help, I'm a newbie when it comes to Custom painting.
void CMyRichView::OnPaint()
{
CPaintDC dc(this);
CRect border;
GetClientRect(&border);
dc.FillSolidRect(0,0,1,border.bottom, RGB(255,255,128));
dc.FillSolidRect(0, 0, border.right, 1, RGB(255,255,128));
dc.FillSolidRect(border.right-1, 0, 1, border.bottom, RGB(255,255,128));
dc.FillSolidRect(0, border.bottom-1, border.right, 1, RGB(255,255,128));
}
Thanks,
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
You fill a rectangle with color, the actual inside of the control is masked by the filling.
OnPaint will paint the client area of the control. I suggest you paint in the OnNcPaint.
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Thanks for the post.. I have tried this with no success..
LRESULT CMyViewView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if(message == WM_NCPAINT)
{
CClientDC dc(this);
CRect border;
GetClientRect(&border);
dc.FillSolidRect(0,0,1,border.bottom, RGB(255,255,128));
dc.FillSolidRect(0, 0, border.right, 1, RGB(255,255,128));
dc.FillSolidRect(border.right-1, 0, 1, border.bottom, RGB(255,255,128));
dc.FillSolidRect(0, border.bottom-1, border.right, 1, RGB(255,255,128));
}
return CRichEditView::WindowProc(message, wParam, lParam);
}
If I use CClientDC the border doesn't show but the document shows.. If I try CPaintDC the border shows but nothing inside the border (document doesn't show)..
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Adding this to the bottom seemed to fix my problem...
InflateRect(border,-1,-1);
RedrawWindow(border,NULL,RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
Thanks,
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hey all I need some "C++ 101" help,
I am working on a function that reads in a string and converts it into a CTime, using atoi( ) . The function declaration is
bool ConvertTimeStr(const CString& TimeStr, CTime& Dest)
any suggestions on how I can convert a string such as "12:00:00" into 12:00:00
|
|
|
|
|
GRAMI04 wrote:
any suggestions on how I can convert a string such as "12:00:00" into 12:00:00
Read this: Date and Time in C++[^]
-Nick Parker
|
|
|
|
|
The quoted article will help I'm sure, but I have found the following 2 approaches to be useful, alone or in combination.
1) The MFC COleDateTime class provides some string parsing capabilities, and you can then check the GetStatus() return code.
2) Alternatively, you could try something like:
bool ConvertTimeStr(const CString& TimeStr, CTime& Dest)
{
int hh, mi, ss;
char ch;
// ch catches junk beyond end of string
if (sscanf(TimeStr, "%d:%d:%d%c", &hh, &mi, &ss, &ch) != 3)
return false
// now check for valid days of month etc.
// The MFC classes can be used to do this.
return whatever!!
}
|
|
|
|
|
I am confused ...
I have a Visual C++ 6 application.
When I run this application in the Visual C++ IDE
and I end the application I will get an "Unhandled Exception in server.exe (NTDLL.DLL): 0xC0000008: Invalid Handle." error.
But when I am running only the exe without the IDE there is no error!
What's the reason?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
You need to be more specific about the problem, without this you will not be able to get help.
Reproduce your problem in a few lines of code. In doing so you may solve the problem yourself, but if not you will be able to be more specific and others can help you.
Cheers,
Rob.
|
|
|
|
|
I think that's not a problem of my application (of my source code), because this error is only displayed when I run the application in the Visual C++ 6 IDE.
When I run the simple exe (without Visual C++ 6 IDE) or in the Visual .NET 2003 IDE there is no problem, all works fine!
The problem is only when I run the application in the Visual C++ 6 IDE!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Right now my project title when the app runs is Str - Str1...its an MFC mDI project. I had named my project Str for brevity. But I really want the application to have a formal title like "My Project" and I dont want the Str1 part that seems to tag along. How do you set this?
Appreciate your help,
ns
|
|
|
|
|
Look for the string table entries IDR_MAINFRAME and IDR_xxxTYPE - the main window title is stored in these entries (note that the type string table entry has multiple values separated by newlines).
Dave
|
|
|
|
|
Thanks!
Appreciate your help,
ns
|
|
|
|
|
Hi,
A newbie question:
Nowadays, I am using ADO to access to my mdb file, when i first runs my app the harddrive is getting busy for a few(6-7) seconds to read the data. I want to know that if i use xml for data handling how my app will behave??? Is it fast or slow or what???
Thanx...
|
|
|
|
|
X!M!L! .... X!M!L! .... X!M!L!...
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
It will depend on your needs:
XML is fast, clean and very interesting if you have only to ask for tree structured data, but if you need to use different queries on your database, you'd prefer to use a database because the work of create the different queries based on the different tables... will be done easier...
hope this helps...
|
|
|
|
|
can anybody advise me, what do I have to do for providing steady connection, right receiving data, if server is written for Linux? can you tell me all the needed details for making this right. thank you.
|
|
|
|
|
Do you want to learn network programming?
Learn Winsock, how you create and connect to a server can you find here on CP. Look in the Network & Internet section.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|