|
|
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
|
|
|
|
|
Minidumps can be analyzed in VS7 (not sure about VC6). Or you can download the WinDBG debugger (its free):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/debugger_5fle.asp
With either tool, load the dmp file and you can view the stack dumps for each thread, loaded modules, etc, at the time the minidump was generated. Download the windows symbols from MSDN if you want symbolic info. If its your own code, make you have your own symbols (PDB files) also.
|
|
|
|
|
I've been trying to find out what the maximum path including the filename is under Windows 2000 using STDLIB functions. I saw quite a bit on MAX_PATH but it's 260 bytes. What's the scoop? Any links to info would help greatly.
|
|
|
|
|
IIRC max path component len is 254, and total pathlen ~32K chars. This is documented in MSDN.
|
|
|
|
|
When using the ANSI APIs, the entire path including terminating NULL can be no longer than MAX_PATH characters. If you need longer names, you'll have to use the Unicode APIs and the special prefix \\?\ See the CreateFile() docs for a longer explanation.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
If you downloaded the latest SDK from Microsoft the profiling function in Visual studio 6.0 doesn't work anymore - error code is *.pbo not found!
The problem rest in program call to PROFILE.EXE during profiling which is also a program in SDK (..Microsoft SDK\Bin\winnt) and this program is called instead the right one in ../VisualStudio/VC/Bin, because ...\SDK\bin is declared as system path. Rename the file in SDK and profiling will work again!
|
|
|
|
|
How i could make a program that we can create a new blank paper like MS WORD, but the paragraph text and the images are used like the objects in VB, they have property to change.
|
|
|
|
|
What code can I use to convert from a hexadecimal number to a decimal number? Is this procedure pretty much defining a function the utilizes the equation used to convert a hexadecimal number?
|
|
|
|
|
if you are asking about string formatting it is "sprintf(buffer, "%x", number)", otherwise I do not understand the question.
|
|
|
|
|
No I have store some hexadecimal numbers in a buffer and I want to to convert the hexadecimal number in the buffer to its decimal equivalent
|
|
|
|
|
hex, decimal, binary it is just representation of a number. Binary stream does not care, all it knows is that it is 1, 2,4 or 8 bytes of data.
example
int i = 19;
unsigned char buffer[256];//buffer
memcpy(buffer, &i, sizeof(int)); here we moved our number to the buffer
... //now use the buffer to write to the file or whatever you use it for
|
|
|
|
|
long strtol(<br />
const char *nptr,<br />
char **endptr,<br />
int base <br />
);<br />
long wcstol(<br />
const wchar_t *nptr,<br />
wchar_t **endptr,<br />
int base <br />
);<br />
Maxwell Chen
Lets make bugs better!
|
|
|
|
|
I'm using CTooltipCtrl to provide tooltips for buttons on an "always on top" modal dialog.
This works fine while the dialog has the focus, but I'd also like the tooltips to pop up accordingly even if the dialog does not have the focus (MS Office Shortcut Bar does this).
Any ideas how I can do it?
Thanks in advance
|
|
|
|
|
If I understand your question, what you want to do is specify the TTS_ALWAYSTIP style when you create the CToolTipCtrl.
m_ToolTip.Create(this, TTS_ALWAYSTIP);
srs
|
|
|
|