This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#define ID_EDITBOX 1001 | |
#define ID_BUTTON_OK 1002 | |
void DrawCustomButton(LPDRAWITEMSTRUCT lpDrawItem) { | |
COLORREF bgColor = RGB(255, 165, 0); // orange | |
COLORREF textColor = RGB(128, 128, 128); // grey |
There are a few main steps to getting this working:
- Install tools - Android SDK (along /w JDK and build-tools), and the NDK
- Configure project - setting up AndroidManifest.xml, adding android_native_app_glue to your project
- Build - setup Android.mk for use with ndk-build, and write a simple build script to pipe it all together
If you haven't already, you'll need to install the Android SDK (which I think includes the JDK? Otherwise grab that as well), the Android NDK, and the SDK build-tools. You can do that using SDK manager. Downloading these will get you the following tools:
- ndk-build (NDK) - for building the final .so file for the .apk
- aapt (build-tools) - this is for packaging your .apk (app) file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Wsget/1.2.3 | |
Copyright 2022, SASAKI Nobuyuki. Released under the MIT license. | |
*/ | |
#include <stdio.h> | |
#include <locale.h> | |
#include <time.h> | |
#include <Windows.h> | |
#include <WinInet.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C" | |
{ | |
int _fltused; | |
#ifdef _M_IX86 // following functions are needed only for 32-bit architecture | |
__declspec(naked) void _ftol2() | |
{ | |
__asm | |
{ |