1 Star 0 Fork 2

SimonLian/smc_lv_project

forked from Flying/smc_lv_project 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
base_main_windows.h 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
flying 提交于 2022-04-12 20:54 . first commit
/*
* @Author: Flying
* @Date: 2022-02-25 22:54:00
* @LastEditors: Flying
* @LastEditTime: 2022-04-12 17:46:52
* @Description: file content
*/
#include <Windows.h>
#include <process.h>
#include "base_main.h"
#define IDI_LVGL 101
static volatile int run_time_flag = 0;
void WINAPI run_time_flag_thread(UINT uTimerID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2)
{
run_time_flag++;
}
#if _MSC_VER >= 1200
// Disable compilation warnings.
#pragma warning(push)
// nonstandard extension used : bit field types other than int
#pragma warning(disable : 4214)
// 'conversion' conversion from 'type1' to 'type2', possible loss of data
#pragma warning(disable : 4244)
#endif
#include "lvgl/lvgl.h"
#include "lvgl/examples/lv_examples.h"
#include "my_drivers/display/win32drv.h"
#if _MSC_VER >= 1200
// Restore compilation warnings.
#pragma warning(pop)
#endif
#include <stdio.h>
#pragma comment(lib, "Winmm.lib")
int main()
{
lv_init();
DWORD_PTR dwUser = NULL;
timeSetEvent(1, 1, (LPTIMECALLBACK)run_time_flag_thread, dwUser, TIME_PERIODIC);
if (!lv_win32_init(
GetModuleHandleW(NULL),
SW_SHOW,
MY_UI_W_MAX,
MY_UI_H_MAX,
LoadIconW(GetModuleHandleW(NULL), MAKEINTRESOURCE(IDI_LVGL)),
wm_touch_feedback))
{
return -1;
}
// lv_win32_add_all_input_devices_to_group(NULL);
wm_app_main(NULL, NULL);
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/simonlian/smc_lv_project.git
git@gitee.com:simonlian/smc_lv_project.git
simonlian
smc_lv_project
smc_lv_project
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385