|
At a guess, it looks like the code is trying to load a string resource from the string table of the DLL, but the string is not present. Try opening the DLL as resources in VC and check to see whether a string entry with tht ID number exists.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
In addition to Roger's suggestion, look into the AFX_MANAGE_STATE() macro. By default, resource templates come from the main application. Since your resource is actually in the DLL, the module state needs to be changed to that of the DLL.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi Mr.Alexander !
I need to writing a Dial-Up Server project in Win98 by vc++.
I wrote a program by TAPI 2.0 that it's can do :
1) wait for call .
2) answer to call .
3) send and receive data .
But problem is here that I can not set over modems(client & server ) TCP/IP protocol (I can't set IP over modems that connecte together.)
If could help, please let me know.
A BIG thanks in advance.
|
|
|
|
|
Umm..
A modem usually connects to the serial port of your computer. It, by itself, does not use TCP/IP protocol, and doing that is impossible. After all, a serial port can only belong to a single computer.
So, you cannot use TCP/IP protocol over a modem connection unless you write respective software. This software would be responsible for checking if a modem connection is open (a serial connection), then it creates a virtual network interface and binds this interface to the serial connection. Now, each TCP/IP packet your computer sends is routed through the modem connection. You can consider it like a small LAN running over a phone line. The software is responsible for handling it.
I do not know if there are any software examples which are used to do dial-up networking connections. Windows already has a functioning support for this, so how about allowing it to do the job ? Just setup the computers to use dial-up networking and create a connection between the two computers. Then just use Windows Sockets to open a connection, assuming that the target computer is running a software that is listening to such connections from the "virtual network".
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I know how to use the mschart ActiveX control under VC++6 but I can't figure how to use it once it is put in a dialog box. The file MsChart.h created by Visual Studio .NET appear very different that the one that was generated when using VC++6.
I have searched this site and been googling for a while, but I could not find any code sample showing how to set the data, modify the axes ...
Did anybody manage to do it?
Could someone point me to a VC++.NET sample showing how to use the MsChart?
Thank you in advance.
|
|
|
|
|
HI,
I have a MFC DLL project.This created DLL sits in the third party exe.
One of the statement in the DLL code:
************************************************************************************
STRING str = STRING(GetModuleHandle("X.dll"), 0x409, STR_PROGRAMD);
where
// MessageId: STR_PROGRAMD
// MessageText:
// UMDC_PROGRAMD%0
#define STR_PROGRAMD ((DWORD)0x00001006L) in msgtable.h file
************************************************************************************
but the the variable str is returning "FormatMessage() failed for 100001006"
Pls help what could be the problem??
Thnks in advance
|
|
|
|
|
Hi guys,
I have a List control in which i have to do some manipulation based on the horzontal movement of Scroll bar..The issue is for that i need the handle of the ScrollBar.But when i use GetScrollBarCtrl() I always always get NULL.So any idea.
Note:Base on the horizontal movemeent of Scrollbar i have to hide/show some columns in Listctrl
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
GetScrollBarCtrl() is a CWnd overridable which allows replacement scrollbars to be used instead of the WS_HSCROLL and the WS_VSCROLL window styles which will be in use for the list control. If you need to read the values you should be able to use the scrollbar access function directly using the SB_HORZ and SB_VERT parameters depending on whether you need the horizontal or vertical scroll bar data.
e.g.
int hPos = m_ListCtrl.GetScrollPos(SB_HORZ);
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Hi CPians!
What is the right way for declaring a constant pointer on a constant unsigned char ?
const unsigned char table[]= ... ;
const unsigned char *ptable = table;
This is what I thought, but when I try to do something like :
typedef const struct
{
unsigned int ID;
unsigned char *IDAdr;
} IDstruct;
IDstruct table[] = { 21, table };
It brings me the error "line ## : not an adress constant" -> I understand that as my pointer not being declared as "constant", but only as a pointer on a constant... How should I do to get a constant pointer ?
Thanks a lot.
~RaGE();
|
|
|
|
|
You don't have the cdecl program on your system?
$ cdecl
Type `help' or `?' for help
cdecl> declare ptable as constant pointer to constant unsigned char
const unsigned char * const ptable
|
|
|
|
|
try this , this will make pointer of ur struct constant
typedef struct { unsigned int ID; unsigned char *IDAdr;} IDstruct,const LPIDstruct;
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Thanks for your answer, unfortunately I am not allowed to modify this declaration (extern code).
~RaGE();
|
|
|
|
|
To declare a constant (unchanging) pointer to a constant (unchanging) unsigned char, you would use a call like:
const unsigned char* const ptrChar = &someCharVariable;
Remember that constants must always be defined upon declaration. This means that you can do
const int iNumber = 10;
but trying a
const int iNumber;
iNumber = 10;
will fail.
In a nutshell, placing a const after the pointer type (char* const... )means that the pointer is constant, so you cannot change the address it points to after declaration. Placing a const after the pointer name (const char* ...) means that you cannot modify the memory at the address where the pointer currently points. Placing both means that you can't modify either the address pointed to, or the contents of that address.
Hope this helps.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi all,
I want to implement the bezier curve in my program. Can any one say about whether any direct functions available for drawing the bezier curve using GDI. I
Prakash
|
|
|
|
|
There are Api's, using which one can draw bezier curves like
PolyBezier and PolyBezierTo
try these APIs available in MFC as well as SDK both.
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Hi all,
I implemented different line styles (dash, dot, dash dot, dash dot dot) in my program. But all these styles are works fine, if the pen width is 1. If i select the pen width is more than 1, i couldn't get the line style. Is there any other option in GDI for selecting line style in different penwidth. Please give me some suggestions.
Prakash
|
|
|
|
|
For all line styles other than PS_SOLID, they only work correctly for lines of thickness 1. If you need line styles with a larger thickness, then you will have to do the line drawing part yourself. I am sure I saw an article on this somewhere but have been unable to find a reference.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
|
Check this out:
...
str.Format("[ProductID] = '%s' AND [Date] = #%s#", m_pSet->m_strProductID, COleDateTime::GetCurrentTime().Format(_T("%#m/%#d/%Y")));
lI = pShop->GetRecordCount();
if(pShop->FindLast(str) == 0)
{
pShop->AddNew();
pShop->m_lEntryID = lI;
pShop->m_dtDate = COleDateTime::GetCurrentTime();
pShop->m_strProductID = m_pSet->m_strProductID;
pShop->m_lQuantity = lQ;
pShop->Update();
}
else
{
pShop->Edit();
pShop->m_lQuantity += lQ;
pShop->Update();
}
...
Here's the problem. I try to find a record which has a given ProductID and which was created today. Although THERE ARE such records, nothing is ever found. MSDN says one has to use US date format (month-day-year) even if using non-engish version of MS Jet (I'm from Russia ), bun nothing is said about how the actual format string should look like. The database was created in MS Access 2K and uses short date format (something like 19.06.1994 - that's the sample in Access).
Error 207: Error 208
|
|
|
|
|
I myself have had difficulty with short date fields in MS Access.
Possible Solutions:
Verify (without reformatting) the COleDateTime value that is actually returned from your table. Mine have sometimes included time even though I have set it to be exclusively a date. Also becuase you are using a short date, you must use two digits to express the year so:
str.Format("[ProductID] = '%s' AND [Date] = #%s#", m_pSet->m_strProductID, COleDateTime::GetCurrentTime().Format(_T("%#m/%#d/%y")));
Good luck.
|
|
|
|
|
how to disabled (character in grey) a control in MFC? I use a modifystyle and modifystyleEX but it not works when i repaint the control. I search a example.
Thanks
Jérôme
|
|
|
|
|
Check CWnd::EnableWindow()
Regards,
Elias
|
|
|
|
|
Have you try 'EnableWindow'? Every CWnd object has this method, so if you have a button in a dialog attached to a CButton variable...
....................
CButton m_btMyButton;
....................
in the cpp
...
m_btMyButton.EnableWindow(FALSE);
...
|
|
|
|
|
Hello
Ima developing a VC++ applictaion .When i try to build a applicatin that is statically linked to MFC ,it throws me this error
error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in libcmt.lib(typinfo.obj)
Can somebody help me how to fix this error ?
Cause is my effort;
Effect is God's effort
|
|
|
|
|
You will probably have to change your link options in the project settings.
I can remember there is a /NODEFAULTLIB keyword that you can set in order to avoid linking with duplicate implementation.
Also, you might search for your error code in the help index which will tell you a lot...
|
|
|
|