The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 HTML Dialog Size

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
j@y Posted - 04/26/2017 : 06:19:22 AM
Hi all,

I have tried to use the 'New HTML Dialog' X Function in CodeBuilder > Tools to build a new dialog with resizing allowed (same problem when disallowed, too).

I found lines where to set the dialog size in the code. However, regardless this setting, Origin remembers the last size of the dialog as displayed (and/or modified by mouse) and ignores the values in the code. Even after compiling and re-running the HTML Dlg, the size remains the same as during the last display.

Where is this setting saved? How can I force Origin to always use the size which is in the code as initial instead of that from the last run?

Many thanks for your help in advance.
(OrPrO 2017 SR1; Win10)

PS: Are there some new materials regarding the HTML dialog coding and functionality besides the three examples?
4   L A T E S T    R E P L I E S    (Newest First)
j@y Posted - 04/27/2017 : 05:19:42 AM
Thank you very much eparent and cpyang!

PS: The most important code

//prevent reading last dialog position and size from registry
DWORD dwFlags = DLG_NO_LOAD_TOP_LEFT | DLG_NO_LOAD_WIDTH_HEIGHT;
dlg.DoModalEx(GetWindow(), dwFlags);


is in the example source file but not on the webpage...
cpyang Posted - 04/26/2017 : 9:15:12 PM
Follow this

http://www.originlab.com/doc/OriginC/guide/first-HTML-dialog

and download the sample, and in HelloWorldDlg1.cpp, you see

void hello()
{
	HelloWorldDlg dlg;
	//prevent reading last dialog position and size from registry
	DWORD dwFlags = DLG_NO_LOAD_TOP_LEFT | DLG_NO_LOAD_WIDTH_HEIGHT;
	dlg.DoModalEx(GetWindow(), dwFlags);
}



CP

eparent Posted - 04/26/2017 : 12:49:55 PM
hi j@y,

We will add an option to the newHTML X-Function.

For now you can do the following:
You will see a call to DoModal or Create near the bottom of your cpp file. By default the code generated passes a single argument. There is an optional 2nd argument named dwOptions that defaults to zero. Pass the bit flags DLG_NO_LOAD_TOP_LEFT | DLG_NO_LOAD_WIDTH_HEIGHT to stop Origin from saving and restoring the dialog's position and size.
Chris D Posted - 04/26/2017 : 10:36:42 AM
Hi,

Because this is a very new and evolving addition to Origin, we have not had time to develop very in-depth documentation on the subject of HTML Dialogs beyond what we currently have:
http://www.originlab.com/doc/OriginC/guide/HTML-Dialog
and
http://blog.originlab.com/programming/json-oc-html

However, if you will email tech@originlab.com with your questions (including this one), we can address them directly as I am sure you will have others as you delve deeper into the subject. We can also offer handy tips that may help your specific needs.


Thanks,
Chris Drozdowski
Originlab Technical Support

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000