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 7: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 OriginalGriff 375
1 Sergey Alexandrovich Kryukov 195
2 Prakriti Goyal 177
3 jlopez788 134
4 Kruti Joshi 117
0 OriginalGriff 6,742
1 Sergey Alexandrovich Kryukov 5,479
2 Maciej Los 3,474
3 Peter Leow 3,313
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web03 | 2.8.140721.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