Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

rbc

@rbc
About
Posts
32
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Debug information crashes my app :(
    R rbc

    Thanks, It looks like my assert is failing in the call to SetRegistryKey? I don't rememeber writting this part of the code? How would my code cause this bug? Thanks

    C / C++ / MFC c++ debugging help question

  • How to size and move a view when it is created
    R rbc

    Hi, I want my MyView to appear at x,y = 1,20 and be 1280 pixels wide and 800 high when it initially appears. I believe this is the code to move and size it ... CFrameWnd* pParentFrame = GetParentFrame(); ASSERT_VALID( pParentFrame ); pParentFrame->MoveWindow( 1, 20, 1280, 800 ); ... but what method should I put this code in? If I put in MyView::OnDraw everytime the View needs to be re-drawn it moves and resizes. I just want it start and 1,20 initially.

    C / C++ / MFC tutorial question

  • How should I set a pixels color?
    R rbc

    :wtf:

    C / C++ / MFC c++ question

  • How should I set a pixels color?
    R rbc

    Cool web page. You are obviously no stranger to generating fractals! Yet I am. How would you write a mandelbrot program in Visual C++? :)

    C / C++ / MFC c++ question

  • How should I set a pixels color?
    R rbc

    How should I set pal[3] through pal[255]? Am I using a 8-bit display? How do I use a 24-bit color?

    C / C++ / MFC c++ question

  • How should I set a pixels color?
    R rbc

    Hi Christian, Yes I want to use 256 colors. How could I use the RGB macro when int CMand_View::Mandel_calcColor( int X, int Y ) returns an int and not 3 ints? Should I some how derieve the 3 ints (r, g, b) from c? Where c = CMand_View::Mandel_calcColor( X, Y ); :)

    C / C++ / MFC c++ question

  • How should I set a pixels color?
    R rbc

    That's a good question! How do I use a palette? I thought just using the marco ... PALETTEINDEX(c)); ... would handle all that for me :laugh: Something is going on as my program shows the mandelbrot set all in green! :wtf:

    C / C++ / MFC c++ question

  • How should I set a pixels color?
    R rbc

    Hi, I am trying to write a simple Mandelbrot set Visual C++ program. I assume that I am not handeling the setting the color of a pixel correctly. Here's some of my code ... ... void CMand_View::OnDraw(CDC* pDC) { ... for( int i=0; i<320; i++ ) { for( int j=0; j<200; j++ ) { int c = CMand_View::Mandel_calcColor( i, j ); pDC->SetPixel(i,j, PALETTEINDEX(c)); } } } ... double CManel_View::Mandel_Abs ( double real, double img ) { double rc = real * real + img * img; return sqrt( rc ); } int CMand_View::Mandel_calcColor( int X, int Y ) { int N; // WHILE-loop control variable double XPos, YPos; // The real and imaginary parts of C double RealPart; // The real part of Z double ImagPart; // The imaginary part of Z int AbsZ; // BOOLEAN; double Temp; double width = 320.0; double height = 200.0; N = 0; AbsZ = TRUE; RealPart = 0; ImagPart = 0; XPos = X / width * (XMax - XMin) + XMin; YPos = Y / height * (YMax - YMin) + YMin; while ( (N < Iterations) && (AbsZ == TRUE) ) { N++; Temp = (RealPart*RealPart) - (ImagPart*ImagPart) + XPos; ImagPart = 2.0 * ImagPart * RealPart + YPos; RealPart = Temp; AbsZ = (( CMand_View::Mandel_Abs (ImagPart, RealPart) <= Bailout) ? TRUE : FALSE); } //end while if (AbsZ == 0 ) { return (N + sColor) % Colors; } else { return 0; } } //end calcColor I think that this ... pDC->SetPixel(i,j, PALETTEINDEX(c)); ... is not right. :confused:

    C / C++ / MFC c++ question

  • 'sqrt' : undeclared identifier
    R rbc

    DOH!:-O Thanks!

    C / C++ / MFC c++ help question

  • Cvs on Windows
    R rbc

    I use CVS on windows. It came with cygwin

    The Lounge com sysadmin question

  • 'sqrt' : undeclared identifier
    R rbc

    I am including math.h but codeproject thinks le math.h ge is somekind of HTML tag! X| And WTF is this ... I suggest that it's a wise course of action when people answer your question to try the suggested solution before arguing about it. ... about? I am not arguing about anything :omg:

    C / C++ / MFC c++ help question

  • 'sqrt' : undeclared identifier
    R rbc

    My code looks kinda like this ...

    #include "math.h"
    #include "stdafx.h"
    .
    .
    .
    double BlahBlah::Blah_Abs ( double real, double img ) {
    double rc = real * real + img * img;
    return sqrt( rc );
    }
    .
    .
    .

    Yet the compiler does not complain about not be able to find math.h in the include path so I must assume that VC++ knows about math.h and since the compiler errors on sqrt ( rc ); I guess that sqrt( double ) is not declared in math.h :confused:

    C / C++ / MFC c++ help question

  • 'sqrt' : undeclared identifier
    R rbc

    Why is that Visual C++'s GUI knows about sqrt yet the compiler doesn't? :confused: As I edit my source I typed in sqrt and as I start to type in the paramters the GUI presents me with 3 different prototypes of sqrt ... I think cool Visual C++ knows about sqrt ... so I typed sqrt( myDouble ); as per the GUI. Yet I get a compiler error? X|

    C / C++ / MFC c++ help question

  • Goodbye California, welcome Germany
    R rbc

    SEND BEER!:laugh:

    The Lounge com business question

  • Developing Programs
    R rbc

    try this link.

    IT & Infrastructure help tutorial question

  • legacy Visual C++ code and .NET
    R rbc

    Hi All, I have some old Visual C++ code that I think would work well as a "web service". Is it difficult to convert my existing VC++ code to .NET code? Does that even make sense? :confused: Please help!

    .NET (Core and Framework) c++ csharp help question

  • MFC APLICATION AND MANAGED CODE
    R rbc

    Hi Nish, I am new to programming and have never heard of a __gc wrapper? Could you tell how I can find out more about __gc wrappers? Thanks

    Managed C++/CLI csharp c++ dotnet com question

  • Legacy Visual C++ and .NET
    R rbc

    Hi All, I have some old Visual C++ code that I think would work well as a "web service". Is it difficult to convert my existing VC++ code to .NET code? Does that even make sense?:confused: Please help!

    Managed C++/CLI c++ csharp help question

  • How can I see line numbers?
    R rbc

    I feel dumb asking this question ... but what the heck. You know how sometimes a program writes to the console stuff like ... main.cpp line 345 cannot open file blah.dat ... I want to open the file main.cpp and have to cursor go to line 345. How do you do that with the VC++ 6 editor? Thanks ;P

    C / C++ / MFC question c++

  • Questions of the Day wanted
    R rbc

    Here's one ... What is the icon next to VC++ 6 Build >> Rebuild All suppose to be? Why would anyone think that funny looking icon says "Rebuild All"? :wtf:

    The Lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups