|
Hi all,
can u suggest me what are the ways of having a vertical scroll bar in tab control.
The scroll bar should be dynamic i.e the scroll bar should be visible only when the size of tab is more.for normal size it should not be visible
Thanks
Sireesha
|
|
|
|
|
Hi
I would like to know whether SDK is available in VS2005. If yes how could I select that at the time of installation
|
|
|
|
|
If you're talking about the Platform SDK or the Windows SDK, they come with utilities that add the SDK's directories to the VS options, so that future builds will use the files in the SDK.
|
|
|
|
|
Hey. I was wondering if some one could help me with this article.
http://www.codeproject.com/internet/akashhttpproxy.asp
Could some one please download it and give me an updated code that I would use to communicate to the smtp server? (send helo, receiving the respone, send mailfrom, etc) This would be greatly appreciated.
|
|
|
|
|
I have an MDI Document/View App which (simplified) has 1 MyDocument class and 2 view classes. MyScrollView (derived from CScrollView) and MyFormView (derived from CFormView. Usually MyScrollView will be Maximized and occasionally MyFormView will be activated.
MyFormFrame (from CMDIChildWnd) is used to contain MyFormView and overrides PreCreateWindow to remove WS_MAXIMIZEBOX from the window style. MyFormFrame also implements OnCreate and OnGetMinMaxInfo in order to restrict the MyFormFrame to the exact fit for the MyFormView dialog resource.
With these preconditions (MyScrollView maximized and MyFormView maximize box disabled), when MyFormView is activated, MyScrollView is restored to its original non-maximized state (this is unwanted behaviour).
If I don't remove WS_MAXIMIZEBOX (from MyFormFrame) then MyFormView is activated with no caption at the top left of the MDICLIENT (and thus can't be draged).
Does anyone know if/how I can acheive the desired behaviour (MyFormView activated with caption on top of maximized MyScrollView)?
Many thanks
John
|
|
|
|
|
I want to handle notification when i click check box in treeview, but i don't see any notification message which allows this.
Beside this - i try to use OnClick event - but when i use method GetSelectedItem i getting wrong HTREEITEM of the item.
Thanks for any help.
|
|
|
|
|
|
Yanshof wrote: I want to handle notification when i click check box in treeview,
You need to handle WM_NOTIFY , notification code will be NM_CLICK .
Refer this[^].
|
|
|
|
|
:-DHello!!Everyone!In MFC ,how can I move a small bitmap to another place!And I can also drag the side edge to change the dimension of the bitmap! Thank you !
|
|
|
|
|
Basic steps:
On WM_LBUTTONDOWN message
Check and see if cursor on bitmap
Save cursor position
while mouse button down
{
if cursor position different than saved cursor position
Offset bitmap position by how far cursor has moved from the saved position
Draw Bitmap at new position
Redraw background exposed where bitmap was
save current cursor position
}
Resizing is very similar.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Thank you for your reply! I will try it.Give my best regargs to you!
|
|
|
|
|
I can not recall what the format is for a in-line if state.
?( a == b) : return 1;
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
I believe what you want is the Conditional Operator ?:[^]
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
I am changing over a communication .dll so that I can load it dynamically. All is going well, except for functions that have a default parameter. Here is an example function that had a default parameter for wID as zero.
I have in my .h file:
<br />
typedef WORD (_EXPORT_API *CM_SETTOOLID )(WORD wID = 0);<br />
extern CM_SETTOOLID CM_SetToolID;<br />
In my .cpp file that I include with my projects to load the .dll:
<br />
CM_SETTOOLID CM_SetToolID;<br />
CM_SetToolID = (CM_SETTOOLID)MyProcAddress( hCommManagerLib, "CM_SetToolID "); <br />
I get a compiler error:
error C2572: 'CM_SetToolID' : redefinition of default parameter : parameter 1
Is there anyway around this?
Thanks,
Eric
|
|
|
|
|
Hi Eric,
Sorry I can't help but you will be pleased to know that the latest compiler (VC++ 8) produces a different error.
Error Message
'symbol' : default-arguments are not allowed on this symbol
The C++ compiler does not allow default arguments on pointers to functions.
This code was accepted by the previous version's compiler but now gives an error. For code that works in all versions of Visual C++, do not assign a default value to a pointer-to-function argument.
For more information, see Summary of Compile-Time Breaking Changes.
The following line generates C2383:
Copy Code
// C2383.cpp
// compile with: /c
void (*pf)(int = 0); // C2383
void (*pf)(int); // OK
Regards,
John
|
|
|
|
|
Thanks for the help John. At least the later compiler gives an more distinct error message. Looks like my default values are out the window!
Eric
|
|
|
|
|
Hi
I have a class named CClipSaver and I want to create an array of this class. I do this as follows:
<code>CClipSaver* Clips[10];
.
int i=0;
Clips[i]=new CClipSaver;
Clips[i]->Save();
.
</code>
But it crashes!
Note:
When I do not use array (i.e.
CClipSaver * Clip;<br />
Clip=new ClipSaver();<br />
Clip->Save();
) everything works fine.
How should I declare and use the array?
|
|
|
|
|
The last time you posted this question, someone (I believe it was PJ Arends) asked what the
value of 'i' is when it crashes. Umm, what is that value?
You have an array of 10 pointers. You only show the first item in the array being used.
Something is happening elsewhere or code you haven't shown.
What line of code does the "crash" occur?
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
At any value of i (e.g. i=0) it crashes on initialization of the element (before Save() function)
|
|
|
|
|
MohammadAmiry wrote: Clips[i]=new CClipSaver;
Shouldn't this be:
Clips[i] = new CClipSaver(); MohammadAmiry wrote: Clips[i]->Save();.
But it crashes!
Have you stepped into the Step() method to figure out why? If, however, Clips[i] is NULL , you should not be calling the Save() method.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hey DavidCrow,
I noticed that too. What's the difference between those? I always "thought" that without
parenthesis, the default constructor gets called. I always use the parenthesis so I never
bothered to look it up
Thanks!
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Mark Salsbery wrote: What's the difference between those?
For non-integral types, there is none. For integral types (e.g., int , char ), it amounts to whether initialization occurs or not.
Mark Salsbery wrote: I always use the parenthesis so I never
bothered to look it up
Same here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Cool. Thanks for saving me the trouble of looking it up myself
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Oh yes!
Clips[i] = new CClipSaver();
is correct and it was a missprint (although I have tried both)!
It throws an Access Violation error!
|
|
|
|
|
MohammadAmiry wrote: It throws an Access Violation error!
Where????? Throw us a bone here
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|