|
Are we supposed to guess what the linker error is?
LNK2019 is a self-explanatory error message.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Could you please:
1) Format the code properly and use the code block tags
2) Describe what the problem is
3) Give the exact error message
|
|
|
|
|
It looks like you missed to link with a library [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I think the library path set in the IDE is not correct.
Величие не Бога может быть недооценена.
|
|
|
|
|
|
|
|
I've got quite a few ActiveX Controls that have been ported to VS2008 from VS 6 and have been tasked with implementing multi-lingual support, specifically Shift-Jis. In the past we had a separate build machine, project and resource files on a Japanese version of Server 2000 and VS 6.0 that we used to build our Shift-Jis versions. While I could go and set this up I was thinking that there has to be an easier way to accomplish this. Does anyone have any pointers or links to lead me in the right direction. It's been a rather fruitless search so far but I have the nagging feeling that I'm not looking for the right things or with the right terms.
|
|
|
|
|
I am using VC++ 6.0 Enterprise edition & using Access database. I would need to extract the few data from the database & show this data in preview and then print the data in some format. The print page could be more than 1 page.
Could you provide some literature on above or some sample code for the same?
|
|
|
|
|
You know the Code Project is your development resource...[^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
diptipanchal wrote: I would need to extract the few data from the database...
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Dear All,
I am using CEdit to display a text in an array like below :
wchar_t szData[5];
szData[0] = 'a';
szData[1] = 'b';
szData[2] = 'c';
szData[3] = '\r';
szData[4] = '\0';
m_EDIT.ReplaceSel(szData);
But, when I display the contents, the CR is displaying as boxes, even I tried with '\n' and the result is the same. Since, it is displaying as a box, further text is not displayed on the next line and it is printed in the same line with boxes after every "abc". Please help to solve the issue.
modified on Tuesday, August 25, 2009 5:15 AM
|
|
|
|
|
First, there's an error in your code: you are not increasing the index. Is it only a typpo ?
Second, you need to have both the carriage return and newline characters (I don't remember in which order, you'll need to test it).
|
|
|
|
|
I am really sorry Cedric Moonen. It is a typing mistake in my previous message (now corrected it).
Cedric Moonen wrote: Second, you need to have both the carriage return and newline characters
I agree with your comment, when I use \r\n then it is displaying in the nextline but my real problem is that my input text will come like the following :
"abc\rxyz\rpqr\r"
|
|
|
|
|
Then you will need to convert it so that all the \r sequences are replaced by \r\n sequences. std::string and CString have functions to do that.
|
|
|
|
|
Dear Cedric,
Thank you so much now I solved the proble but only one thing is pending. For instance, if the text has more no. of \r in it then how could I replace all the \r. Please give me your advice.
I have done already for one occurance of \r and the code is below.
char *str = "abc\rxyz";
stdstr = str;
int idx = stdstr.find('\r');
stdstr.insert((idx+1),1,'\n');
const char* rcData = stdstr.c_str();
int lenA = lstrlenA(rcData);
int lenW;
wchar_t *unircData;
lenW = ::MultiByteToWideChar(CP_ACP,0,rcData,lenA,0,0);
unircData = SysAllocStringLen(0,lenW);
if(lenW >0)
{
::MultiByteToWideChar(CP_ACP,0,rcData,lenA,unircData,lenW);
}
unircData[lenW] = 0;
m_EDIT.ReplaceSel(unircData);
|
|
|
|
|
bhanu_8509 wrote: wchar_t szData[5];
szData[0] = 'a';
szData[1] = 'b';
szData[2] = 'c';
szData[3] = '\r';
szData[4] = '\0';
I don't see the purpose behind populating each and every element in a string separately. May be you haven't known of functions like strcpy ? This would work for both Unicode and MBCS builds:
TCHAR szData[4];
_tcscpy(szData, _T("abc"));
m_EDIT.SetWindowText(szData);
For entering a new line, use \r\n and make sure that in the properties of the edit box, "multiline" is set to true.
It is a crappy thing, but it's life -^ Carlo Pallini
modified on Tuesday, August 25, 2009 6:44 AM
|
|
|
|
|
You're were out-of-bounds again!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
OK OK...
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
OK OK...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I have tab control and two cards (dialogs) in tab control. I put my bitmap picture (from resources) in picture control on main dialog window (parent dialog) and I wanna that picture stays underneath tab control dialogs, so when I called next handler (on change tab cards) I wanna that that picture be on same place for both dialogs(child) in tab control. When I activate particular tab the next handler is called :
void Board_TabCtrl::ActivateTabDialogs()
{
int nSel = GetCurSel();
if(m_Dialog[nSel]->m_hWnd)
m_Dialog[nSel]->ShowWindow(SW_HIDE);
CRect l_rectClient;
CRect l_rectWnd;
GetClientRect(l_rectClient);
AdjustRect(FALSE,l_rectClient);
GetWindowRect(l_rectWnd);
GetParent()->ScreenToClient(l_rectWnd);
l_rectClient.OffsetRect(l_rectWnd.left,l_rectWnd.top);
for(int nCount=0; nCount < m_nPageCount; nCount++)
{
m_Dialog[nCount]->SetWindowPos(&wndTop, l_rectClient.left,l_rectClient.top,l_rectClient.Width(),l_rectClient.Height(),SWP_HIDEWINDOW);
}
m_Dialog[nSel]->SetWindowPos(&wndTop,l_rectClient.left,l_rectClient.top,l_rectClient.Width(),l_rectClient.Height(),SWP_SHOWWINDOW);
m_Dialog[nSel]->ShowWindow(SW_SHOW);
}
But when I change tab card that picture flick because I call ShowWindow(SW_SHOW) i.e ShowWindow(SW_HIDE);
. How can I prevent that picture flick. Is there way to not update part of dialog window or some trick with differernt properties (transparent ....)
PS: What I want is like there is a hole on that picture place on child dialog windows, so that there no be flickering due to calls of ShowWindow(SW_SHOW) i.e. ShowWindow(SW_HIDE) for child dialogs in tab control;
Best regards
|
|
|
|
|
First, try showing your new dialog first and then removing the old one, maybe it also does not hurt if you ensure that the new dialog is always on top of the other one in the Z-order. Another thing you can try is simply disabling repainting of the whole window using SetRedraw(FALSE)[^], performing the switch of the dialogs, re-enabling repainting with SetRedraw(TRUE) and then making your new page and maybe the tab control itself redrawn with RedrawWindow[^]. You might have to experiment a bit with it...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi all
I do appologize in advance for my question, because I couldn't find a related forum with my question!!
I'm writting a program in DDK for secure booting of windows XP.
I use NT-Native functions in kernel mode, but unfortunately there is not any reference or example of using these functions!
I want to load some kernel mode dlls there(such as "hal.dll" in system32 folder) and use of "LDRLoadDLL" function whereas there is no good example of it's usage!
I don't know how should I pass those dlls path address in the first input argument of this function? when I set NULL in it, I get error to load some kernel mode dll (Error such as "File not found" where it succeeds in loading only "ntdll.dll"!) and also I don't know how should be the dll's "path" format in first argument of function?
I've seen ntdll.dll's source code for this function, but the correct format of path is some complex for me!!
Here is the ntdll's source including "LDRLoadDll" function:
http://source.winehq.org/source/dlls/ntdll/loader.c#L2007
I extremely hope you could help me!!!!
Thanks in Advance.
|
|
|
|
|
bahareh655 wrote: Here is the ntdll's source including "LDRLoadDll" function:
http://source.winehq.org/source/dlls/ntdll/loader.c#L2007
Well....that's Wine's source, which is not necessarily going to be the same as the Microsoft original....
Looking at a quick Google search for LdrLoadDLL[^] brings up this page[^], which documents A path format. There's also this page[^], which indicates that the Wine source is definitely very different to the Microsoft source.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello and Thanks of your reply!
I saw "http://www.matcode.com/undocwin.h.txt" address, but it only declares the "LdrLoadDll" as below and doesn't use of it with providing a valid path for a dll!
DWORD __stdcall LdrLoadDll( PWSTR *szcwPath, // Optional
PDWORD pdwLdrErr, // Optional
PUNICODE_STRING pUniModuleName,
PHINSTANCE pResultInstance
);
|
|
|
|