🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
18 messages
18 total messages Started by JD Fri, 06 Jul 2007 22:41
CreateDialogIndirect and DLGTEMPLATE
#1612
Author: JD
Date: Fri, 06 Jul 2007 22:41
8 lines
1007 bytes
I would appreciate a small working sample using DLGTEMPLATE and 
CreateDialogIndirect.

The sample in the win32.hlp compiles but always returns -1.

Thanks!

~ JD
Re: CreateDialogIndirect and DLGTEMPLATE
#1613
Author: Bob Gonder
Date: Sat, 07 Jul 2007 01:45
18 lines
1389 bytes
JD wrote:

>I would appreciate a small working sample using DLGTEMPLATE and 
>CreateDialogIndirect.
>
>The sample in the win32.hlp compiles but always returns -1.

That's odd.
CreateDialogIndirect is supposed to return NULL or an HWND

Which example would that be?
The one under
Creating a Modal Dialog Box
or the next page:
Creating a Modeless Dialog Box
Or
Creating a Template in Memory
I can't find help example for CreateDialogIndirect
Re: CreateDialogIndirect and DLGTEMPLATE
#1614
Author: Ed Mulroy [TeamB]
Date: Sat, 07 Jul 2007 02:01
18 lines
1667 bytes
CreateDialogIndirect is a macro that converts to CreateDialogIndirectParam 
(with A or W at the end for ascii or unicode).

Look here for more info and continue on to the following entries.
http://blogs.msdn.com/oldnewthing/archive/2005/03/29/403298.aspx

It might be a convenient time to also step back and review the subject:
http://msdn2.microsoft.com/en-us/library/ms632588.aspx

.  Ed

> JD wrote in message
> news:468ec508@newsgroups.borland.com...
>
>I would appreciate a small working sample using DLGTEMPLATE and 
>CreateDialogIndirect.
>
> The sample in the win32.hlp compiles but always returns -1.
Re: CreateDialogIndirect and DLGTEMPLATE
#1618
Author: JD
Date: Sat, 07 Jul 2007 17:52
25 lines
1575 bytes
Bob Gonder <notbg@notmindspring.invalid> wrote:
>
>>The sample in the win32.hlp compiles but always returns -1.
>
>That's odd.
>CreateDialogIndirect is supposed to return NULL or an HWND

My win32.hlp says -1 if it fails as does MSDN:

    http://msdn2.microsoft.com/en-us/library/ms645457.aspx

although I see now from MSDN that I can call GetLastError
which I have not done.

> Which example would that be?

Creating a Template in Memory

>I can't find help example for CreateDialogIndirect

Sounds like you did just fine to me <g>.

Thanks!

~ JD
Re: CreateDialogIndirect and DLGTEMPLATE
#1616
Author: JD
Date: Sat, 07 Jul 2007 17:53
20 lines
1673 bytes
"Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> wrote:
>
>CreateDialogIndirect is a macro that converts to CreateDialogIndirectParam 
>(with A or W at the end for ascii or unicode).
>
>Look here for more info and continue on to the following entries.
>http://blogs.msdn.com/oldnewthing/archive/2005/03/29/403298.aspx

That's an interesting link but I can't get the Resource
Compiler to compile the sample dialog in RC.hlp because it
keeps puking on 'DIALOG'.

>It might be a convenient time to also step back and review the subject:
>http://msdn2.microsoft.com/en-us/library/ms632588.aspx

I hadn't seen that page.

Thanks!

~ JD
Re: CreateDialogIndirect and DLGTEMPLATE
#1619
Author: Bob Gonder
Date: Sat, 07 Jul 2007 22:01
24 lines
1777 bytes
JD wrote:
>Bob Gonder  wrote:

>>That's odd.
>>CreateDialogIndirect is supposed to return NULL or an HWND
>
>My win32.hlp says -1 if it fails as does MSDN:
>
>    http://msdn2.microsoft.com/en-us/library/ms645457.aspx

Re-read your Subject, as well as your original post.

That link is for is
	DialogBoxIndirect()
 which is something different from the current topic of
	CreateDialogIndirect()
http://msdn2.microsoft.com/en-us/library/ms645436.aspx

>>I can't find help example for CreateDialogIndirect
>
>Sounds like you did just fine to me <g>.

Nope, sorry, still not found an example of CreateDialogIndirect()
(other than Ed's very interesting links)
Re: CreateDialogIndirect and DLGTEMPLATE
#1620
Author: Bob Gonder
Date: Sat, 07 Jul 2007 22:44
44 lines
2798 bytes
JD wrote:

>"Ed Mulroy [TeamB]"  wrote:
>>
>>Look here for more info and continue on to the following entries.
>>http://blogs.msdn.com/oldnewthing/archive/2005/03/29/403298.aspx
>
>That's an interesting link but I can't get the Resource
>Compiler to compile the sample dialog in RC.hlp because it
>keeps puking on 'DIALOG'.

There must be some pretty interesting drugs in your area...
I can't see a single DIALOG or RC.hlp, or mention of the Resource Compiler in those
articles?  And why would you run the Resource Compiler an a *.hlp file anyway?

Ok, so you are probably off on another tangent, having nothing to do with the subject at
hand.  I just did a complete file scan, and have 0 copies of rc.hlp on my system, so
really have no idea what your complaint is about.

However, this is a small portion of a working rc file
(Actually, I never got the abort dialog to work to my satisfaction, so I have it turned
off in the code, but this still compiles, and would function as a dialog.)

#include	"C:\CPP\BCC55\INCLUDE\winuser.rh"

// <these also get included in the application>
#define IDD_FILE		3333
#define IDD_TEXT	3334
#define IDD_CANCEL	3335
#define AbortDlg		1
// </ these also get included in the application>

ICON_1		ICON "256.ico"
ICON_16		ICON "16.ico"
ICON_32		ICON "32.ico"

AbortDlg DIALOG 33, 32, 160, 70
STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "My Abort Dialog"
BEGIN
	CONTROL "Now Printing: ", IDD_TEXT, "static", SS_CENTER | WS_CHILD, 0, 10, 160, 8
	CONTROL "", IDD_FILE, "static", SS_CENTER | WS_CHILD, 0, 25, 160, 8
	DEFPUSHBUTTON "Cancel", IDD_CANCEL, 60, 45, 45, 15
END
Re: CreateDialogIndirect and DLGTEMPLATE
#1621
Author: JD
Date: Sun, 08 Jul 2007 04:05
12 lines
1450 bytes
Bob Gonder <notbg@notmindspring.invalid> wrote:
>
>Re-read your Subject, as well as your original post.
>
> That link is for is DialogBoxIndirect() which is something
> different from the current topic of CreateDialogIndirect()

You're right! My applogies for the confusion!

DialogBoxIndirect is the correct subject.

~ JD
Re: CreateDialogIndirect and DLGTEMPLATE
#1622
Author: JD
Date: Sun, 08 Jul 2007 04:08
50 lines
2405 bytes
Bob Gonder <notbg@notmindspring.invalid> wrote:
>
>>That's an interesting link but I can't get the Resource
>>Compiler to compile the sample dialog in RC.hlp because it
>>keeps puking on 'DIALOG'.
>
> There must be some pretty interesting drugs in your area...

If only ....

> I can't see a single DIALOG

'DIALOG' is a win32 KeyWord and not a win32 #define(s).

> or RC.hlp, or mention of the Resource Compiler in those
> articles?

That link used a resource which means that I would need to
compile the dialog into a resource which means using the
Resource Compiler which leads to RC.hlp (scan your hard
drive) for the correct syntax.

Plain and simple ... the RC pukes on 'DIALOG'.

> And why would you run the Resource Compiler an a *.hlp file
> anyway?

I wouldn't and why would you think that I would?

> Ok, so you are probably off on another tangent,

Good chance but not today - I'm completely sober! :-( .

> I just did a complete file scan, and have 0 copies of rc.hlp
> on my system, so really have no idea what your complaint is
> about.

All I can say is that I have BCB6+ on my system and that
earlier posts suggest that RC.hlp has been around for
several years. In any event, I have it. If you want it ....

> However, this is a small portion of a working rc file [...]

<snip>

>AbortDlg DIALOG <---

This is where the RC pukes on me.

~ JD
Re: CreateDialogIndirect and DLGTEMPLATE
#1623
Author: Ed Mulroy [TeamB]
Date: Sun, 08 Jul 2007 11:24
66 lines
3286 bytes
>> or RC.hlp, or mention of the Resource Compiler in those
>> articles?
>
> That link used a resource which means that I would need to
> compile the dialog into a resource which means using the
> Resource Compiler which leads to RC.hlp (scan your hard
> drive) for the correct syntax.

The rc.hlp file is a help file for the system that creates help files, not 
resource files.   It is in the directory "\program files\borland 
shared\mshelp".  The contents of that directory are not related to resources 
or resource file.

The resource compiler is brcc32.exe and it happily accepts the word DIALOG.

.  Ed

> JD wrote in message
> news:4690635e@newsgroups.borland.com...
>
>>>That's an interesting link but I can't get the Resource
>>>Compiler to compile the sample dialog in RC.hlp because it
>>>keeps puking on 'DIALOG'.
>>
>> There must be some pretty interesting drugs in your area...
>
> If only ....
>
>> I can't see a single DIALOG
>
> 'DIALOG' is a win32 KeyWord and not a win32 #define(s).
>
>> or RC.hlp, or mention of the Resource Compiler in those
>> articles?
>
> That link used a resource which means that I would need to
> compile the dialog into a resource which means using the
> Resource Compiler which leads to RC.hlp (scan your hard
> drive) for the correct syntax.
>
> Plain and simple ... the RC pukes on 'DIALOG'.
>
>> And why would you run the Resource Compiler an a *.hlp file
>> anyway?
>
> I wouldn't and why would you think that I would?
>
>> Ok, so you are probably off on another tangent,
>
> Good chance but not today - I'm completely sober! :-( .
>
>> I just did a complete file scan, and have 0 copies of rc.hlp
>> on my system, so really have no idea what your complaint is
>> about.
>
> All I can say is that I have BCB6+ on my system and that
> earlier posts suggest that RC.hlp has been around for
> several years. In any event, I have it. If you want it ....
>
>> However, this is a small portion of a working rc file [...]
>
> <snip>
>
>>AbortDlg DIALOG <---
>
> This is where the RC pukes on me.
Re: CreateDialogIndirect and DLGTEMPLATE
#1624
Author: JD
Date: Mon, 09 Jul 2007 08:44
29 lines
1920 bytes
"Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> wrote:
>
> The rc.hlp file is a help file for the system that creates
> help files, not resource files.

When launched, the caption reads "Help Topics: Resource
Compiler User's Guide" and when I look at the contents,
it's clear to me to be a help file for the resource
compiler.

> It is in the directory "\program files\borland shared\mshelp".

I found mine in "\Program Files\Common Files\Borland Shared\MSHelp\"

> The contents of that directory are not related to resources or resource 
> file.

I have no response to that.

> The resource compiler is brcc32.exe and it happily accepts
> the word DIALOG.

I'm using MS RC v3.51.1016.1 and I have no idea why I don't
have brcc32 on my drive. Looks like time to install BDS and
get it over with.

Thanks.

~ JD
Re: CreateDialogIndirect and DLGTEMPLATE
#1625
Author: Ed Mulroy [TeamB]
Date: Mon, 09 Jul 2007 12:06
75 lines
3601 bytes
> When launched, the caption reads "Help Topics: Resource
> Compiler User's Guide" ...

The Windows help system also uses "resource" for the name of the source used 
to create a help file.  It is a different type of resource than the one for 
which you were looking.

>> It is in the directory "\program files\borland shared\mshelp".
>
> I found mine in "\Program Files\Common Files\Borland Shared\
> MSHelp\"

The directory that you show is correct.  The one I showed is not.  I typed 
in the directory name from memory - so much for the quality of my memory :-(

>> The resource compiler is brcc32.exe ...
>
> I'm using MS RC v3.51.1016.1 and I have no idea why I don't
> have brcc32 on my drive...

The machine I am on right now has BCB version 6 on it.  Here is a screen 
capture of a directory search.

--------------------------
C:\Program Files\Borland\CBuilder6\Bin
>ver

Microsoft Windows XP [Version 5.1.2600]

C:\Program Files\Borland\CBuilder6\Bin
>dir brcc*.exe
 Volume in drive C has no label.
 Volume Serial Number is FC8D-A209

 Directory of C:\Program Files\Borland\CBuilder6\Bin

02/01/2002  10:00 AM           168,992 brcc32.exe
               1 File(s)        168,992 bytes
               0 Dir(s)  11,433,058,304 bytes free

C:\Program Files\Borland\CBuilder6\Bin
>
--------------------------

There also is another, brc32.exe (only one 'c' in the name).  It supposedly 
is a shell for brcc32.exe.  I don't know of any reasons to use it.

.  Ed

> JD wrote in message
> news:4691f589@newsgroups.borland.com...
>>
>> The rc.hlp file is a help file for the system that creates
>> help files, not resource files.
>
> When launched, the caption reads "Help Topics: Resource
> Compiler User's Guide" and when I look at the contents,
> it's clear to me to be a help file for the resource
> compiler.
>
>> It is in the directory "\program files\borland shared\mshelp".
>
> I found mine in "\Program Files\Common Files\Borland Shared\MSHelp\"
>
>> The contents of that directory are not related to resources or resource 
>> file.
>
> I have no response to that.
>
>> The resource compiler is brcc32.exe and it happily accepts
>> the word DIALOG.
>
> I'm using MS RC v3.51.1016.1 and I have no idea why I don't
> have brcc32 on my drive. Looks like time to install BDS and
> get it over with.
Re: CreateDialogIndirect and DLGTEMPLATE
#1633
Author: JD
Date: Tue, 10 Jul 2007 05:15
12 lines
1725 bytes
"Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> wrote in message 
news:469224e4@newsgroups.borland.com...
>> When launched, the caption reads "Help Topics: Resource
>> Compiler User's Guide" ...
>
> The Windows help system also uses "resource" for the name of the source 
> used to create a help file.  It is a different type of resource than the 
> one for which you were looking.

Please see the attachment group for a screen shot.

~ JD
Re: CreateDialogIndirect and DLGTEMPLATE
#1635
Author: Ed Mulroy [TeamB]
Date: Tue, 10 Jul 2007 10:35
12 lines
1608 bytes
Yes, it looks as if there is an incorrect entry in that list.

In any case, the help compiler is not related to the type of resources 
stored in a compiled resource, *.res, file and linked into a executable or 
dll.

.  Ed

> JD wrote in message
> news:46931612@newsgroups.borland.com...
>
> Please see the attachment group for a screen shot.
Re: CreateDialogIndirect and DLGTEMPLATE
#1638
Author: Bob Gonder
Date: Tue, 10 Jul 2007 13:25
8 lines
1489 bytes
JD wrote:

>Please see the attachment group for a screen shot.

The Borland RC is discussed in the BCB5TOOL.hlp

And I believe it was Remy posted this link a year or three ago...
http://msdn.microsoft.com/library/en-us/tools/tools/resource_definition_statements.asp
Re: CreateDialogIndirect and DLGTEMPLATE
#1641
Author: Ed Mulroy [TeamB]
Date: Tue, 10 Jul 2007 14:38
12 lines
1776 bytes
FYI: Microsoft has moved that page.  The new URL is:
  http://msdn2.microsoft.com/en-us/library/aa381043.aspx

.  Ed

> Bob Gonder wrote in message
> news:ar1793l3q67dhkk0eek7vo4pg4fd2o781q@4ax.com...
>
> The Borland RC is discussed in the BCB5TOOL.hlp
>
> And I believe it was Remy posted this link a year or three ago...
> http://msdn.microsoft.com/library/en-us/tools/tools/resource_definition_statements.asp
Re: CreateDialogIndirect and DLGTEMPLATE
#1548
Author: Bob Gonder
Date: Tue, 10 Jul 2007 20:58
7 lines
1562 bytes
Ed Mulroy [TeamB] wrote:

>FYI: Microsoft has moved that page.  The new URL is:

Weird.
When I posted, the link was from the address bar.
Today it's redirected.
Re: CreateDialogIndirect and DLGTEMPLATE
#1550
Author: Ed Mulroy [TeamB]
Date: Tue, 10 Jul 2007 23:52
14 lines
1820 bytes
Welcome to MS' way of handling their pages.  I had to change about 50 links 
today on http://www.mulroy.org/msoft.htm and 
http://www.mulroy.org/msoft2.htm

.  Ed

> Bob Gonder wrote in message
> news:7hs793leh74b76cfqho871h6akp0ji66ks@4ax.com...
>
>>FYI: Microsoft has moved that page.  The new URL is:
>
> Weird.
> When I posted, the link was from the address bar.
> Today it's redirected.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads