Click here to Skip to main content
15,395,181 members

Comments by Southmountain (Top 151 by date)

Southmountain 7-Aug-22 23:28pm View
the empty row is designed behavior for Windows designer.
so this statement will remove the last empty row.

you can test what I said....
Southmountain 28-Jun-22 21:38pm View
it is true:

"A value containing the index of the filter currently selected in the file dialog box. The default value is 1."
Southmountain 28-Jun-22 10:33am View
what is your Windows version and .NET framework version?
Southmountain 27-Jun-22 20:42pm View
today I read links on interface and explicit implementation on interface. I got very good understanding now:
In your example you have two Clone methods. But as both have no parameters (only different return types), there is no method override being done. C# allows you to keep the IClonable.Clone method, however it requires you to place the name of interface before the method name. As interfaces are public and the method is explicitly declared with the name of the interface there is no need for a access modifier as it is public by design.
Southmountain 27-Jun-22 0:17am View
I read the link on ICloneable interface(system) and it did not answer my question.
Southmountain 18-Jun-22 18:35pm View
there are other codes, but for this class, it's all.

thanks for your answer!
Southmountain 18-Jun-22 17:27pm View
thanks for your time. now I feel more assured about my understanding,,,
Southmountain 17-Jun-22 17:40pm View
thank you!
Southmountain 17-Jun-22 17:40pm View
thank you!
Southmountain 26-May-22 22:38pm View
it makes more sense to me now. thank you for your time!
Southmountain 26-May-22 9:36am View
thanks for the information! it is a little disappointing...
Southmountain 25-May-22 10:47am View
now I get it: it is the iteration on rectangle1. if I commented out that statement, it will break this iteration and become another new kind of iterations.

also I find one of your past answer on this DrawReversibleFrame question. it really helps.

Thank you!
Southmountain 22-May-22 20:14pm View
now I get it. highly appreciate your help on this question!
Southmountain 21-May-22 21:50pm View
thank you for your clarification!
Southmountain 21-May-22 13:50pm View
so this memory area needs to be locked to avoid other system processes overriding?
Southmountain 21-May-22 10:56am View
thanks for your time. I read this remark and wonder: if I don't use BitLock method, I can still manipulate this bimtmap in memory, maybe other threads can manipulate it at the same time?
Use the LockBits method to lock an existing bitmap in system memory so that it can be changed programmatically. You can change the color of an image with the SetPixel method, although the LockBits method offers better performance for large-scale changes.
Southmountain 13-Mar-22 21:16pm View
thank you! it works.
Southmountain 13-Mar-22 19:18pm View
since that article is old post, I doubt the author would care. so I give a shot here.
thank you for your comments!
Southmountain 4-Mar-22 17:42pm View
thank you! it works.
Southmountain 4-Dec-21 15:04pm View
this is a good catch!
Southmountain 1-Nov-21 22:48pm View
thank you very much!
Southmountain 24-Oct-21 11:09am View
thank you!
Southmountain 5-Oct-21 9:59am View
thank you very much!
Southmountain 29-Aug-21 20:37pm View
yes, it looks like static variable m_ptr only point to one instance.
so this static variable m_ptr is not necessary and can be removed?
Southmountain 29-Aug-21 20:33pm View
thanks for your knowledge. in essence, the friend function is a global function that specifically interact with this class.
Southmountain 28-Aug-21 22:08pm View
I updated my question, added a static int memeber...
Southmountain 28-Aug-21 22:02pm View
I see, it can access all data members, including protected data members too.
Southmountain 22-Aug-21 15:38pm View
on what machine, by what tool, you did this? I did it on my Windows 10 x64 Laptop using Code::Block installation with gcc compilter.
Southmountain 21-Aug-21 17:40pm View
thank you! it is what I am looking for...
Southmountain 21-Aug-21 17:38pm View
thank you for sharing this trick!
Southmountain 8-Aug-21 17:57pm View
thank you for sharing your insight on function parameters' point. also the link is good info and I will test these usages too.
Southmountain 7-Aug-21 19:42pm View
thank you for the confirmation! now I am very confident on this subject now.
Southmountain 7-Aug-21 17:02pm View
thank you for sharing your practice!
Southmountain 25-Jul-21 13:08pm View
thank you very much for this example!
Southmountain 24-Jul-21 22:18pm View
your reply leads me to another point on this example. that "extern" statement is not important, the key point is the last line. that example wants to show a technique on "allocation hook" the author claimed...
Southmountain 24-Jul-21 20:14pm View
thank you OG!
Southmountain 24-Jul-21 20:14pm View
thank you for your insight!
Southmountain 10-Jul-21 21:29pm View
thank you! I get it now.
Southmountain 10-Jul-21 21:28pm View
thank you OG!
Southmountain 25-Jun-21 18:24pm View
thank you for the answer!
Southmountain 25-Jun-21 18:24pm View
now I get it clearly!
Southmountain 25-Jun-21 13:57pm View
clear explanation as in the textbook!
Southmountain 19-Jun-21 16:34pm View
so from the point where #define statement is, the defined macro is effective for conditional compilation.
Southmountain 19-Jun-21 16:32pm View
your explanation makes sense to me now. thank you for your time!
Southmountain 29-May-21 18:21pm View
thank you for this explanation!
Southmountain 29-May-21 18:14pm View
thank you for sharing your understanding with me. now I am more confident to use this feature!
Southmountain 29-May-21 18:13pm View
thank you very much for this link! I like that site too.

I think I got this trick: one stone hits two birds:)
Southmountain 29-May-21 16:39pm View
thank you! any link could you share for your statement?
Southmountain 2-Apr-21 19:09pm View
your g++ message helps me to figure it out what's going on....
Southmountain 29-Mar-21 12:20pm View
thank you for your input:) I think I find the reason: the code used template style before 2003, now it has conformance issue...
Southmountain 25-Mar-21 15:15pm View
sorry I skipped few statements as this:
template <class T>
class TLineApproximator  
	//! \name Structures and typedefs
	//! 2D homogenous point
	struct SHomog
		SHomog(T _x=0, T _y=0, T _w=1)	{ x=_x; y=_y; w=_w;};	
			T x;
			T y;
			T w;
//skip few lines
Southmountain 20-Mar-21 13:05pm View
yes, it is indeed...
Southmountain 18-Mar-21 13:04pm View
so this pragma comment statement is equivalent to setting link options in command line or Visual Studio project configuration page?
Southmountain 18-Mar-21 13:01pm View
this pragma statement specifies that windows common control version shall be
Southmountain 18-Mar-21 10:12am View
very good links! I will study them.
Southmountain 18-Mar-21 10:11am View
I did it exactly as what you said before, it has no any impact...
Southmountain 6-Mar-21 9:36am View
Thank you very much!
Southmountain 27-Feb-21 15:18pm View
the link is great!
Southmountain 4-Jan-21 15:08pm View
got it. Thank you!
Southmountain 3-Jan-21 18:27pm View
thank you for your insight!
Southmountain 3-Jan-21 18:24pm View
here is the warning message:
Warning	C4091	'typedef ': ignored on left of 'Crosshair' when no variable is declared	NTGraph	c:\demo_temp\ntgraph_src\ntgraphctl.h
Southmountain 19-Dec-20 14:46pm View
I think I found the reason: I might not install STL feature for my Visual Studio 2017.
I will double check it and post answer here soon.
Southmountain 19-Dec-20 12:32pm View
thank you! actually I did google "DEBUG_RANGE" keyword on, did not get much at least first 2 pages.
Southmountain 18-Dec-20 11:44am View
this is the trick that I will master. thank you very much!
Southmountain 17-Dec-20 12:55pm View
thank you for this post! my 5!
Southmountain 17-Dec-20 12:48pm View
if I put cursor on DEBUG_NEW, a tooltip prompts: #define DEBUG_NEW new(this_file, _LINE_),
so all keyword new will be replaced by new(this_file, _LINE_)?
Southmountain 17-Dec-20 12:29pm View
thanks for these good links!
Southmountain 5-Nov-20 21:20pm View
thank you for the information! I got it.
Southmountain 5-Nov-20 21:20pm View
thank you!
Southmountain 3-Nov-20 11:24am View
any good article or post to share?
Southmountain 18-Oct-20 18:53pm View
thank you!
Southmountain 17-Oct-20 17:14pm View
Thanks OG!
Southmountain 17-Oct-20 17:13pm View
thanks for explaining this vtbl thing! I recall it now...
Southmountain 17-Oct-20 15:47pm View
crystal clear to me! thank you!
Southmountain 16-Oct-20 13:04pm View
thank you!
Southmountain 15-Oct-20 18:49pm View
thanks OG!
Southmountain 15-Oct-20 18:48pm View
thanks for the good link:)
Southmountain 13-Oct-20 14:11pm View
thank you very much!!!
Southmountain 12-Oct-20 12:52pm View
yes, I prefer to have my .c files staying intact. my understanding is assured by your confirmation!
thank you a million!
Southmountain 11-Oct-20 23:57pm View
thank you to share this! when I implement this function prototype, do I need to put this extern statement again?
extern "C"{
//implementationint function_name(int,int)
//code logic here
Southmountain 10-Oct-20 18:09pm View
did you put lib into your code repository?
Southmountain 10-Oct-20 17:19pm View
thanks OG! because I have source code, I am thinking to add them into project directly...
Southmountain 9-Oct-20 14:54pm View
thank you for sharing this GCC tip!
Southmountain 7-Oct-20 18:47pm View
thank you for the link!
Southmountain 6-Oct-20 22:21pm View
thank you very much!
Southmountain 6-Oct-20 13:19pm View
thank you very much! I got it now...
Southmountain 6-Oct-20 13:18pm View
thank you very much! now I got it.
Southmountain 5-Oct-20 20:53pm View
you are right about my current settings. I built my app targeting x86 and still get empty string...
Southmountain 5-Oct-20 17:15pm View
but I used registry editor to browse this item((MachineGUID)), there is a value there. it should not an empty string.
Southmountain 5-Oct-20 17:15pm View
but I used registry editor to browse this item, there is a value there. it should not an empty string.
Southmountain 3-Oct-20 17:46pm View
thank you for sharing this link!
Southmountain 3-Oct-20 13:18pm View
thank you OG! the missing semicolon is caused by coping code into this text box, some symbols got lost and I manually typed &num and forgot this ";".
Southmountain 2-Oct-20 16:55pm View
this is my screen printout:
addressed passed =:00D1FB74
addressed received=:00D1FB74
incr10(pnum) = 13
num= 3
*pnum is :13
Southmountain 26-Sep-20 16:30pm View
thank you very much! I test this demo to get more understanding on namespace concept. all other usage of namespace I played around well, until I ran into this case.
Southmountain 26-Sep-20 15:16pm View
thank you very much for your time! I understand your answer now.

for your EDIT1, what did you do to let it compiled? I am curious to know...
Southmountain 26-Sep-20 15:02pm View
but the argument types are different, it should be okay..
Southmountain 7-Sep-20 15:40pm View
your help is highly appreciated. your explanation solidified my understanding on some basic concepts of C++.
Southmountain 7-Sep-20 1:14am View
very good thoughts. I will double check this. thank you!
Southmountain 4-Sep-20 18:08pm View
Salute to OriginalGriff!
after adding "const" in front of TCHAR*, I recompiled this project. the error message count down to 10 from 17.

the first error message is below:
'void printError(TCHAR *)': cannot convert argument 1 from 'const wchar_t [12]' to 'TCHAR *'

the error is at Line 32 as below and TEXT is the pointed:
	// Get and display the system directory. 
	if (!GetSystemDirectory(infoBuf, INFO_BUFFER_SIZE))
Southmountain 4-Sep-20 17:44pm View
from error message window, it shows:
Line 11: TEXT("OS = %OS%"),
Southmountain 29-Aug-20 18:13pm View
so if I copy the two redistributable vcruntime140.dll and mfc140u.dll, then everything shall be good without this Microsoft.VCXX.CRT.manifest file explicitly?
Southmountain 29-Aug-20 17:45pm View
I copied overloaded operator here:
class CString
    // Members
    char *m_str;

    // Constructor/Destructor
        m_str = NULL;
    CString(char *szInputSource) 
        m_str = NULL;
        if (szInputSource)
    CString(const CString &szInputSource) 
        m_str = NULL;

// Methods
    void operator +=(CString &szAdditionalString)

    void operator +=(char *szAdditionalString)

    void operator +=(char sAdditionalChar)

    CString operator +(CString &szAdditionalString)
        CString szTemp = *this;
        return szTemp;

    CString operator +(char *szAdditionalString)
        CString szTemp = *this;
        return szTemp;

    CString operator +(char sAdditionalChar)
        CString szTemp = *this;
        return szTemp;

// binary + operator (global, with const parameters)
    friend CString operator+(const CString &sz1, const CString &sz2)
        CString s = sz1;
        s += (CString&)sz2;
        return s;

    friend CString operator+(CString &sz1, const char sz2)
        CString s = sz1;
        s += (char)sz2;
        return s;

    friend CString operator+(const char *sz1, CString &sz2)
        CString s = (char*)sz1;
        s += sz2;
        return s;
Southmountain 22-Aug-20 15:42pm View
yes, having a project is important. I get motivated for my personal projects..
Southmountain 19-Aug-20 12:41pm View
I work on C# WinForm application, do you have good links to share for these kinds of examples?
Southmountain 17-Aug-20 17:50pm View
thank you ALL for your time! now I feel assured that it is not my issue.
Southmountain 2-Aug-20 13:35pm View
thank you! it's what I expected. mixing wizard with handcrafting is not good...
Southmountain 2-Aug-20 13:33pm View
thank you for good thoughts!
Southmountain 2-Aug-20 13:31pm View
thank you so much for sharing your experience!
Southmountain 13-Jul-20 21:14pm View
thanks for your time. I did not list all error messages because I tried all kinds of ways to make it work and message varied...
Southmountain 13-Jul-20 21:10pm View
you are absolutely right. yours is the answer I am looking for.
thanks a million!
Southmountain 12-Jan-20 12:06pm View
Highly appreciated your really cleared my clouds...
Southmountain 11-Jan-20 20:43pm View
sorry to PIEBALDconsult: I accidentally changed your message. I thought I was replying your update.....
Southmountain 21-Oct-16 12:38pm View
could you let me know how to purchase these data feeds?
Southmountain 23-Sep-16 15:26pm View
Thanks for Philippe. Your comments are very useful for my project.
Southmountain 19-Jun-16 22:55pm View
Thank you very much for the link. it contains a lot of information.
Southmountain 19-Jun-16 22:55pm View
Thank you very much!
Southmountain 16-Nov-15 20:17pm View
yes. actually I am using this approach right now: I use TableControl. inside this table control, I currently use one SplitterPanelContainer,
but it is difficult to add more chart types.

yes, my total number of charts is known and shall be constant.

this is why I take a look at this custom layout engine to use panel to dynamically add more charts.
Southmountain 14-Nov-15 17:17pm View
I have a charting component. on windows form, I want to add dynamically several kinds of charts by using context menu. So users can select the chart item from context menu, so the that type chart is added dynamically into current form. so I need a kind dynamic layout feature, but TableLayoutPanel does not fit my needs. so I start to look for custom layout engine.
Southmountain 14-Nov-15 17:14pm View
conversion is successful because I did not see any error message, but when I load the project into Visual Studio 2015, and view the form in form designer, then error message displayed.
Southmountain 14-Nov-15 14:20pm View
yes. it is converted into new project, but this is when the issue happens.
Southmountain 13-Nov-15 19:24pm View
I do not have an example for .NET 4.5+. could you find another version of this example? thank you first.
Southmountain 10-Jul-15 19:33pm View
Thank you very much for your time and sharing.
Southmountain 8-Jul-15 21:42pm View
it is both. I want to understand the process from installation to starting my application by users on Windows Vista. For XP we do not have issue because user has administrative privilege.

I have a licensing logic that needs to write an item into registry.
Also I try to figure out why so many papers on codeproject on Vista UAC too:

such as this one:
Southmountain 7-Jul-15 21:41pm View
Thanks for sharing. It really helps me to clearly understand the details.
I use Advanced Installer.

Based on your explanation, installer needs to run to install my program into Program Files folder, so it needs Administrative Priviledge for this, but for my application, for first time use, it needs adminstrative previledge because my application will write some items into registry, from then it does not need adminstrative previledge because it writes data to local user settings.

So what is the requirement/setting for my application? only one time escalation is needed, does it still need to be UAC aware?
I have two questions her
Southmountain 6-Jul-15 20:28pm View
what do you mean for 'portable " product? do you mean that I can put all files in a zipped file, so that users just need to unzip them and put it into any folder?

Based on solution 1 description, it is a must that installation process needs administrative privilege?
Southmountain 6-Jul-15 20:22pm View
got it. thank you for your time.
Southmountain 6-Jul-15 18:05pm View
what will happen if my application is signed with my certificate?
Thanks for the reply!
Southmountain 24-Apr-15 11:23am View
I feel you only beat around the bush and did not answer the question.
Southmountain 22-Apr-15 21:41pm View
Thanks for the links. I browsed them and some of them I am very familiar, but it does not answer my question.

could you explain rationale behind that MSBuild project file standard offers you a declarative language used to formulate build rules, so that build order does not matter?

in my mind, MSBuild is kind of Make tool. if we use command line csc.exe to compile several C# files, the order matters too.
Southmountain 21-Feb-15 16:24pm View
somehow I can not get it right in first attempt and then take SA's solution.
Thank you both!
Southmountain 21-Feb-15 16:22pm View
this is a great solution. Thank you very much!
Southmountain 14-Feb-15 21:06pm View
string is fine, how about the variable name Exceeds100Message?
Southmountain 14-Feb-15 19:33pm View
Yes. it is the case.
Southmountain 14-Feb-15 16:46pm View
thank you very much! you resolved my issue.

now I see the statement in that link:
Namespace: System.Resources
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Southmountain 15-Oct-14 12:31pm View
Reason for my vote of 5 \n very good
Southmountain 24-Sep-13 12:23pm View
Reason for my vote of 5 \n I waited for this long time. thanks for sharing.
Southmountain 17-Sep-13 13:23pm View
Reason for my vote of 5 \n thanks for shaing.
Southmountain 12-Sep-13 18:04pm View
Reason for my vote of 4 \n thanks for sharing.
Southmountain 19-Aug-13 19:08pm View
Reason for my vote of 5 \n thank you! this will help me to write my own compiler.
Southmountain 28-May-12 12:22pm View
in my mind, I want to ask in production stage, how do I use this property to help user interface design stage? check if some useful suggestion or sharing from million users?
Southmountain 4-May-12 13:00pm View
Thank you! but this is a manual process. I want it to be automatically.
Southmountain 26-Dec-11 18:19pm View
Thanks for encouraging. I have not tried to post anything on Lounge yet, but will try later. after many years lurking around I feel the urge to write up something for codeproject hopefully this year.
Southmountain 24-Dec-11 14:09pm View
thank you all for codeproject memebers! I am touched by your passion to help and resolve my questions.
Southmountain 17-Dec-11 23:00pm View
this link is almost what I want to see. very good. thank you!
Southmountain 17-Dec-11 15:10pm View
for my 10 separate .cs files I do not have .csproj or .sln file because I manually edit in notepad, is it still possible to compile? do you have a quick tutorial?
Southmountain 17-Dec-11 12:26pm View
no. I do not have MSBUILD and it is now allowed to install.
Southmountain 17-Dec-11 10:45am View

Thank you. We do have version control system and bug tracking system.
they are in clouds. my final approach may be a desktop with windows 7 and set up a server running always.

in future if the time comes in, we can install windows server on it and extend its power.
Southmountain 16-Dec-11 17:47pm View
I have a network attached drive-4TB to store the data, the laptop is always on to run window services at the specified time.

the investment is very small $400. only backup software is installed.
it is only used to run jobs and nobody uses it. it will be on 24 hours each day, 7 days a week.

the workload is very small since we are a small start up. when time comes we may use blade server, but not this time.
Southmountain 16-Dec-11 10:36am View
could you give me some reasons?
what is your recommendation?
Southmountain 30-May-11 0:15am View
Thank you for your time to share this. It really helps.
Southmountain 30-May-11 0:10am View
Thank you, Vallarasu. It really helps to validate my understanding for custom control.