December 07, 2019, 11:05:27 pm

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Filerequest topmost

Started by Andy, October 26, 2018, 08:49:08 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

I would like to add TOPMOST to my constants program but when I add in the topmost style the filerequest screen is hidden.

Is there a way to add Topmost to filerequest?

Thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

fasecero

Set the FILEREQUEST parent, second parameter, to the TOPMOST window. It will be mandatory or will you allow the user to choose if the app is TOPMOST or not?

Code Select

$INCLUDE "windowssdk.inc"

WINDOW w1
OPENWINDOW w1,0,0,600,400,@MINBOX|@MAXBOX|@SIZE,NULL,"",&w1_handler
SetWindowPos(w1.hwnd, HWND_TOPMOST, 0, 0, 0, 0,SWP_NOSIZE | SWP_NOMOVE)
GetFilename(w1)

' main loop
WAITUNTIL w1 = 0
END

' window procedure
SUB w1_handler(), INT
SELECT @MESSAGE
CASE @IDCREATE
CENTERWINDOW w1

CASE @IDCLOSEWINDOW
CLOSEWINDOW w1
ENDSELECT

RETURN 0
ENDSUB

SUB GetFilename(WINDOW w), STRING
string filter = "All Files (*.*)|*.*|Text Files (*.txt)|*.txt||"
ISTRING filename[MAX_PATH] = FILEREQUEST("Select File", w, 1, filter,"txt", 0, "")
IF LEN(filename) THEN SETCAPTION w1, filename
ENDSUB

LarryMc

October 26, 2018, 10:33:51 pm #2 Last Edit: October 26, 2018, 10:46:13 pm by LarryMc
if fasecero's post doesn't solve your problem then have a look Here

in the bottom sub:
create a temp WINDOW t1
t1.hwnd=  wParam
use the MODIFYEXSTYLE command to add WS_EX_TOPMOST after the _Postmessage command

should work
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Fasecero and Larry,

Thanks for the help with the topmost problem.

It did work, but ultimately I didn't use it in the final version of the constants search program as the program also opens your browser but still remains topmost.

So in the end it wasn't what I wanted, but many thanks anyway.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.