Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Wanderson Regis Silva

Desenvolvimento WinCE

Recommended Posts

Alguém já teve alguma experiência com o desenvolvimento de aplicações para Windows CE? Qualquer ajuda me serve, Eu vou precisar de desenvolver um programa que vai se omunicar com um módulo via bluetooth e receber certas informações, ele deve tratar elas e mostrar para o usuário do aplicativo, e também irá receber informações do usuário através de botões e enviar para o módulo.

 

Eu procurando achei o BTCpp que parece que vai me servir para criar o canal de comunicação bluetooth, ma nem sei como vou criar a interface. Qualquer ajuda é bem vinda...!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olha só, queria fazer uma janela simples, usei esse código que uso no Windows normal:

#include <stdafx.h>
#include <windows.h>

#define WNDCLASSNAME L"MainWindowClass"
#define WNDWIDTH 320
#define WNDHEIGHT 180

LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
	HWND hWnd;
	WNDCLASSEX wc;

	ZeroMemory(&wc, sizeof(WNDCLASSEX));

	wc.cbSize = sizeof(WNDCLASSEX);
	wc.style = CS_HREDRAW | CS_VREDRAW;
	wc.lpfnWndProc = WindowProc;
	wc.hInstance = hInstance;
	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
	wc.lpszClassName = WNDCLASSNAME;

	RegisterClassEx(&wc);

	hWnd = CreateWindowEx(NULL,
		WNDCLASSNAME,
		L"Teste com WinCE", /* titulo */
		WS_OVERLAPPEDWINDOW, /* estilo */
		NULL, /* x */
		NULL, /* y */
		WNDWIDTH, /* largura */
		WNDHEIGHT, /* altura */
		NULL,
		NULL, /* sem menus */
		hInstance,
		NULL);

	// mostra a janela na tela
	ShowWindow(hWnd, nCmdShow);

	MSG msg;

	while(GetMessage(&msg, NULL, 0, 0)) {
		TranslateMessage(&msg);

		DispatchMessage(&msg);
	}

	// acabou
	return msg.wParam;
}

// manipulador do loop principal
LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
	switch(message) {
		// mensgem lida quando a janela é fechada
		case WM_DESTROY:
			{
				PostQuitMessage(0);
				return 0;
			} break;
	}

	return DefWindowProc (hWnd, message, wParam, lParam);
}

e adicionei a linha #include <stdafx.h> depois que o próprio visual studio pediu, mas ai ele me devolve essa saída:

1>------ Build started: Project: FFFF, Configuration: Debug STANDARDSDK_500 (ARMV4I) ------
1>Compiling...
1>main.cpp
1>.\main.cpp(1) : fatal error C1083: Cannot open precompiled header file: 'STANDARDSDK_500 (ARMV4I)\Debug/FFFF.pch': No such file or directory
1>Build log was saved at "file://c:\Users\Wanderson\Documents\Visual Studio 2008\Projects\FFFF\FFFF\STANDARDSDK_500 (ARMV4I)\Debug\BuildLog.htm"
1>FFFF - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Seria assim mesmo que eu faria uma interface ou teria que fazer de outra maneira.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.