Jump to content
  • Advertisement

client

Member
  • Content Count

    34
  • Joined

  • Last visited

Community Reputation

102 Neutral

About client

  • Rank
    Member
  1. I have downloaded WXPorts and unpacked in C:/lib/wxWidgets/, then i created a new project in MVSC++ 2010, next I set my project properties: VC++ Directories: Include dirs.: $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;C:\libs\wxWidgets-2.8.12\include\;C:\libs\wxWidgets-2.8.12\include\msvc\ Library dirs.: $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;C:\wxWidgets-2.8.7\lib\vc_lib\mswd; Source dirs.: $(VCInstallDir)atlmfc\src\mfc;$(VCInstallDir)atlmfc\src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstallDir)crt\src;C:\libs\wxWidgets-2.8.12\src;[/quote] Next i had included anitest.cpp and anitest.h to my project and compiled it. I got this one: 1>C:\libs\wxWidgets-2.8.12\include\msvc\wx/setup.h(142): fatal error C1083: Cannot open include file: '../../../lib/vc_lib/msw/wx/setup.h': No such file or directory[/quote] Can you help me with that?
  2. Any errors, but i can't see my bitmap in window. I also added bitmap in my project. API.cpp #include <windows.h> #include <iostream> #include <sstream> #include <WindowsX.h> #include <string> #include <cstdio> #include "resource_bg.h" #define WIN32_LEAN_AND_MEAN LPSTR className = "test"; UINT windowWidth = 460; UINT windowHeight = 220; char serverName[] = "test"; char titleText[256]; LPSTR windowName; HBITMAP bg_bitmap; BITMAP info_bitmap; LRESULT CALLBACK WindowEventProc(HWND hWindow, UINT uMsg, WPARAM wParam, LPARAM lParam); ///////////////////////////////////////////////////////// int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ sprintf_s(titleText, "Launcher %s", serverName); windowName = (LPSTR)titleText; WNDCLASSEX windowClass; ZeroMemory (&windowClass, sizeof(WNDCLASSEX)); windowClass.cbSize = sizeof (WNDCLASSEX); windowClass.style = CS_OWNDC; windowClass.lpfnWndProc = WindowEventProc; windowClass.cbClsExtra = 0; windowClass.cbWndExtra = 0; windowClass.hInstance = hInstance; windowClass.hIcon = LoadIcon (NULL, IDI_APPLICATION); windowClass.hCursor = LoadCursor (NULL, IDC_ARROW); windowClass.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); windowClass.lpszMenuName = NULL; windowClass.lpszClassName = className; windowClass.hIconSm = LoadIcon (NULL, IDI_APPLICATION); if (!RegisterClassEx(&windowClass)){ MessageBox (NULL, "There is a problem with your device.", "Error", MB_ICONEXCLAMATION | MB_OK); return 1; } HWND hWindow; hWindow = CreateWindowEx(NULL, className, windowName, WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX, 100, 100, windowWidth, windowHeight, NULL, NULL, hInstance, NULL); HWND hPrzyc = CreateWindowEx( 0, "BUTTON", "Dialog", WS_CHILD | WS_VISIBLE, 5, 5, 50, 25, hWindow, NULL, hInstance, NULL ); HBITMAP bg_bitmap = (HBITMAP)LoadImage(GetModuleHandle(NULL),MAKEINTRESOURCE(IDB_BITMAP2), IMAGE_BITMAP,0,0,0); if(bg_bitmap==0) { MessageBox(0,"Problem z wczytaniem bitmapy.","Brak pliku",MB_ICONERROR); return 0; } GetObject(bg_bitmap,sizeof(BITMAP),&info_bitmap); ShowWindow (hWindow, nCmdShow); UpdateWindow (hWindow); // Messages loop MSG msgStatement; while (GetMessage(&msgStatement, NULL, 0, 0)){ TranslateMessage (&msgStatement); DispatchMessage (&msgStatement); } return static_cast<int>(msgStatement.wParam); } ///////////////////////////////////////////////////////// LRESULT CALLBACK WindowEventProc(HWND hWindow, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch (uMsg) { HDC hdc, hdcBitmapy; PAINTSTRUCT ps; case WM_PAINT: { hdc=BeginPaint(hWindow,&ps); hdcBitmapy=CreateCompatibleDC(hdc); bg_bitmap=(HBITMAP)SelectObject(hdcBitmapy,bg_bitmap); BitBlt(hdc,0,0,1000,1000,hdcBitmapy,0,0,SRCCOPY); bg_bitmap=(HBITMAP)SelectObject(hdcBitmapy,bg_bitmap); DeleteDC(hdcBitmapy); EndPaint(hWindow,&ps); break; } case WM_DESTROY: { PostQuitMessage (0); return 0; } } return DefWindowProc(hWindow, uMsg, wParam, lParam); } resource_bg.h #ifndef IDC_STATIC #define IDC_STATIC (-1) #endif #define IDB_BITMAP2 101 bgres.rc #include <windows.h> #include <commctrl.h> #include <richedit.h> #include "resource_bg.h" // // Bitmap resources // LANGUAGE 0, SUBLANG_NEUTRAL IDB_BITMAP2 BITMAP "bitmap1.bmp"
  3. Hello. How Can i set my default text in combo box? I mean this text: for example - ^Click here^ HWND hCombo = CreateWindowEx( WS_EX_CLIENTEDGE, "COMBOBOX", NULL, WS_CHILD | WS_VISIBLE | WS_BORDER | CBS_DROPDOWN, 50, 50, 150, 200, hwnd, NULL, hInstance, NULL ); SendMessage( hCombo, CB_ADDSTRING, 0,( LPARAM ) "e1" ); SendMessage( hCombo, CB_ADDSTRING, 0,( LPARAM ) "e2" );
  4. client

    msvc++ 2011 express

    2011 has a developing state.
  5. client

    MyGUI v3.2.0 Released!

    Looks nice. Quite well documentation. It is real competition for other GUI's. [s]Would be nice, if you created a community forum.[/s] - Author edited his topic.
  6. client

    Image effects question

    I guess, you mean thermal effect. You should experiment with thermal vision pixel shaders. http://coding-experi...xel-shader.html
  7. client

    Logical OR operator

    @Edited: I got wrong.
  8. client

    Best Fast Food

    In Poland we have McDonald's, Burger King and KFC (and some damn salad bars). So, Mc'Donald.
  9. client

    Logical OR operator

    It should be: (ch == 'y' || ch == 'Y') @Down: a few secs.
  10. client

    New tech - RFC

    Graphic looks like Irlicht‘s graphic.
  11. client

    Some advice for a beginning programmer.

    You should learn C++ at first, it is very powerful and useful language. On the beginning your adventure, may have problems,but it really help you. When I was 14 decided to learn C++, but after 0.5 month changed my mind. I have regreted to nowa days.
  12. client

    Pointers

    No. Just no. Pointers are not integers, and don't ever mistake the conceptual machinations of imagining memory addresses as numbers to mean that they are simply "integers". They aren't. Heck on some machines they aren't even a single "integer", hello segmentation. This misconception is why so many people fail this quiz. The links were good though. A pointer simply describes an object whose value provides a reference to an object of the referenced type. Its not "faster", that doesn't even make sense. Faster than WHAT? [/quote] Fast than hell... I meant, useful in functions, powerful etc.Maybe I overcoloured using this word.
  13. client

    Pointers

    Numbers on the right side of picture are memory addresses. int b = 15; // Object int * a = NULL; //Pointer a = &b; //We use (&) to get address of (a) object. Try to output in console: &b, b, &a, a, *a. {...}
  14. It sounds very good and should help you with get a job. A lot of features which help you in programming.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!