NO

Recent Posts

Pages: [1] 2 3 ... 10
1
Dialog controls have a numeric id which the IDE attempts to map to symbolic names. See menu "Resource" -> "Symbols...".
No metadata of any kind (would be horribly complicated). A copy is a copy, so numeric id is copied (lets say 4001) and then you change the symbolic name of 4001 from "some_name_1" to "some_name_2". All ids with number 4001 is now mapped to "some_name_2". Clear?


No because if you copy for example a button whose name is IDC_HELLO and insert it in the same dialog copied button will receive a new name (numeric id) like 4002. However if button is inserted into a foreign dialog its name is still IDC_NAME.

Why is there a difference?

What happend to me? I created a new dialog based on an other dialog. So I copied this dialog and changed it. I didn‘t recognized that by changing control names of new dialog old dialog would also be changed. And after a while I compiled project and realized that old dialog didn't work any more because numeric ids of old dialog changed.


Would it not be better if an inserted control would be receive a new numeric id by default? 
2
Hi HelloWorld,

A bit of further input.  This method of copying does not impair functionality.  Different dialog boxes can have the same Button ID and will work correctly, because the message is handled by the procedure assigned to the Dialog Box for processing.  So another box with the same Button ID will not be processed inadvertently, the message won't get to it.

However -

If you really, really, really want to change it you can do it this way.
First you open whatever .h file is being used for your resource file and add a symbol(s) and ID(s) you want to use for Dialog box 2, Button IDs.  If your resource file is main.rc then main.h would be opened

#define IDCANCEL2 4076  //example add (be sure number is not already is use)
Save the .h file

The open the .rc resource file as TEXT (right click on the file, 'open as', text)
In the resource file locate the second Dialog box definition
Find the button you want to change
  CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 160, 23, 45, 15
change to
  CONTROL "Cancel", IDCANCEL2, "Button", WS_TABSTOP, 160, 23, 45, 15

Save the file.  Now it should have the new ID.

It takes a bit and not really necessary but it can be done.

John Z
3
I can't see a bug here. This is how it works.

Dialog controls have a numeric id which the IDE attempts to map to symbolic names. See menu "Resource" -> "Symbols...".
No metadata of any kind (would be horribly complicated). A copy is a copy, so numeric id is copied (lets say 4001) and then you change the symbolic name of 4001 from "some_name_1" to "some_name_2". All ids with number 4001 is now mapped to "some_name_2". Clear?
4
Sometimes if I copy controls from one dialog to another dialog both controls have the same name. If I change name of one control other control will also change its name.

Steps to Reproduce:
1.) Start PellesC and create a new resource
2.) Add two dialogs to resource
3.) Open first dialog, add a new button, open properties tab and set button name to IDC_HELLO
4.) Copy the button via [Strg]+[c], open second dialog and insert button via [Strg]+[v]
5.) Name of inserted button is IDC_HELLO. Change it to IDC_HELLO_2.
6.) Switch to first dialog and look to the button name. Its name is IDC_HELLO_2 and not IDC_HELLO!

In this state both buttons seems to share the same internal string, ID or whatever. Whenever you change the name of one button other button will also receive new name.


I attached resource file containing .rc and .h file.
5
Beginner questions / Re: How to debug programm with .dbg?
« Last post by Pelle on July 05, 2020, 06:09:05 pm »
FWIW,
found an old CD with pocc.exe version 1.00.0 (beta 1) from October 5, 2000 (32-bit, swedish texts only, no optimizer, ~C99, etc.)
Version at 2.30 for polink/polib/porc/pomc/pomake/podump/pobind/porebase, since they came from an earlier project.
Help in swedish only. No IDE yet...
6
Beginner questions / Re: How to debug programm with .dbg?
« Last post by TimoVJL on July 05, 2020, 09:11:22 am »
In my archive is a pocc.exe 16.6.2003 version 2.50.1.0  :)
 
7
Beginner questions / Re: How to debug programm with .dbg?
« Last post by MrBcx on July 04, 2020, 05:14:21 pm »
Quote
Maybe you should try LLVM, it probably has a better future than Pelles C...

Maybe so, but I'll always appreciate that Pelle Orinius has been providing his Pelles C
tools and support since 2003 and continues to do so.

It has been said that one of the best ways to test software is by using more than one
compiler system during development.  I recently added LLVM / Clang to my tool set.  I
now use MSVC, Mingw32/64 (Nuwen), LLVM-Clang, Pelles C, and (believe it or not)
Lcc-Win32 to do my testing on. 

Every compiler system brings something different to the table and each has its strengths
and weaknesses.   Using more than one compiler will almost certainly help one to develop
better code.  Pelles C should be in every Windows developer's tool kit.
8
Beginner questions / Re: How to debug programm with .dbg?
« Last post by bitcoin on July 04, 2020, 04:43:24 pm »
Thanks. No, Pelles C is better, LLVM or Visual Studio is huge and complicated.

I found, that IDA free can debug with .dbg format.
9
Announcements / Re: Version 10.00 (RC2) is now available
« Last post by John Z on July 04, 2020, 02:12:56 pm »
Thanks TimoVJL - I should have done that.  I will in the future.

Regards,
John Z
10
Announcements / Re: Version 10.00 (RC2) is now available
« Last post by Pelle on July 04, 2020, 02:01:38 pm »
A small project to test that.
Thanks! I will have a look...
Pages: [1] 2 3 ... 10