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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

SteelModule

@SteelModule
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to declare array of object [modified]
    S SteelModule

    Thank you for a fast reply, it helped. :) Actually I have found ToArray() function previously, I used it (but with ArrayList) in trials with both C# and C++/CLI, but it doesn't compile in C++/CLI, I got error C2664. In C# I was able to cast it, it does compile and work, not so in C++. Btw., it still copies one array into another as I did, it looks much more clean, but again not very efficient... X| I used to write same app in C# and C++/CLI for learning, to see, which .NET code will look better for me. I use native C/C++/ASM long time professionaly, I work as a lead programmer on a big, well known engineering computational SW package, written mainly in native C++. It has an extensive GUI (our boss is GUI guy :suss:), which we would like to port to some C family .NET language, maybe with WPF.

    Managed C++/CLI question c++ data-structures tutorial

  • how to declare array of object [modified]
    S SteelModule

    Hello, I have another problem: I would like to use ArrayList for collecting of unknown number of System::Drawing::Point structures. But I´m not able to use it in some GDI+ drawing functions feg. Graphics::DrawCurve(...). It forces me to use cli::array, it is totally ugly, I ended up with something like this:

    // Dynamic array
    ArrayList^ arr = gcnew ArrayList;
    // Add some test data
    arr->Add(Point(0, 0));
    arr->Add(Point(25, 25));
    arr->Add(Point(50, 75));
    arr->Add(Point(75, 100));
    .
    .
    arr->Add(Point(225, 325));

    // Somewhere prior drawing...
    array^ pt = gcnew array(arr->Count);
    for(int i = 0; i < arr->Count; i++)
    pt[i] = (Point)arr[i];

    // Actual drawing...
    g->DrawCurve(pen, pt);

    It works, but... Is there a better way to do something like this? I'm sure I'm wrong, but I learn C++/CLI about an hour :-). There are no such problems if I use GDI+ in Win32 API, MFC...

    Managed C++/CLI question c++ data-structures tutorial

  • DirectX problem
    S SteelModule

    I´m new to DirectX 8.1 and I have a problem in windowed mode. When I use SDI type app and tris are rendered in filled mode, when I resize a window, the app works correctly. Image stretches, but correctly, same way as OpenGL does. But when I switch to wireframe, all goes wrong. Lines appear thinner or thicker, as if you stretch a bitmap. In MDI, when I use additional swap chains, this problem occurs everytime, i.e. in filled mode. I use vertex buffer initialized in OnInitialUpdate(). Antialiasing is off.

    C / C++ / MFC graphics game-dev design help
  • Login

  • Don't have an account? Register

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