Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Hide a SIOUX app

Posted on 2000-04-25
5
Medium Priority
?
195 Views
Last Modified: 2013-12-26
Hi there,

I'd like to hide the output window of a SIOUX (better: GUSI-SIOUX) application.
Alternatively would a "minimize" (like clicking at the right button in the titlebar) be a good first solution.

Thank you in advance for every answer!
Bye - chris
0
Comment
Question by:charlass
  • 3
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
munsie earned 320 total points
ID: 2749852
I can't vouch for the safety of this, but it should work...

#include <SIOUXGlobals.h>

and in your code:

HideWindow((GrafPort *) &SIOUXTextWindow->window);

Be sure to call ShowWindow() before giving up control to SIOUX again... if I didn't, SIOUX would get confused, and not allow me to quit the app.

Make sure you check the value of SIOUXTextWindow before calling HideWindow() on it... it is a pointer and it could be NULL.

good luck,
dennis
0
 
LVL 1

Author Comment

by:charlass
ID: 2750972
Adjusted points from 50 to 80
0
 
LVL 1

Author Comment

by:charlass
ID: 2750973
Hi,
thanks for your answer, but unfortunately your hint (check for NULL) was really necessary...
No idea why it is NULL - because of using GUSI? (PS: Creating a new project from scratch without GUSI doesn't work too => assume no GUSI problem)

So I was looking for sth. like EnumerateWindows(), to get the WindowPtr from a backdoor but had no success so far.

Any further ideas are highly appreciated!
chris
0
 
LVL 2

Expert Comment

by:munsie
ID: 2751101
well, it you haven't called printf() or something that causes SIOUX to create the window, then it will be NULL... you might try just calling printf("\n"); before trying to hide the window.

dennis
0
 
LVL 1

Author Comment

by:charlass
ID: 2751457
Hi Dennis,
either you are an expert or you're guessing great ;-)

The thing is: I tried some cout<<"blabla" already before my 2nd post. After your message I added the "\n" - and then it worked!
I assume the "\n" causes internally a flush() - it causes the same effect like calling cout<<"bla" + cout.flush().

Thanks for your help!
chris
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Loops Section Overview
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question