|
There are many methods:
1. upload the file via Web Services(WWW Service). but you must install Web Server such as IIS in the server. you can upload the file in any size. I solved my problem in this way.
2. via windows Pipe.
3. via windows socket.
|
|
|
|
|
dont forget sergio 'the infomercial king' ... he found a way to tranafer 650mb INSTANTLY! across a MODEM CONNECTION!
heh
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi all,
I am trying to create custom edit control (with some additional features, one of them being bitmap background) by inheriting CEdit class. The problem is that background under the letters is erased/overwriten with background color. Does anyone know how to solve the problem? Any workaround suggestions?
Thanks,
Miha
|
|
|
|
|
can you not set the dc text bg to transparent?
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I have tried to change background mode, but I don't know how to get dc without manualy writing the text. I have tried to overwrite OnPaint function, but didn't help. The problem is that DrawText erases background under the text (as CEdit control does). Only background under letters is erased(not the whole area of the control) Is the catch in changing the BRUSH?
from OnPaint()
----------------------
CDC* dc = BeginPaint(&ps);
dc->SetBkMode(TRANSPARENT);
GetWindowText(m_cText);
dc->DrawText((LPCTSTR)m_cText, -1, &rect, 0 );
ReleaseDC(dc);
EndPaint(&ps);
----------------------
bye
Miha
|
|
|
|
|
yup ... catch the OnCtlColor(...) message and set the dc brush properties to what you require
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I have put my stuff in OnCtlColor (parent control) and it works
Thanks Lauren!
bye
Miha
Random code generator is the way to go
|
|
|
|
|
I have implemented printing within a MFC application.
I have a weird problem.
When I paint (BitBlt) a bitmap the Print Preview works OK.
However when I Print the page, only a black rectangle appears.
Apparantly I am doing something wrong.
Does someone had a similar problem and found the solution.
Thanks in advance,
Bert
|
|
|
|
|
Hello,
if you ware working with a variable parameter list like (int Number,...) how can you programmatically find out the number of parameters specified?
MSDN Help for va_arg, va_end, va_start does it in the following way using -1 as an extra not processed last parameter.
int average( int first, ... )
{
int count = 0, sum = 0, i = first;
va_list marker;
va_start( marker, first ); /* Initialize variable arguments. */
while( i != -1 )
{
sum += i;
count++;
i = va_arg( marker, int);
}
va_end( marker ); /* Reset variable arguments. */
return( sum ? (sum / count) : 0 );
}
Are there better ways without a finishing last dummy parameter?
--- Rainer Mangold
|
|
|
|
|
The other way is to pass # of arguments as one of 'normal' parameters. However, this increases the probability of an error - you could add one param and forget to increase passed # of param. Generally, you have to know what called function expects on the stack - there's no way to detect this 'automatically'.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thanks a lot,
this was the answer I expected, although I hoped that there would be a nicer solution.
-- Rainer
|
|
|
|
|
Gurus (if I may call you that )
As a newbie to MFC, should I stop! and start to learn .Net with C++ ?
Or even drop C++ for C#
This takes a big investment in time, and I don't want to learn MFC if its going to die RSN.
Does .Net have a Application Framework like MFC ? If so, is there a C++ specific one or is the framework for ALL langauges now ?
Any pointers greatfully recevied.
|
|
|
|
|
Hello, the codegurus around the world.;)
My basic question is why you want to learn the computer language like C++, C# or so on.
If you want to be the programmer, to learn MFC isn't in vain.
Software company is always looking for a more talented programmer, and
if the applicant has to the ability to write the code by more language,
he or she can find the job more easily.
Besides, C# is still "BETA" version, and I doubt how many companies pick up C# ASAP for
its project as well as how valuable the programmer only know C#.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
C# is not everything, it is not attempt to replace MFC, it is a good complementarity. I think C# is good choice to develop web application, but isn't appropriate to develop a system such as CAD system. C# is compiled at load time, it consume too much time to startup an application, while it isn't a problem in web application.
To MFC or not? the answer is all depend on what you want to do in the future.
|
|
|
|
|
I'm trying to parse a text file (using ANSI C) and extract every word aand insert into link list. Where can I get to see some sample code showing this type of parsing?
TIA.
Hush..Hush.. thought I heard you calling my name now...
|
|
|
|
|
Hi !
If it's acceptable for you to use ANSI C++, the solution is below:
#include <fstream>
#include <string>
#include <list>using namespace std;
int main()
{
ifstream inputfile("readme.txt");
istream_iterator<string> isi(inputfile), iseof;
list<string> ls;
copy(isi, iseof, back_inserter(ls));
return 0;
}
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
becase forume eats some brackets - here is the repost... I think you know that symbols should be instead of "[" and "]"
#include [fstream]
#include [string]
#include [list]
using namespace std;
int main()
{
ifstream inputfile("readme.txt");
istream_iterator[string] isi(inputfile), iseof;
list[string] ls;
copy(isi, iseof, back_inserter(ls));
return 0;
}
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
Thanks. But I need to implement parsing in ANSI C without STL. Could any og you pass me a link to some code?
Hush..Hush.. thought I heard you calling my name now...
|
|
|
|
|
for parsing u can use strtok. u can get token string from a bigger string based on a known seperator
char *buffer; // buffer to parse
char *token; // the token string
char sep[]=" "; // here seperator is space
...
token = strtok(buffer,sep);
while(token != NULL)
{
... process token
token = (NULL,sep);
}
I hope this is what u r looking for
|
|
|
|
|
Hi all.
How can i convert char * variable to OLECHAR * variable ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi Hadi !
Try this macro: A2OLE and take a look at "String Conversion Macros" article in MSDN.
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
I read this article, but i didn't understand !!!
Can you write an example ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hmm. Here it is :
USES_CONVERSION;
OLECHAR* pOLECHAR = A2OLE("example");
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
I got 3 errors:
error C2440: 'initializing' : cannot convert from 'int' to 'unsigned short *'
error C2065: 'A2OLE' : undeclared identifier
'USES_CONVERSION' : undeclared identifier
Are you sure i don't need with any header file ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
try #inlclude <atlconv.h>... but I'm not sure is it posssible to include this file directly ... Is your project ATL-based ?
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|