|
I want to replace it by one of my own
|
|
|
|
|
The simplest way to do this is to disable the built-in scrollbar on the list box, and then place your own adjacent to the list box. I'm not sure if even using ownerdraw you could actually replace the built-in scrollbar.
Software Zen: delete this;
|
|
|
|
|
I've thought that too, but if i do, i'll have to map the mouse and key events by my own, i only want to replace the classic scroolbar by one of my own, withou mapping the events, is there another way?
|
|
|
|
|
Not that I know of (and I looked hard). I ran into this very problem on an application that used a touch screen. It turns out the builtin scrollbar didn't resize in a way that was appropriate for the touch screen, so I ended up building my own. I could have used the so-called 'flat scrollbars' provided by some versions of Internet Explorer, but they're not a good idea (they're no longer supported under IE6+).
Software Zen: delete this;
|
|
|
|
|
At the moment I'm trying to create my own automation plugin for Photoshop. My specs: Windows 2000, Photoshop 7.0, Photoshop SDK v6.0.
The docs for the SDK are below average, especially for the info on the Action File Format, located in the doc "Photoshop File Formats.pdf" p70. I;m trying to understand the Alias structure that is placed into every photoshop action file. It makes mention of handle, FSSpec, and a windows full path. Being on a windows based pc i suspected the alias data within the action file would simply be a full path string to be read in but unfortunately the path is surrounded with rubish data that i suspect is Macintosh information.
My question is when i read in the alias structure from an action file how exactly do I parse it to create an alias property within a newly created descriptor? Or, simply what is the FSSpec format so that i can make sense of the surround rubish.
Thanks for any tips.
|
|
|
|
|
hello,
i would like know how to attribuate a time to one variabl who i declared and this time i can mesure it,but with second,for exemple i would that this variabl have time equal to 05 econd.
|
|
|
|
|
I did not get what you need exactly..
please give an example
|
|
|
|
|
if i want that the application terminate in 5 second how to attribuat this time to the variable (and it's true if i want to attribuat 10 minutsà).
how to attribuate seconde or minute or hours?
think you
|
|
|
|
|
Hello,
I'm using a CTreeCtrl, which is processing the notify message TVN_GETINFOTIP to display an InfoTip. The tip displays a multiline description of the item in the tree, and that is working just fine. However, the InfoTip goes away on its own after a few seconds, which is often not long enough for the user to read its entire contents.
Is there a way I can increase the duration of the InfoTip, so it stays displayed longer, or until the user moves the mouse away?
Would it be a better idea for me to use a ToolTip control instead?
thanks
srs
|
|
|
|
|
I use Zafir Anjum's TitleTip[^] class to provide an infinitely displayed tooltip in my TakeStock[^] app. I use it to display a stock quote tooltip when the window is too narrow to display the entire quote.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
If I recall correctly, there was a special type of "message box" that contained a static control, a single edit control and two push butten - OK and Cancel. This box could be used to get a single text string from the user - basically it was a "convience", thus saving the programmer from having to create a whole dialog box just to get a single text string from the user. Does anybody remember what it was called and what the MFC or API call was to access this box? I searched both the forums on this website as well as MSDN documentation and turned up nothing.
Thanks
|
|
|
|
|
Wasn't that a VB thing?
|
|
|
|
|
That may be where I remember it from - in Visual Basic. I'll have to go see if I can dig up the source code of a toy program I created under VC++ a few years ago when I was writting a program to access SCSI devices at the low (sector) level. It was a program that allowed me to enter a sector number and it read that sector from a SCSI device and displayed it in a HEX/ASCII dump, like you typically see in hex editors. I remember using a simple dialog to get the sector number, but I cannot remember if it was something built into the MFC or something I made up using the dialog editor and the CDialog class. I think I just passed in a string for the text to be displayed in the dialog, i.e. "Enter Sector number to read", and if the OK button was pressed, it returned a string containing the text entered in the text field or NULL if cancel was pressed.
Oh well, if this turnes out to be a dead-end, it is nothing for me to whip togther a quick dialog using the dialog editor and CDialog class to create the necessary dialog box - just hoping that there was a "convience" feature available in the library.
|
|
|
|
|
|
Thanks! That's what that was - InputBox, but as was mentioned, it is a VB thing. I was going to make up my own and submit it to this site, but looks like someone already has .
I guess I ought to sign up for an account on here. This website is turning out to be a real nice resource for Windows developers (this is my first real project under Windows, just about everything I did before was under Unix, so Windows development is still relatively new to me).
Thanks for the help
|
|
|
|
|
I'm looking for a 3rd alternative to my problem, here is the situation (using VC++ 6 ):
I will be creating a ton of similar looking dialogs for my application ( same pattern ), each dialog is build with other child dialogs components ( like building blocks ), each needs to be different; each child dialog is independant and is responsible for itself.
I first started using the resource editor and created each dialog, and placing static controls as placeholder, and creating the different child dialogs in each dialog that I created, using the place holders to place the child dialogs.
pros : easy, simple ...
cons : can't use the child dialog directly in the parent dialog, in the resource editor when designing each dialog.
Then, I was asked to see if I can make it easier to the other programmers, so, instead of using the resource editors, I simply create each child dialog, and move them by hand.
pros : not much work is needed in the resource editor, everything is code.
cons : limitation on the flexibility of the parent's dialog layout.
I think the best solution could be to use somekind of custom ActiveX control. What is the best way/place to start looking for info on this (besides here ) ?
Can an ActiveX control be designed to have other MFC controls inside itself ?
Will there be something new and better for VC 7 ?
Thanks.
Max.
|
|
|
|
|
|
Yummy!
I will look into this thing this weekend.
Thanks.
Max.
|
|
|
|
|
I know there are a couple of similar posts but the reason I am posting is that the other posts concern dialog boxes. My post concerns property pages. I have a toolbar with buttons, one button brings up some preferences. These preferences are not an actual dialog box but property pages. The problem is that if the user has windows already open in the application, brings up the preferences, then goes back to another window, it does what other posts have described, it gets hidden behind the other window(s) and the user can no longer click on the toolbar. The property page header does not include the flag PSH_MODELESS. I tried to use this flag but if I have the preferences window open (property pages) and I click on an open window in my application that brings up a dialog box, I cannot close my preferences window. I have to close the other dialog box first. Does anyone have any ideas how I can get around this? I don't know what to do, I am not familiar with property pages.
The other bad thing is that this code is in C. I wish it was in C++ or MFC, but it isn't and I am not allowed to try to convert it.
Anyone, please help!
|
|
|
|
|
I have a dialog with a List control in it. I fill the list with browsed file paths and then I want to horizontal scroll the list to the right, so that the file name is visible. I can move the scroll slider to the right position with GetScrollLimit() and SetScrollPos(), I set the correct view of the control with SetHorizontalExtent(), but I can't send the message to actually scroll the view of the control. It’s scrolled correctly when I click with mouse on horizontal scroll!
Do you have any suggestions!
|
|
|
|
|
Just a thought (There are probably better ways to fix it).. You might try to give the control focus when an item is added to the list.. I had a simialr problem with a RichEditControl.. This fixed it for me..
// Get the window that currently has the focus..
CWnd* pOld = (CWnd*)GetFocus();
// Steal the focus
m_cList.SetFocus();
// Insert your items here.......
// Give the focus back to the window that had it..
::SetFocus(pOld->GetSafeHwnd());
|
|
|
|
|
I tried the suggested but it does not work for me!
Thanks anyway!
|
|
|
|
|
Sorry for the late reply.. I have been on vacation.. Anyway you tried..
// Get the window that currently has the focus..
CWnd* pOld = (CWnd*)GetFocus();
// Steal the focus
m_cList.SetFocus();
// Insert your items here .......
// And send the scroll message .....
// Give the focus back to the window that had it..
::SetFocus(pOld->GetSafeHwnd());
Not sure what else it could be.. Hopefully you found a fix by now..
Rob
|
|
|
|
|
Thanks for the replay!
I solve the problem and it was in scroll message!
I don't why this message:
SendMessage(p_CListBox->GetSafeHwnd(), WM_HSCROLL, MAKEWPARAM(SB_ENDSCROLL, 0),0);
doesn't work.
I solve the problem with:
while (int i < 10)<br />
{<br />
SendMessage(p_CListBox->GetSafeHwnd(), WM_HSCROLL, MAKEWPARAM (SB_PAGERIGHT, 0),0);<br />
i++;<br />
};
|
|
|
|
|
Is there any way to analyze a MS dump/error report?
BCCode : 10000050 BCP1 : F17EF611 BCP2 : 00000001 BCP3 : F8406EEB
BCP4 : 00000000 OSVer : 5_1_2600 SP : 1_0 Product : 256_1
C:\WINDOWS\Minidump\Mini010303-01.dmp
C:\DOCUME~1\tosmit\LOCALS~1\Temp\WER3.tmp.dir00\sysdata.xml
Todd Smith
|
|
|
|