|
Is this a console or a GUI application? If the former, check out getch() . If the latter, check out the WM_CHAR message.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thnaks man;
but I am beginner in Visual C++, I found more files like (".h" and ".cpp"), but in which one can I wrote my code.
in ".h" file, when I duble click in any item in the form it is open the code in ".h" file.
can u give me small notes about this.
alot thanks.
|
|
|
|
|
allooba wrote: I found more files...
What type of project did you opt for? With a console application, it'll likely contain one of each, making editing them about as easy as it gets.
allooba wrote: in which one can I wrote my code.
Both, since everything is technically code. Files with a .h extension typically contain declarations, while files with a .cpp extension typically contain definitions.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks again David;
I wrote all my code in ".h" file, that because when I duble click in any object in form desigin it is open in ".h" file.
but I face message error when I try to handel keypress function in text area object. how can I hendel the input? it gives me error message " the keypress function not member in system::windows::forms::control::keypress"?
can you help me in this issue?
my project is small program to simulate braile letters. that means 6 dots in one char.
thanks David.
|
|
|
|
|
Hi All,
I have created the project of MFC Activex Control and also I have included other project as a DLL in the same solution.And my Activex project is depends on the DLL project.
Here First of all I want to ask you that is it possible for the Activex project to depend on DLL project? Is there any other setting I have to make?
And now when I compile the project it gives me the error like......
Project : error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry.
In my DLL project I have made some registry operations.How can I get appropriate permissions to modify registry?
Thanks In Advance.
Ashish Bhatt
|
|
|
|
|
ashishbhatt wrote: How can I get appropriate permissions to modify registry?
Log in with a local administrative account and try again would be the simplest approach. By default, not involving discussion of any type of UAC, only certain accounts have modify or write rights to HKLM and HKCR and it sounds like your not logged in with one of them or your IT staff has made modifications to the standard registry rights settings.
If you on a Windows Vista box with UAC turned on, you will potentially get some false positives if your not familiar with what is going on under the hood.
|
|
|
|
|
Thanks For Reply,,
As you told to login in local Administrative,But I am already working in administrator Account.
And my other confusion is that is it possible that IO can add other DLL in the solution in which Activex project is the main project.But here my Activex project depends on DLL project.
Thanks.
Ashish Bhatt
|
|
|
|
|
I'm not really sure what it might be then. I googled and the first hit I got looks interesting/promising...
(Specifically, the "community content" section had some detailed talk about possible things to look for)
Ideas[^]
|
|
|
|
|
hi every one
i want one simple sample of CListCtrl print and print perewie in CFormView Project.
please help me
|
|
|
|
|
For print preview see here[^] and here[^] for first section of your question can you more explain ?
|
|
|
|
|
Is not going to be easy. You have the structure of the ListCtrl in your FormView, but in the preview... you will most probably need to do the work by hand.
About the example, some days ago there was a question about CListCtrl, I already answered with the initialization of the Report mode with variable width for columns.
See here[^]
By the way... take a look in the articles too. There are very good examples here[^]
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
hello all,
what is the base class of CBannerStatic class.
|
|
|
|
|
if you're talking about this[^] article, then 2 things :
1) when you have questions related to an article, ask it on the forum directly at the bottom of the article, so that the autor will be answering you directly.
2) BTW, looking at the code (yes, even you you can open the zip files), this class inherits from... CMultiColorStatic .
I don't know much of the later, but it inherits itself from CStatic; but as i said previously, you'd better ask the article's author.
|
|
|
|
|
Hello everyone,
Any practical experiences of VirtualAlloc v.s. malloc? From MSDN, I can not find any comparisons between the two methods.
thanks in advance,
George
|
|
|
|
|
VirtualAlloc is more efficient.
malloc is a C library function interface, it is implemented by calling the OS API. More in "programming applications for ms windows" by Jeffrey Richter
|
|
|
|
|
Thanks followait,
Could you let me know more details why VirtualAlloc is more efficient please?
regards,
George
|
|
|
|
|
VirtualAlloc()[^]
BTW, you already got a reply here[^] (on one of the 4 or 5 forums your posted this question )
|
|
|
|
|
Thanks toxcct,
What is the differences between HeapAlloc and VirtualAlloc? They allocate memory from different spaces?
regards,
George
|
|
|
|
|
man i'm starting to be seriously tired of your laziness.
not only you don't start to search the web before asking a forum, but you gettin me on my nerves because every thing you don't understand when someone answer you (because of your lack of knowledge), you rate it badly
I tell you, i give you this question a '1', because you HAD TO google for "HeapAlloc vs VirtualAlloc " first.
we're not here to do everything for you. you have to make the first step, and only when you're stuck on something, then you tell all the stuff you tried. not before
BTW, you never answered me how old you were since last time
|
|
|
|
|
followait wrote: VirtualAlloc is more efficient.
No, it's not (in general)! VirtualAlloc can only allocate memory in 4k chunks; if you use VirtualAlloc as a malloc replacement allocating one byte would result in wasting 4095! Part of what the code behind malloc does is carve up the memory blocks returned via VirtualAlloc to avoid this wastage. malloc also has a number of other optimisation such as a small block heap.
Steve
|
|
|
|
|
Hello Everybody.
I implemented worker thread in VC++.net2003 (MFC) as follows.
Prototype of AfxBeginThread Function
<br />
CWinThread* AfxBeginThread( AFX_THREADPROC pfnThreadProc,<br />
LPVOID pParam, int nPriority = THREAD_PRIORITY_NORMAL,<br />
UINT nStackSize = 0, DWORD dwCreateFlags = 0,<br />
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );
Body of Function
UINT MyThreadProc(LPVOID pParam)<br />
{<br />
if(pParam == NULL)<br />
AfxEndThread(MY_NULL_POINTER_ERROR);<br />
char *pStr = (char *) pParam;<br />
while(*pStr)<br />
*pStr++ ^= 0xA5;<br />
<br />
return 0;<br />
}
I used the Above Given code it works Fine. But what if I want to use any control of my dialog in the function.
It simply refuse to work as the following function is not member of the dialog class, hence it can not exploit any control of the dialog.
If I write this function as a member of my dialog class as follows.
UINT Myclass :: MyThreadProc(LPVOID pParam)
then the error occurs,
None of the 2 overloads can convert parameter1 to UINT(LPVOID).
Plz help me to write a function with the help of which i can use control(edit control/static control) of my dialog.
I simply want to display a counter's value in the edit control on the dialog.
and counter is being incremented in a loop in the function, that is to be used with AfxBeginThread.
|
|
|
|
|
Hello everyone,
I am thinking about the benefits of a private or protected constructor. The only benefits I could think of is we could use singleton design pattern and make a public function (e.g. CreateInstance) as a single point to create instances and hide the constructor to outside.
Any more comments?
thanks in advance,
George
|
|
|
|
|
private are just for the class it uses it, protected can be used by derived classes as well.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Thanks Nelek,
regards,
George
|
|
|
|
|
Hi all,i have opened my mainframe in the maximised view as default.but i cant open my forms maximised as default.anybody plz help me in opening my forms maximised as default.now i'm maximising it using the maximise button in that form.
Thanks in advance.
Saravana..
|
|
|
|