• Content count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About client

  • Rank
  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: [quote]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: [quote]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. Bitmap dosen't work.

    Any errors, but i can't see my bitmap in window. I also added bitmap in my project. API.cpp [CODE] #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); = 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); } [/CODE] resource_bg.h [CODE] #ifndef IDC_STATIC #define IDC_STATIC (-1) #endif #define IDB_BITMAP2 101 [/CODE] bgres.rc [CODE] #include <windows.h> #include <commctrl.h> #include <richedit.h> #include "resource_bg.h" // // Bitmap resources // LANGUAGE 0, SUBLANG_NEUTRAL IDB_BITMAP2 BITMAP "bitmap1.bmp" [/CODE]
  3. Hello. How Can i set my default text in combo box? I mean this text: for example - ^Click here^ [CODE]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" ); [/CODE]
  4. Lern C++ Sergey, lern.
  5. msvc++ 2011 express

    2011 has a developing state.
  6. 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.
  7. Image effects question

    I guess, you mean thermal effect. You should experiment with thermal vision pixel shaders. [url=""]http://coding-experi...xel-shader.html[/url]
  8. Logical OR operator

    @Edited: I got wrong.
  9. Best Fast Food

    In Poland we have McDonald's, Burger King and KFC (and some damn salad bars). So, Mc'Donald. [img][/img]
  10. Logical OR operator

    It should be: [code](ch == 'y' || ch == 'Y')[/code] @Down: a few secs. [img][/img]
  11. New tech - RFC

    Graphic looks like Irlicht‘s graphic.
  12. 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.
  13. Pointers

    [quote name='Washu' timestamp='1329687078' post='4914627'] [quote name='fastcall22' timestamp='1329682700' post='4914603']A pointer is an [tt]unsigned integer[/tt] (32-bits or 64-bits), that literally holds an address of memory.[/quote] 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 [url=""]this quiz[/url]. The links were good though. [quote name='BSt' timestamp='1329686279' post='4914617']It should help you, pointer "stores" a address to another object. It is faster. Also, We use them to create a new objects using (new).[/quote] 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.
  14. Pointers

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