Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Status bar question Collapse All
Subject Author Date
Gevork Odabashyan Nov 2, 2004 - 7:45 AM

Hello...


How to display the string "Click Ctrl key to prevent docking" in status bar during control bar repositioning (Like Visual Studio 6.0)?


Thank You, Ruslan

Technical Support Nov 2, 2004 - 10:43 AM

The Click Ctrl key to prevent docking string is displayed automatically in the status bar’s pane whose identifier property is equal to zero. Prof-UIS automatically provides your apps with this feature. If you cannot see this string, then something goes wrong the status bar is initialized in your application.

If you need to set this text manually, then you may use the following method of the CExtControlBar class:

static void stat_SetMessageString(
   CWnd * pWnd,
   UINT nCmdID = AFX_IDS_IDLEMESSAGE
);
The pWnd parameter is your CFrameWnd-derived class, or any frame’s control bar, or any other window inside the frame. This method will automatically find the status bar and set the message loaded from the string table resource. The AFX_IDS_IDLEMESSAGE resource identifier corresponds to the standard "Ready string. The IDS_EXTSTATUS_PERVENT_DOCKING resource identifier corresponds to the Prof-UIS’s Click Ctrl key to prevent docking string.

Gevork Odabashyan Nov 3, 2004 - 5:49 AM

I’m sorry, but any of Your samples doesn’t display this string. Does the status bar is initialized wrong in Your samples? Or what I need to do to properly initialize the staus bar?


Thank You, Ruslan.

Technical Support Nov 3, 2004 - 10:54 AM

You are absolutely right. The most samples do not display this string because they are linked to Prof-UIS statically. The "Hold Ctrl ..." string is loaded from the IDS_EXTSTATUS_PERVENT_DOCKING resource (Prof-UIS DLL resources). The IDS_EXTSTATUS_PERVENT_DOCKING constant is used as a WPARAM parameter of the MFC’s internal WM_SETMESSAGESTRING string that is handled by CFrameWnd to load an appropriate string and put it into the status bar’s pane whose identifier is equal to zero. So, we have no chance to use this string in apps statically linked to Prof-UIS. But you may copy this string into your app’s resources to let your frame window load this message successfully when any Prof-UIS control bar starts to be drag-and-dropped.

Gevork Odabashyan Nov 4, 2004 - 6:21 AM

Thanks a lot. The problem was in static linkage, not in status bar’s pane identifier.

Dmitry Dulepov Nov 3, 2004 - 8:15 AM

Quote: "The Click Ctrl key to prevent docking string is displayed automatically in the status bar’s pane whose identifier property is equal to zero"