<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : LoadPosition question</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : LoadPosition question]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 08:27:21 +0000</pubDate>
  <lastBuildDate>Thu, 08 Jan 2009 16:37:36 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=13091</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[LoadPosition question : Ah, ok, I understand  ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44330&amp;title=loadposition-question#44330</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=760">dennisV</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 08 January 2009 at 4:37pm<br /><br />Ah, ok, I understand&nbsp;<img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" align="absmiddle">]]>
   </description>
   <pubDate>Thu, 08 Jan 2009 16:37:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44330&amp;title=loadposition-question#44330</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question : Of course it will work. Popup...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44329&amp;title=loadposition-question#44329</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 08 January 2009 at 4:31pm<br /><br />Of course it will work. Popup means that some app have popup appears on some state. Better for user-friendly desigh to have visible owner of such popup othercase popup can be under some other app and user will mo see it. Example - Google notifier which popup login dialog but sometimes under OutlookExpress window]]>
   </description>
   <pubDate>Thu, 08 Jan 2009 16:31:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44329&amp;title=loadposition-question#44329</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question : Overriding the LoadWindowPos()...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44327&amp;title=loadposition-question#44327</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=760">dennisV</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 08 January 2009 at 4:15pm<br /><br />Overriding the LoadWindowPos() seems to work (I pass in a bool specifying whether to hide the window or not). This is what I've got now:<br><br><font face="Courier New, Courier, mono">BOOL CMyXTWindowPos::LoadWindowPos(bool bHide, CWnd* pWnd, LPCTSTR lpszWndPos/*=NULL*/, LPCTSTR lpszSection/*=NULL*/)<br>{<br>&nbsp;&nbsp;&nbsp; ASSERT_VALID(pWnd); // must be valid.<br><br>&nbsp;&nbsp;&nbsp; if (::IsWindow(pWnd-&gt;m_hWnd))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (__super::LoadWindowPos(lpszWndPos, lpszSection))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(bHide)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; showCmd = SW_HIDE;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pWnd-&gt;SetWindowPlacement(this);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return TRUE;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; return FALSE;<br>}<br></font><br><br>I didn't exactly understand what you mean about popups - can you please explain a bit more?<br><br>Thanks!<br>]]>
   </description>
   <pubDate>Thu, 08 Jan 2009 16:15:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44327&amp;title=loadposition-question#44327</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question :   This is piece of SaveWindowPos...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44289&amp;title=loadposition-question#44289</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 07 January 2009 at 4:45pm<br /><br /><FONT size=2><P></FONT><FONT color=#008000 size=2></P><DIV>This is piece of <FONT size=2>SaveWindowPos function:</FONT></DIV><DIV>it always keep stored showCmd of <FONT size=2>WINDOWPLACEMENT as SW_SHOWNORMAL or SW_SHOWMAXIMIZED</FONT></DIV><DIV>&nbsp;</DIV><DIV>// Make sure we don't pop up</DIV><DIV></FONT><FONT color=#008000 size=2>// minimized the next time</FONT></DIV><DIV><FONT color=#0000ff size=2>if</FONT><FONT size=2> (showCmd != SW_SHOWMAXIMIZED)</FONT></DIV><DIV><FONT size=2>{</FONT></DIV><DIV><FONT size=2>showCmd = SW_SHOWNORMAL;</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>so in YOUR <FONT size=2>LoadWindowPos you can change showCmd before SetWindowPlacement call and it will be hidden or minimized as you with. Be careful with potential popups!<P>BOOL CXTWindowPos::LoadWindowPos(CWnd* pWnd, LPCTSTR lpszWndPos</FONT><FONT color=#008000 size=2>/*=NULL*/</FONT><FONT size=2>, LPCTSTR lpszSection</FONT><FONT color=#008000 size=2>/*=NULL*/</FONT><FONT size=2>)</P><DIV>{</DIV><P>ASSERT_VALID(pWnd); </FONT><FONT color=#008000 size=2>// must be valid.</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (::IsWindow(pWnd-&gt;m_hWnd))</P><P>{</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (LoadWindowPos(lpszWndPos, lpszSection))</P><P>{</P><P>pWnd-&gt;SetWindowPlacement(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>);</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> TRUE;</P><P>}</P><P>}</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> FALSE;</P><P>}</P></FONT></DIV></FONT>]]>
   </description>
   <pubDate>Wed, 07 Jan 2009 16:45:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44289&amp;title=loadposition-question#44289</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question : You right - but you can overwrite...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44288&amp;title=loadposition-question#44288</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 07 January 2009 at 4:08pm<br /><br />You right - but you can overwrite this function and use<DIV><FONT size=2>CWnd::SetWindowPos </FONT>instead of <FONT size=2>CWnd::</FONT>SetWindowPlacement</DIV><DIV>&nbsp;</DIV><DIV><FONT size=2>BOOL CXTWindowPos::LoadWindowPos(CWnd* pWnd, LPCTSTR lpszWndPos</FONT><FONT color=#008000 size=2>/*=NULL*/</FONT><FONT size=2>, LPCTSTR lpszSection</FONT><FONT color=#008000 size=2>/*=NULL*/</FONT><FONT size=2>)</DIV><DIV><DIV>{</DIV><P>ASSERT_VALID(pWnd); </FONT><FONT color=#008000 size=2>// must be valid.</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (::IsWindow(pWnd-&gt;m_hWnd))</P><P>{</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (LoadWindowPos(lpszWndPos, lpszSection))</P><P>{</P><P>pWnd-&gt;SetWindowPlacement(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>);</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> TRUE;</P><P>}</P><P>}</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> FALSE;</P><P>}</P></FONT></DIV>]]>
   </description>
   <pubDate>Wed, 07 Jan 2009 16:08:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44288&amp;title=loadposition-question#44288</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question :    mdoubson wrote:Usually in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44285&amp;title=loadposition-question#44285</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=760">dennisV</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 07 January 2009 at 3:43pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by mdoubson" alt="Originally posted by mdoubson" style="vertical-align: text-bottom;" /> <strong>mdoubson wrote:</strong><br /><br />Usually in such cases you can prepare everything in hidden widow state and show windows when you needed - still all your geometry will be proper e.g. you can dock control bar by x,y - coordinates</td></tr></table><br>Yes, I do have my window in the hidden state, but it becomes visible as soon as this is hit:<br><br>pWnd-&gt;SetWindowPlacement(this);<br><br>(inside the LoadWindowPos() function)<br>]]>
   </description>
   <pubDate>Wed, 07 Jan 2009 15:43:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44285&amp;title=loadposition-question#44285</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question : Usually in such cases you can...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44283&amp;title=loadposition-question#44283</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 07 January 2009 at 3:26pm<br /><br />Usually in such cases you can prepare everything in hidden widow state and show windows when you needed - still all your geometry will be proper e.g. you can dock control bar by x,y - coordinates]]>
   </description>
   <pubDate>Wed, 07 Jan 2009 15:26:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44283&amp;title=loadposition-question#44283</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question : Oops, sorry - I meant LoadWindowPos()....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44280&amp;title=loadposition-question#44280</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=760">dennisV</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 07 January 2009 at 3:15pm<br /><br />Oops, sorry - I meant LoadWindowPos(). This is how I have it:<br><br>bool CMainFrame::LoadPosition()<br>{<br>&nbsp;&nbsp;&nbsp; bool bRet = m_wndPosition.LoadWindowPos(this,_T("mainFrame"));<br>&nbsp;&nbsp;&nbsp; GetCommandBars()-&gt;RedrawCommandBars();<br><br>&nbsp;&nbsp;&nbsp; return bRet;<br>}<br><br>]]>
   </description>
   <pubDate>Wed, 07 Jan 2009 15:15:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44280&amp;title=loadposition-question#44280</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question : Hi, What is &amp;#034;LoadPosition&amp;#034;...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44261&amp;title=loadposition-question#44261</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 07 January 2009 at 1:50pm<br /><br /><P>Hi,</P><DIV>What is "LoadPosition" there is no such API and we don't have any class that has such method.</DIV>]]>
   </description>
   <pubDate>Wed, 07 Jan 2009 13:50:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44261&amp;title=loadposition-question#44261</guid>
  </item> 
  <item>
   <title><![CDATA[LoadPosition question : Hello all!Is it possible to call...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44220&amp;title=loadposition-question#44220</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=760">dennisV</a><br /><strong>Subject:</strong> 13091<br /><strong>Posted:</strong> 06 January 2009 at 4:19pm<br /><br />Hello all!<br><br>Is it possible to call LoadPosition, but for it not to actually display the main frame? The problem is that if I wish for the application to start minimized, I don't want to see the widow poping up and then getting minimized, but a call to LoadPosition from InitInstance does that. If I don't call LoadPosition, then the main window is not created properly (the CXTPTabClientWnd is not created it seems).<br><br>Thanks in advance!<br>]]>
   </description>
   <pubDate>Tue, 06 Jan 2009 16:19:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13091&amp;PID=44220&amp;title=loadposition-question#44220</guid>
  </item> 
 </channel>
</rss>