|
Hi!
Where can I get the Microsoft Windows .NET DDK?
Thanks!
|
|
|
|
|
You can order it from Microsoft (for free but shipping is quite expensive). There is imho no more download possibility except you have a MSDN subscription.
|
|
|
|
|
I want to change mdi child frame window size, instead of default size. I know I could change it at PreCreateWindow(). but at that time it's not known what size it should be. the size depends on view. so I change the size at view::InitialUpdate(), but it won't work.
void CMdiView::OnInitialUpdate()
{
// TODO: Add your specialized code here and/or call the base class
CChildFrame* p = (CChildFrame*)GetParent();
p->OnSize( SIZE_RESTORED, 800, 800 );
CView::OnInitialUpdate();
}
Can anybody tell me why?
|
|
|
|
|
I subclassed ToolBarWindow32 in "x" application successfully
I also Added one button with resourse id as ID_NEW_BUTTON successfully to this toolbar at runtime.
Now problem is I want to trap one event if user clicks on my Button, I am failing to do so..
FYI
in "x" application ToolBarWindow32 is a child of Rebar control
here is my Hook Function which is not doing what I want..
LRESULT CALLBACK ToolBarProc(HWND hWnd, UINT dwMsg, WPARAM wParam, LPARAM lParam)
{
switch (dwMsg)
{
case WM_LBUTTONDOWN:
if ( (LONG) LOWORD(wParam) == ID_NEW_BUTTON )
MessageBox( NULL, _T("Our Button Clicked"), _T("OEEXpress"), MB_TOPMOST );
}
// Pass message on to the original window procedure*/
//return CallWindowProc( (WNDPROC)g_toolbaroriginalHandler, hWnd, dwMsg, wParam, lParam );
}
Any Idea whats going wrong..
and help is greatly appreciated..
|
|
|
|
|
This time I don't want to ask you guys for help, but I like to give you an advise. BELIEVE IN YOURSELF, THAT'S THE ONLY WAY TO ACHIEVE WHAT YOU WANT.
A few months ago I asked here a question about a problem I had during debugging my own written application. And there was somebody tried to insult me by saying that, what I was doing, it was too complex for me. Actually I didn't like his answer , I had the feeling he's a selfish person . So I continued my search for a solution of my problem and finally I found it.
Now my application (for client/server chat) is working well, I like to share my experience with you that you have to believe in your capability. Don't let other people destroy your dream.
And I also want to thank other programmers here who make time free to answer questions.
Greetz Nordin from Holland.
|
|
|
|
|
This is soapbox/lounge material
Secondly...
The response you got was probably due to you asking a vague question...
Like:
I'm using a CListCtrl and I can't add items...
When I read questions like that I answer with...
Your probably not experienced enough...go back to using VB. If your too lazy to narrow your problem to something more specific, then I assume it's laziness or inexperience in debugging...
You are right about believing in yourself...thats key to success...so instead of asking a question the minute something goes wrong, have faith in yourself and narrow your problem down until you either solve it or it's specific enough someone knows whats going on and it can be answered.
I'm sure many of us are guilty of jumping the gun and posting a question before we even try to solve it (myself included) but atthe same time you can't be mad when someone gets disappointed by your lack of interest in your own source code...and makes a comment like...your a beginner or whatever...
Just my 2 cents...
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
:-DGood answer!
Question: Why does this not work?
"char *ch; ch = 'a';"
Answer: Because you do not know what you are doing!
At least that is what I feel like saying.
Usualy I try to solve the problem myself. So that by the time I do ask a question there are very few peaple who can answer it.
Once in a while I'll ask a question while in the middle of researching for the answer, in hopes that I can short cut my research a little.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
I generally reply like that because I want to scare you. You are over your head when you ask some questions, and you have two choices. Giving an answer your your question is the wrong thing to do, because you need to learn to research this on your own (often for other useful information you will learn while finding the answer).
Your first choice when this happens is to push on through, believe in yourself, and just solve it no matter how hard it is. It will take time and effort, but you become a better person for it.
The other choice is to give up. This takes no effort, but it doesn't waste your time, nor does it waste our when when you hit the next road block (should we answer the question) that you can't solve. For most people this is the right thing to do, simply because they will give up eventially anyway.
You are one of the rare people who fall into the first catagory. Now take a step back, would you have learned as much about the problem if we gave you all the answers? Could you even have solved it? My guess is you learned a lot along the way, much of which is important, but not something you would have thought to ask.
|
|
|
|
|
Hi!
i got a dialog based app project which makes use of multiple dialog windows. in the main app source file (~MyApp.cpp) there is a line m_pMainWnd=&dMyDia; . when only one dialog is used, there is no problem but in my project, user is to do the work by some steps, meaning some dialog windows (like an installation process). so, when the first dialog closes and the other opens, OS says it's an illegal operation etc and my app crashes. when i remove the mentioned line, app seems ok for some "another dialog"s, but crashes on "another dialog" after a while. what should i do?
another question is, in HH_POPUP structure (for poping a little window, only help text in it), there is pszFont value that points a string to change the text font. MSDN says, string must in format facename[, point size[, charset[ BOLD ITALIC UNDERLINE]]] . so, the string must be something like "MS Sans Serif, 10, , BOLD" . it is ok but what to write for charset in that string if i want to change the charset? what words can be written in there? is there a list?
thanks a lot
|
|
|
|
|
StackA.h
#ifndef STACKA_H<br />
#define STACKA_H<br />
#include "StackException.h"<br />
#include <new><br />
const int MAX_STACK = 100;<br />
<br />
template < class StackItemType ><br />
<br />
class Stack<br />
{<br />
public:<br />
Stack();
<br />
bool isEmpty() const;<br />
void push(StackItemType newItem) throw(StackException);<br />
void pop() throw(StackException);<br />
void pop(StackItemType& stackTop) throw(StackException);<br />
void getTop(StackItemType& stackTop) const<br />
throw(StackException);<br />
<br />
private:<br />
StackItemType items[MAX_STACK];
int top;
};
<br />
#endif
StackA.cpp
#include "StackA.h"
#include "StackException.h"<br />
<br />
template < class StackItemType ><br />
Stack<StackItemType>::Stack(): top(-1)<br />
{<br />
}
<br />
template < class StackItemType ><br />
bool Stack<StackItemType>::isEmpty() const<br />
{<br />
return top < 0;<br />
}
<br />
template < class StackItemType ><br />
void Stack<StackItemType>::push(StackItemType newItem) throw(StackException)<br />
{<br />
if (top >= MAX_STACK-1)<br />
throw StackException("StackException: stack full on push");<br />
else<br />
{ ++top;<br />
items[top] = newItem;<br />
}
}
<br />
template < class StackItemType ><br />
void Stack<StackItemType>::pop() throw(StackException)<br />
{<br />
if (isEmpty())<br />
throw StackException("StackException: stack empty on pop");<br />
else<br />
--top;
}
<br />
template < class StackItemType ><br />
void Stack<StackItemType>::pop(StackItemType& stackTop) throw(StackException)<br />
{<br />
if (isEmpty())<br />
throw StackException("StackException: stack empty on pop");<br />
else<br />
{
stackTop = items[top];<br />
--top;
}
}
<br />
template < class StackItemType ><br />
void Stack<StackItemType>::getTop(StackItemType& stackTop) const throw(StackException)<br />
{<br />
if (isEmpty())<br />
throw StackException("StackException: stack empty on getTop");<br />
else<br />
stackTop = items[top];<br />
}
in main function of a driver class,
Stack< char > myStack;
The Visual Studio 2005 compiler gives me 6 errors that I cannot understand anything from them.
Here some of them;
Error 22 error LNK2019: unresolved external symbol "public: bool __thiscall Stack<char>::isEmpty(void)const " (?isEmpty@?$Stack@D@@QBE_NXZ) referenced in function "class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > __cdecl convertInfixToPostfix(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >)" (?convertInfixToPostfix@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@Z) InfixCalculator
Error 23 error LNK2019: unresolved external symbol "public: void __thiscall Stack<char>::pop(void)" (?pop@?$Stack@D@@QAEXXZ) referenced in function "class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > __cdecl convertInfixToPostfix(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >)" (?convertInfixToPostfix@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@Z) InfixCalculator
Error 27 fatal error LNK1120: 5 unresolved externals InfixCalculator
Any help would be appriciated,
Thanks in advance.
|
|
|
|
|
|
All those template functions (in StackA.cpp) used by the templated class must be in the header file not in a seperate CPP file. Otherwise the compiler only has the prototypes for functions it has not generated. Therefore, you will get "unresolved external...", because they do not exist.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
I've created a MFC Dll, however, when I use the SetTimer function in the Dll, the external application gets error assertions.
Here is my use of the MFC Dll:
DLLClass::void Test()
{
SetTimer(1000, 5000, NULL);
}
DllClass::OnTimer(.....)
{
.....do something when the timer message arrives
}
Here is my external application:
DllClass myclass;
ExtClass::SetMyTimer()
{
myclass.Test;
}
When I call the SetMyTimer function, I got error, how should I do if I want to use SetTimer Function in the MFC Dll?
thanks
|
|
|
|
|
SetTimer() is a method of the CWnd class. Your usage of the function invokes the globally scoped ::SetTimer() Windows API call which takes a window handle as the first argument. Passing a value of "1000" will likely cause abnormal behavior.
You should pass your DLLClass object a valid CWnd (or window handle) which can be passed to the SetTimer() call within Test() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hello,
Does anyone know how to check if the current focus is over certain control, i.e. IDC_EDIT1 or IDC_EDIT2?
Thanks in Advance!
|
|
|
|
|
|
Thank you
|
|
|
|
|
Hi,
I would like to convert a char into an int and vice versa.
For instance;
char a = '3';<br />
int a = 3;
Thanks in advance,
|
|
|
|
|
|
One way would be:
<br />
============================<br />
char chA = '3';<br />
int nA;<br />
char chValue[32];
chValue[0] = chA;<br />
chValue[1] = 0;
nA = atoi(chValue);<br />
============================<br />
char chA;<br />
int nA = 3;<br />
char chValue[32];<br />
itoa(nA, chValue, 10);<br />
chA = chValue[0];<br />
============================<br />
SkyWalker
|
|
|
|
|
Hi Mircea, I used both the array and * implementations and it worked, thank you very much...
Thanks to Dunn also.
|
|
|
|
|
I also would like to ask that is it possible to store for example number 14 in one character array element?
I mean;
if( myCharArray[2] == 14 )<br />
cout << "I want this" << endl;
Thanks,
|
|
|
|
|
if number is only one digit then its simple.
char c = '3';
// char => int
int i = c - '0';
// int => char
c = '0' + i;
|
|
|
|
|
Any source code?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Friends,
I've created an application in VC++ 6.0. There is a dialog in it on which i dropped various controls and associate class with that dialog.
Now, i am creating another project in VC++ 6.0. I want to use the same dialog template and its class in this project.
Please tell me how can i "import" dialog from one project to another. Obviously i can reuse class header and cpp, but how can i import dialog template ??
|
|
|
|