🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11866

Re: Using DialogBox api.

#11866
From: Remy Lebeau (TeamB)
Date: Tue, 13 Jan 2004 17:52
25 lines
1900 bytes
"Mike Collins" <mikec@kr8.co.uk> wrote in message
news:4003ecbc$2@newsgroups.borland.com...

> I had to remove the default autogenerated .res file from the project

You can't do that.  The IDE won't allow it.  It will always re-create the
.res file if it is missing.  Instead, you should be simply giving your
dialogs more unique IDs, or just use names instad of numeric values to begin
with.

> I'm calling the api like this (not sure if the two handles are correct):

You are trying to pass the Application's HWND Handle where the function is
expecting a module HINSTANCE instead.  An HWND is a window, not a module
identifer.  If you are compiling the dialog into the exe directly, then you
should be using the global HInstance variable instead.  That would explain
why the function can never find your resources at all.

>                     MAKEINTRESOURCE (1),

I would not suggest you use such low numbers for your own IDs.


Gambit
Technical Details
Message-ID: <40042ed8$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4003ecbc$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,369c982ee23b43f4
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-13 10:07:53 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4003ecbc$2@newsgroups.borland.com>
Subject: Re: Using DialogBox api.
Date: Tue, 13 Jan 2004 09:52:07 -0800
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <40042ed8$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1074015960 67.22.138.253 (13 Jan 2004 09:46:00 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail