Click here to Skip to main content
15,921,179 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: BitBlt is not working in Service Pin
ThatsAlok22-Jun-05 18:18
ThatsAlok22-Jun-05 18:18 
GeneralRe: BitBlt is not working in Service Pin
vegeakhil23-Jun-05 5:00
vegeakhil23-Jun-05 5:00 
GeneralRe: BitBlt is not working in Service Pin
vegeakhil23-Jun-05 5:02
vegeakhil23-Jun-05 5:02 
GeneralRe: BitBlt is not working in Service Pin
vegeakhil23-Jun-05 18:13
vegeakhil23-Jun-05 18:13 
Generalprintf(...) clone Pin
Weiye Chen22-Jun-05 17:49
Weiye Chen22-Jun-05 17:49 
GeneralRe: printf(...) clone Pin
Christian Graus22-Jun-05 18:16
protectorChristian Graus22-Jun-05 18:16 
GeneralRe: printf(...) clone Pin
Weiye Chen22-Jun-05 19:57
Weiye Chen22-Jun-05 19:57 
GeneralRe: printf(...) clone Pin
John R. Shaw22-Jun-05 18:25
John R. Shaw22-Jun-05 18:25 
The fuction below represents that last time I remember having to do this:
int my_printf( const char *format,... )
{
    int n=-1;
    char *buf=NULL;
    size_t size=0;
    va_list ap;
    va_start( ap,format );
    while( n == -1 ) {
        size += 128;                                /* change size */
        if( buf ) free(buf);                        /* free old buffer */
        buf = (char *)malloc(size);                 /* allocate new buffer */
        if( !buf ) n = 0;                           /* allocation failer */
        else n = _vsnprintf(buf,size,format,ap);    /* do basic formating */
    }
    va_end(ap);
    my_print(buf);
    return n;
}

The _vsnprintf() function is still supported by VC6, so it still works. The key is the va_list(), va_start() and va_end() (macros I believe). You'll need to look them all up and may be bring them upto date (this was written around 1992).


INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
GeneralRe: printf(...) clone Pin
Weiye Chen22-Jun-05 19:42
Weiye Chen22-Jun-05 19:42 
GeneralRe: printf(...) clone Pin
ThatsAlok22-Jun-05 18:30
ThatsAlok22-Jun-05 18:30 
GeneralRe: printf(...) clone Pin
Weiye Chen22-Jun-05 19:59
Weiye Chen22-Jun-05 19:59 
Generalreading a comma delimited file Pin
formula_200222-Jun-05 16:29
formula_200222-Jun-05 16:29 
GeneralRe: reading a comma delimited file Pin
John R. Shaw22-Jun-05 17:21
John R. Shaw22-Jun-05 17:21 
Questionhow can i change "no_namespace" ? Pin
liuyue22-Jun-05 15:28
liuyue22-Jun-05 15:28 
AnswerRe: how can i change "no_namespace" ? Pin
Christian Graus22-Jun-05 18:19
protectorChristian Graus22-Jun-05 18:19 
Questionhow to sort a linked list? Pin
suroor45322-Jun-05 15:01
suroor45322-Jun-05 15:01 
AnswerRe: how to sort a linked list? Pin
Chris Losinger22-Jun-05 15:57
professionalChris Losinger22-Jun-05 15:57 
GeneralRe: how to sort a linked list? Pin
suroor45322-Jun-05 16:39
suroor45322-Jun-05 16:39 
GeneralRe: how to sort a linked list? Pin
Jack Puppy22-Jun-05 17:29
Jack Puppy22-Jun-05 17:29 
GeneralRe: how to sort a linked list? Pin
suroor45322-Jun-05 18:08
suroor45322-Jun-05 18:08 
GeneralRe: how to sort a linked list? Pin
Trollslayer23-Jun-05 1:36
mentorTrollslayer23-Jun-05 1:36 
GeneralChanging Color of Code Comments Pin
jerry1211a22-Jun-05 14:59
jerry1211a22-Jun-05 14:59 
GeneralRe: Changing Color of Code Comments Pin
Chris Losinger22-Jun-05 15:53
professionalChris Losinger22-Jun-05 15:53 
GeneralSimultaneous Serial Communication on 1 port Pin
CNewbie22-Jun-05 14:33
CNewbie22-Jun-05 14:33 
GeneralRe: Simultaneous Serial Communication on 1 port Pin
Roger Wright22-Jun-05 16:12
professionalRoger Wright22-Jun-05 16:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.