Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: crazy boy

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    OK, I got it. The problem is in the function above. I created new function which I call instead:



    LRESULT LinkListBox_Add_ByID(HWND listbox, const Link *link)
    {
    WPARAM index1 = (WPARAM)...
  2. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    I have restored the changes and now I will test the function



    LRESULT LinkListBox_Add(HWND listbox, const Link *link)
    {
    WPARAM index = List_AddStringW(listbox, link->name());...
  3. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    Those are indexes of terrain constant (type of terrain for tile) and elevation for terrain tile.
  4. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    You can see the function. I have did precise tests to check if the "someLink" points to correct name of terrain. So I checked what value there should be selected. Then the SendDlgItemMessage with...
  5. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    I wrote the two commands at late night. Probably I total forgot what the message does. Now woken.

    So I will use the

    commands


    SendDlgItemMessage(dialog, IDC_TR_ID, LB_SETCURSEL, tn->cnst,...
  6. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    When I try use LB_SETITEMDATA / CB_SETITEMDATA my program crashes:

    // There was the original code which did the problems:
    // SendDlgItemMessage(dialog, IDC_TR_ID, LB_SETCURSEL, tn->cnst, 0);...
  7. Replies
    2
    Views
    79

    How to set bold text?

    How to set bold text for some control, e.g for static text or for control (checkbox, listbox, etc)?
  8. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    The item name is LPCWSTR and the id is integer.
    LPCWSTR list->name();
    int list->id();
    Hence I need advice how to join these 3 things:
    list->name() with ":" and list->id()

    But the result must...
  9. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    I did not write the Map Class. I do not use classes at this stage of my C++ knowledge. I only use them if I find them in existing project :-).

    There are two options for me. Either I will rely on...
  10. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    I need to do some changes to the program to improve it. Its author already in not involved in the project. I can modify it under GNU licence. The program can open game file and change terrain, and...
  11. Replies
    20
    Views
    268

    Re: Selection in listbox or combobox

    I am now learning how the program works. I have found class for the map.

    the ID is saved in .cnst (stands for constant). There is also elevation in the class as .elev.

    scen.h defines the Map...
  12. Replies
    20
    Views
    268

    Selection in listbox or combobox

    In a program for one game, there is listbox with terrain names. They are not sorted by names but by IDs which brings problems with orientation. When I want to set some terrain item to position x,y,...
  13. Replies
    12
    Views
    213

    Re: Add string to combo box

    But I think I could use instead controlName the number itself. See the resources:

    #define IDC_T_PSOURCE1 4011
    #define IDC_T_PTARGET1 4012
    #define IDC_T_UCLASS1 4013
    #define...
  14. Replies
    12
    Views
    213

    Re: Add string to combo box

    I am using Visual Studio 2010 on Windows XP.

    I tried this:


    std::ostringstream s;
    for (int c = 1; c <= 8; ++c) {
    s << c;
    std::string controlName = TBASE + s.str();...
  15. Replies
    12
    Views
    213

    Re: Add string to combo box

    Nice. Almost there. I have error:
    Error 1 error C2668: 'std::to_string' : ambiguous call to overloaded function


    std::string controlName;
    for (size_t c = 1; c <= 8; ++c) {
    controlName = TBASE...
  16. Replies
    12
    Views
    213

    Re: Add string to combo box

    Could you yet tell me how to do this in loop?

    LCombo_Fill(dialog, IDC_T_UCLASS + 1, esdata.unitgroups.head(), L"All");
    LCombo_Fill(dialog, IDC_T_UCLASS + 2, esdata.unitgroups.head(), L"All");...
  17. Replies
    12
    Views
    213

    Re: Add string to combo box

    Wow, I cannot get it:

    LRESULT res = SendMessage(GetDlgItem(dialog, IDC_T_UCLASS1), CB_GETCOUNT, 0, 0);
    returns 0x00000015
    Is there problem with the height of the control? Source:
    COMBOBOX ...
  18. Replies
    12
    Views
    213

    Re: Add string to combo box

    I checked it visually, just clicked on the Combo. You see there is only one item, but none from the loop.
    33685
  19. Replies
    12
    Views
    213

    Add string to combo box

    I cannot to upload the file to attachments so I add a link:
    http://sourceforge.net/projects/autots/files/AOKTS%20update/aokts-1.0.1%20r72%20update_test.zip/download
    Project file name: aokts.sln...
  20. Replies
    21
    Views
    386

    Re: On click tab event

    Solved. Thanks.
  21. Replies
    21
    Views
    386

    Re: On click tab event

    void SwitchPages(HINSTANCE app, HWND hPropSheetDlg, Scenario * scenario )
    {
    if ( scenario->isOpen() )
    {
    PropSheet_RemovePage( hPropSheetDlg, 7, pages[7] );
    PropSheet_RemovePage(...
  22. Replies
    21
    Views
    386

    Re: On click tab event

    Then I have similar problem. How can I remove the last two pages when calling SwitchPages, when the pages no longer exists? Do I must to make the variable pages global?


    // HINSTANCE app: Handle...
  23. Replies
    21
    Views
    386

    Re: On click tab event

    New question.

    In header I have:


    typedef struct PAGES_TEMPLATES_BACKUP_s
    {
    PROPSHEETPAGE Units1;
    PROPSHEETPAGE Triggers1;
    PROPSHEETPAGE Units2;
  24. Replies
    21
    Views
    386

    Re: On click tab event

    Never mind.

    New problem:
    How to find out if page is activated?

    I have this dlgproc in modul:



    INT_PTR CALLBACK Units2DlgProc(HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
  25. Replies
    21
    Views
    386

    Re: On click tab event

    At line

    sheet = (HWND)PropertySheet(&header);

    Unhandled exception at 0x5d5d3868 in aokts.exe: 0xC0000005: Access violation reading location 0xcccccccc.

    resources:...
Results 1 to 25 of 183
Page 1 of 8 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




HTML5 Development Center