Jump to content

Read setting Window from INI File?


Recommended Posts

I don't know what language you are using with Leadwerks but there are many free libraries available in C++ for reading and writing to ini files and I'd be almost certain that some must exist for BlitzMax too. This would probably be the easiest route. Failing that you could always write your own parser to read in the file and write it out again if need be.


[Edit] Just noticed this post is in the C++ forum so I guess that's answered that biggrin.gif


Here is a link to one I've used successfully in the past: INI File Lib

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites



This work sample:



#include <windows.h> 
#include <stdio.h> 

int main() 
  int WindowWidth, WindowHeight;

  WindowWidth = GetPrivateProfileInt (TEXT("GRAPHICS"), TEXT("Width"), 0, TEXT(".//setting.ini"));
  WindowHeight = GetPrivateProfileInt (TEXT("GRAPHICS"), TEXT("Height"), 0, TEXT(".//setting.ini"));

  printf ("Key: %i\n", WindowWidth);
  printf ("Key: %i\n", WindowHeight);






Suddenly, someone will need ...

Windows 7 Ultimate x64bit / Intel Core 2 Quad Q8400 / 4GB DDR2 SDRAM / GeForce 8800 GTS

Resource War Developer [ dev blog ]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...