Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC DLL
I'm trying to make a DLL in c++ for GameMaker, it needs to change the display resolution. I'm clueless on how to do it the only way I know of is that it involves ChangeDisplaySettings() and EnumDisplaySettings() functions and the use of a structure known as DevMode. May someone please provide a working, errorless, code snippet as an example on how to do what I'm looking for? In case you are wondering I mainly work with window manipulation, so this is a big task for me to figure out via trial and error, as it is something I've never worked with.
 
An exported function like this would be nice:
 
#include "stdafx.h"
#include "mainheaderfile.h"
//any needed includes or imports here please and thank you. :)
#define DLL extern "C" _declspec(dllexport)
 
DLL double ChangeDisplayResolution(int width, int height)
{
//your code snippet here please and thank you. :)
return 0;
}
 
Thanks!
TKG
Posted 31-Aug-12 8:33am
Comments
Wes Aday at 31-Aug-12 14:17pm
   
Okay so.... if I were to take this job, and I am not saying that I will, how much are you paying someone to write this code for you? When does the project need to be delivered? What OS(s) need to be supported? How are you going to be making payments? Any other project requirements?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Kornfeld Eliyahu Peter 275
1 Maciej Los 204
2 Sergey Alexandrovich Kryukov 200
3 King Fisher 185
4 OriginalGriff 183
0 OriginalGriff 6,223
1 DamithSL 4,724
2 Maciej Los 4,196
3 Kornfeld Eliyahu Peter 3,894
4 Sergey Alexandrovich Kryukov 3,496


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 31 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100