|
Delete the *.ncb file.
The VC 6.0 had this irritating bug...
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
last reply is a real reply, others are noising.
i am wandering why the guy is always making noising everywhere? feel lonely? show off with poor knowledge?
the guy replied on my poster with:
HAHAHHAHAHHAHAHHAHHAHAHHA.
u go to hospital now!
includeh10
|
|
|
|
|
I'm working a program on oracle db. Using ado, i access the oracle db. Tree,ORADC and MS FlexGrid control are used. When i double click the tree control,my FlexGrid should update and display the query dynamicly.When i double click the tree,my FlexGrid can NOT update at all.
I already get the filter from tree and Oradc.SetDataSource() then Oradc.Update(). Why my FlexGrid can not update?
Which step should be done?
Thanks.
sages
|
|
|
|
|
Hi all
I want to display MessageBox with "Disconnect" ,"Exit" and "Cancel"
buttons....how di I?can any one help me regarding this with code
example??
ThomasKennedyBose
|
|
|
|
|
yes... but you need to define your own message box (dialog box) which is pretty simple and staight forward...
In the resources view, right click on the Dialog icon and select Insert Dialog. The right click on IDD_DIALOG1 in Resoure View and select Proerties. Use this window as you normally would (change the IDD_DIALOG1 to something more useful to you). You can use the properties window to chant the Caption to one of your own. Now just double click on the dialog resource and add what ever controls you would like to use.
You will also need to add a class for the dialog. Use Insert|New Class from menu, if you are using MFC select MFC Class as Class Type, etc.... Give it a name like CYourNameDlg and select CDialog as the base class. YOu should also see that the ID is the name you chose. Thats about it, its ready to go.
---------------------------------------------
The greenest grass is NOT on the other side of the fence, its the grass you take care of. Have you watered your lawn lately?
- Just remember when you point a finger at someone else, you are only one finger away from making a fist to hit them with!
|
|
|
|
|
You can use the MessageBoxIndirect API.
For example look this article
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Hi,
Who can solve these...
1. How can I explicitly use a *.dll file without manually move it under my *.exe file's folder?
2. As my VC++6.0 installed on a Chinese version Win2k Server, font of codes in IDE is Fixedsys, I want to adopt font Verdana instead, but no such option show in the downlist of font(Tools->options->Format). tell me how to achieve this.
Thank u in advance.
Extreme programming. Do the No.1
|
|
|
|
|
Hi,
Three questions in all.
1. How can I explicitly use a *.dll file without manually move it under my *.exe file's folder?
2. As my VC++6.0 installed on a Chinese version OS, codes in IDE is Fixedsys, I want use Verdana instead, but no such option in the down list of font. tell me how to achieve this.
3. I try to load classes in a *.dll file, while what's wrong here.
--------------------Configuration: HydroExe - Win32 Debug--------------------
Linking...
HydroExeDlg.obj : error LNK2005: "unsigned int tid" (?tid@@3IA) already defined in HydroExe.obj
HydroExeDlg.obj : error LNK2005: "class CSerialComm SerialComm" (?SerialComm@@3VCSerialComm@@A) already defined in HydroExe.obj
HydroExeDlg.obj : error LNK2005: "class CDecoder Decoder" (?Decoder@@3VCDecoder@@A) already defined in HydroExe.obj
Debug/HydroExe.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
HydroExe.exe - 3 error(s), 1 warning(s)
------------------------------------------------------------------------------
Thank u in advance!
Extreme programming. Do the No.1
|
|
|
|
|
stevenson wrote:
1. How can I explicitly use a *.dll file without manually move it under my *.exe file's folder?
Well, if you put it somewhere in your PATH , Windows will find it. However, it is highly frowned upon to put things in system directories (Like C:\Windows\System or C:\Winnt\System32.)
stevenson wrote:
3. I try to load classes in a *.dll file, while what's wrong here.
Hmmm. Are you defining the class as an Export from your DLL? Is this MFC? If so, you can qualify your class (in the header) with:
class AFX_EXT_CLASS CSerialComm
If not, you can #define your own export macro (add MYPROJ_EXPORTS to your Preprocessor settings in your build settings):
#ifdef MYPROJ_EXPORTS
#define MY_EXPORT __declspec(dllexport)
#else
#define MY_EXPORT __declspec(dllimport)
#endif
"The greatest danger to humanity is humanity without an open mind." - Ian Mariano
http://www.ian-space.com/
|
|
|
|
|
i want to display Character(like u) in an edit box of hwnd h with the help of postmessage method.
can any body tell its correct parameters.
because i just know where to put my hwnd.
but i dont know what to put in place of these parameters.
1- UINT Msg, // message
2- WPARAM wParam, // first message parameter
3- LPARAM lParam // second message parameter
BOOL PostMessage(
HWND hWnd, // handle to destination window
UINT Msg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
r00d0034@yahoo.com
|
|
|
|
|
::SendMessage(hTestWnd, WM_CHAR, (WPARAM) 'u', (LPARAM) 0);
I don't see why PostMessage would be any different.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
when PostMessage returns, there is no guarantee the message is processed. With SendMessage, when the function returns, the message has been processed
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
I understand what postmessage does, but what I was saying is that while I've not done it with PostMessage, I see no reason why it should not work. Is there such a reason ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
i see all of ur replies are just making noising.
u sure u know SendMessage?
don't reply in this way, otherwise u go away.
includeh10
|
|
|
|
|
includeh10 wrote:
i see all of ur replies are just making noising.
I don't know what you mean. The SendMessage answer that I gave is from a program I wrote yesterday for the sole purpose of answering this question for someone else. It works, and it answers the question.
includeh10 wrote:
u sure u know SendMessage?
Yes, I went to school with him. What the hell is your problem ?
includeh10 wrote:
don't reply in this way, otherwise u go away.
I have no idea what is wrong with you, but I suggest you
a. learn the English language - u is not a word
b. pull your head in, and
c. get stuffed.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Christian is saying that PostMessage() should work as well as SendMessage() .
I think you need to stop sniping at him. I've seen your other posts in this forum, and you seem to spend a lot more time criticising the people who reply to the posts than you do replying yourself.
Software Zen: delete this;
|
|
|
|
|
I am really getting frustrated with this, so I finally decided to ask. If I leave the code highlighted red in, the application gets stuck in an infinite loop (I think), however if I take it out the application bombs. Does anyone have any suggestions/what might I be missing here? Thanks in advance.
int records::InsertNode(char m_last_name[], char m_first_name[], long m_ssan)
{
ListNode *NewNode, *NodePtr, *PreviousNode;
NewNode = new ListNode;
strcpy(NewNode->last_name, m_last_name);
strcpy(NewNode->first_name, m_first_name);
NewNode->ssan = m_ssan;
if (!Head)
{
Head = NewNode;
NewNode->Next = NULL;
}
else
{
NodePtr = Head;
<font color="red">PreviousNode = NodePtr;</font>
while (NodePtr != NULL && NodePtr->ssan < m_ssan)
{
PreviousNode = NodePtr;
NodePtr = NodePtr->Next;
}
PreviousNode->Next = NewNode;
NewNode->Next = NodePtr;
}
return 0;
}
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
The problem is that if the second entry needs to become the new head, PreviousNode is still pointing to the next node and not the head.
I would initialize PN to NULL and then after the loop check if PN == NULL. If so, then treat as an insert at the head. Otherwise, treat normally.
Head Insert:
PN->Next really is NodePtr->Next. When you set that to NewNode and NewNode references NodePtr, you get your loop.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks Tim, I understood the top part, and while trying to implement it I think I #!*@ it up. This is what I added, is that what you are talking about (this still pukes)?
NodePtr = Head;
PreviousNode = NULL;
while (NodePtr != NULL && NodePtr->ssan < m_ssan)
{
PreviousNode = NodePtr;
NodePtr = NodePtr->Next;
}
if(PreviousNode== NULL)
{
PreviousNode = NewNode;
NewNode->Next = NodePtr;
}
else
{
PreviousNode->Next = NewNode;
NewNode->Next = NodePtr;
}
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Unsure about Tim's answer yet.
but
if (!Head)
{
Head = NewNode;
NewNode->Next = NULL;
}
Why isn't PreviousNode given a default value here ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
Colin Davies wrote:
if (!Head){ Head = NewNode; NewNode->Next = NULL;}
Why isn't PreviousNode given a default value here ?
PreviousNode isn't used if the Head isn't set yet, NewNode becomes the Head and then returns. Or did I miss something?
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Hello!
Change your line in red to read:
<br />
PreviousNode = NULL;<br />
Then, below the while loop, add this code:
if(PreviousNode != NULL)
{
PreviousNode->Next = NewNode;
NewNode->Next = NodePtr;
}
else
{
NewNode->Next = NodePtr;
Head = NewNode;
}
I think this should fix your problem, because, right now, your application does not take into account the condition that the m_ssan being passed to the function is the lowest value in the list.
I didn't give this a try yet, but let me know if it works.
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
Thanks Alexander, I just tried that however it is still puking. I am not sure why as this looks like it makes sense.
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Try to trace what you are doing!
If the statement "while (NodePtr != NULL && NodePtr->ssan < m_ssan)" is false ( NodePtr->ssan >= m_ssan )than PreviousNode is not set.
if m_ssan is a new maximum you only break if NotePtr->Next gets somewhere Null.
|
|
|
|
|
Hi all. I'm trying to create a simple stack template class. Yes, I can hear your remarks about just using the STL, but I have my reasons. Anyway, I'm simply trying to allocate memory to grow the stack array, but keep getting the same runtime error:
Unhandled exception at 0x0046a470 in StackTest.exe: 0xC0000005: Access violation reading location 0x00000000.
The call stack currently looks like this:
StackTest.exe!strlen() Line 78 Asm
StackTest.exe!exception::exception(const exception & that={...}) + 0x31 C++
StackTest.exe!std::bad_alloc::bad_alloc(const std::bad_alloc & __that={...}) + 0x13 C++
StackTest.exe!std::_Nomemory() Line 8 + 0xd C++
StackTest.exe!operator new(unsigned int size=240) Line 15 C++
StackTest.exe!operator new[](unsigned int count=240) Line 7 + 0x9 C++
StackTest.exe!CStack<int,30>::resize(unsigned int nNewSize=60) Line 75 + 0xc C++
StackTest.exe!CStack<int,30>::push(int & tData=8) Line 26 C++
StackTest.exe!main() Line 33 C++
StackTest.exe!mainCRTStartup() Line 259 + 0x19 C
kernel32.dll!GetCurrentDirectoryW() + 0x44
I assume from this information that there isn't enough memory available to make the allocation, but this is only the second new call that I make from the start of the program. Also, I'm only trying to allocate 240 bytes of data. Here's the code for the resize() function:
template < typename T, int INCREMENT ><br />
void CStack< T, INCREMENT >::resize( size_t nNewSize )<br />
{<BLOCKQUOTE>
if ( nNewSize == m_nCapacity )<br />
return;<br />
else if ( nNewSize < INCREMENT )<br />
nNewSize = INCREMENT;<br />
<br />
T *pNewStack;
size_t nMinSize;
<br />
nMinSize = nNewSize < m_nCapacity ? nNewSize : m_nCapacity;<br />
<br />
pNewStack = new T[ nNewSize ];<br />
<br />
memmove( pNewStack, m_pStack, nMinSize*sizeof(T) );<br />
<br />
delete [] m_pStack;<br />
<br />
m_pStack = pNewStack;</BLOCKQUOTE>}
Class Variables:
m_nCapacity = 30
m_nSize = 30
INCREMENT = 30
I appreciate any insite that anyone can provide. Thanks!
-Michael Anderson- 完成の円
|
|
|
|
|