🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: A very strange question

#15398
From: HuangC
Date: Fri, 04 Jul 2003 01:55
46 lines
2709 bytes
I think this is a bug of C++ Builder,
I do a same sample as instance 1 with VC++,
it can be operate successully by instance2,
I'm using BCB6.0.


"HuangC" <HuangC@motic.com.cn> д����Ϣ����
:3f03f89d$1@newsgroups.borland.com...
> hi all,
>
> a strange question,
> I created a simple application with only one window named Form1,
> the form's WindowState has been set to wsMinimized,
> then add some simple controls on it.
> this is the first instance.
>
> in another instance
> create a simple application with only one window too(named Form2),
> I add three button on it, the following three line
> is the event handle function of each button.
> HWND hWnd = FindWindow(NULL, "Form1"); if (hWnd != NULL)
>
> SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0);// Button1OnClick
> SendMessage(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);// Button2OnClick
> SendMessage(hWnd, WM_SYSCOMMAND, SC_RESTORE, 0); // Button3OnClick
>
> when the first instance run, it was minimized automatical,
> don't hit it from the taskbar, run the second program,
> Click button1 or button2, the form1 will maximize or restore,
> but the controls added before were disappeared.
> however if i hit the iconic in the taskbar, it's OK, Why?
>
> Another similar question,
> Don't set the WindowState wsMinimized first,
> the other conditions were same as above,
>
> click button2 first in form2, form1 minimized ok,
> click button1 or button3 in form2, form1 maximized or restore ok,
> click button2 again, failed, do not respond,
> even click the minimize button in the title bar, why?
>
> WinXP Profession/P4 1.8G/512M
>
> do you meet the same things?
>
>
Technical Details
Message-ID: <3f04deea@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f03f89d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,3047a8fdb7c36cf1
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-03 19:09:23 PST
Reply-To: "HuangC" <huangc@motic.com.cn>
From: "HuangC" <huangc@motic.com.cn>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f03f89d$1@newsgroups.borland.com>
Subject: Re: A very strange question
Date: Fri, 4 Jul 2003 09:55:34 +0800
Lines: 48
Organization: Motic
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 218.104.133.50
Message-ID: <3f04deea@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1057283818 218.104.133.50 (3 Jul 2003 18:56:58 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail