I am trying to use the ChooseColor function (i replaced my windows.h file with the new one from V7.06 beta that has the CHOOSECOLOR structure and function definition)
I get an "E1513 Crash in main" error when I try to run this:
Code:
 
#include <acknex.h>
#include <default.c>
#include <windows.h>

function main()
{
wait(1);

CHOOSECOLOR cc;
cc.lStructSize=sizeof(CHOOSECOLOR);
cc.hwndOwner=hWnd;
cc.hInstance=NULL;
cc.rgbResult=0x00aa0000;
cc.lpCustColors=NULL;
cc.Flags=CC_RGBINIT;
cc.lCustData=NULL;
cc.lpfnHook=NULL;
cc.lpTemplateName=NULL;

ChooseColor(&cc); //crashes here
}



Why?
Also when I try to use the RGB() macro, e.g, cc.rgbResult=RGB(0, 0, 0);, I get the error "machine code generator: can not translate CONV:CHAR::SHORT"

Last edited by yorisimo; 09/19/07 14:18.