|
구글에 여쭈어보니
WS_EX_NODRAG
Specifies a stationary window that cannot be dragged by its title bar. This style is supported only by Windows CE.
윈도우즈씨이에서만 쓸수 있는 스타일입니다.
다이아 님이 쓰신 글 :
: 현재 제가 짠 프로그램이 카드 뒤집어서 맞추는 게임인데요 에러가나네요...
: 프로그램 혹시몰라서 일부분만 올렸구요
: -------------------표시한 부분이 에러나는 부분이에요 ..
: CreateWindowEx를 써서 (WS_EX_NODRAG를 했는데 WS_EX_NODRAG는 찾을 수 없는 식별자 입니다 라고 나오거든요 에러가..
: 어디가 잘못된건지.....ㅠㅠ
:
:
: #include <windows.h>
: #include "resource.h"
: LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
: LRESULT DoPaintMain(HWND, UINT, WPARAM, LPARAM);
: HINSTANCE g_hInst;
: LPSTR lpszClass = "RandGrp";
:
: HBITMAP image[8];
: int imageResult[4][4];
: HDC hdc;
: HDC BitHandle;
: PAINTSTRUCT ps;
: RECT BitRect, rt;
: HBRUSH hbrGray, mybrush;
: HPEN Mypen, Oldpen;
:
: int Rect[4][4]={0,};
:
: int WINAPI _WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPWSTR lpszCmdParam, int nCmdShow)
: {
: HWND hWnd;
: MSG Message;
: WNDCLASS wc;
:
: wc.style = 0;
: wc.lpfnWndProc = MainWndProc;
: wc.cbClsExtra = 0;
: wc.cbWndExtra = 0;
: wc.hInstance = hInstance;
: wc.hIcon = NULL;
: wc.hCursor = LoadCursor(NULL,IDC_ARROW);
: wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
: wc.lpszMenuName = NULL;
: wc.lpszClassName = TEXT("TextDemo");
:
: if(RegisterClass(&wc)==0)
: return -1;
:
:
: hWnd = CreateWindowEx(WS_EX_NODRAG,------------------------------------
: TEXT("TextDemo"),
: TEXT("TextDemo"),
: WS_VISIBLE | WS_CAPTION | WS_SYSMENU,
: CW_USEDEFAULT,
: CW_USEDEFAULT,
: CW_USEDEFAULT,
: CW_USEDEFAULT,
: NULL,
: NULL,
: hInstance,
: NULL);
: if(!IsWindow(hWnd))
: return -2;
:
: ShowWindow(hWnd, nCmdShow);
: UpdateWindow(hWnd);
:
: while(GetMessage(&Message,NULL,0,0))
: {
: TranslateMessage(&Message);
: DispatchMessage(&Message);
: }
: return Message.wParam;
: }
:
: LRESULT CALLBACK MainWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam)
: {
: int x, y, a=0, j=0, i=0;
: static int Block[4][4]= {0,};
:
: static RECT rect;
: rect.top = 10;
: rect.left = 10;
: rect.right = 60;
: rect.bottom = 65;
:
: switch(iMessage)
: {
: case WM_CREATE :
: image[0] = LoadBitmap(((LPCREATESTRUCT)lParam)->hInstance, MAKEINTRESOURCE(IDB_BITMAP1));
: image[1] = LoadBitmap(((LPCREATESTRUCT)lParam)->hInstance, MAKEINTRESOURCE(IDB_BITMAP2));
: image[2] = LoadBitmap(((LPCREATESTRUCT)lParam)->hInstance, MAKEINTRESOURCE(IDB_BITMAP3));
: image[3] = LoadBitmap(((LPCREATESTRUCT)lParam)->hInstance, MAKEINTRESOURCE(IDB_BITMAP4));
: image[4] = LoadBitmap(((LPCREATESTRUCT)lParam)->hInstance, MAKEINTRESOURCE(IDB_BITMAP5));
: image[5] = LoadBitmap(((LPCREATESTRUCT)lParam)->hInstance, MAKEINTRESOURCE(IDB_BITMAP6));
: image[6] = LoadBitmap(((LPCREATESTRUCT)lParam)->hInstance, MAKEINTRESOURCE(IDB_BITMAP7));
: image[7] = LoadBitmap(((LPCREATESTRUCT)lParam)->hInstance, MAKEINTRESOURCE(IDB_BITMAP8));
:
: break;
:
:
:
: case WM_PAINT:
: DoPaintMain(hWnd, iMessage, wParam, lParam);
: return 0;
:
:
:
:
|