|
hi alok,
are u there.help me out for that.
nitin
|
|
|
|
|
Hello everyone,
I am meeting with a link error (compile is ok) when building an application with Microsoft embedded VC++ 4.0, using simulator. Here is the detailed message,
--------------------
Linking...
.\emulatorDbg\foo.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'ARM'
--------------------
What is the possible cause of this problem? Any suggestions to solve this problem?
thanks in advance,
George
|
|
|
|
|
: George_George wrote: I am meeting with a link error (compile is ok) when building an application with Microsoft embedded VC++ 4.0, using simulator. Here is the detailed message,
--------------------
Linking...
.\emulatorDbg\foo.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'ARM'
--------------------
What is the possible cause of this problem? Any suggestions to solve this problem?
Linker has a separate target processor option - MACHINE key, e. g.:
/MACHINE:IX86. Open Project->Settings, goto linker tab and make sure that
this key set the correct processor type in Linker options at the bottom of
the settings window.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Thank you man!
I am wondering what is the difference between module machine type and target machine type in this context?
regards,
George
|
|
|
|
|
|
vasusree wrote: i want that with respect to parent dialog.
please solve my problem,
Is ScreenToClient is of any help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ClientToScreen and ScreenToClient is the default API support provided windows.
I think you can convert the position using simple mathematical logic.
1. get parent screen pos
2. get client windows screen pos
4. take the difference.
5. get the current mouse point
6. add diff to the current points.
7. finally apply your logic
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
it will work until we will not move the parent once we move the parent to other location it will not work,
vasu.
|
|
|
|
|
vasusree wrote: [Message Deleted]
why you deleted you message
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Wheres your question?
whitesky
|
|
|
|
|
I'm coding an application, but I can't write code ti save a file with "OnFileSave". So, how can show me a sample code to do it!! Thanks guys
|
|
|
|
|
You can use CStdioFile to Read/Write
<br />
char *pFileName="c:\\abc.txt";<br />
CStdioFile myfile;<br />
if( !myfile.Open( pFileName, CFile::modeCreate<br />
| CFile::modeWrite | CFile::typeText ) ) {<br />
<br />
You can also use CFile for the same
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 0:04 Monday 19th June, 2006
|
|
|
|
|
secddos wrote: I'm coding an application, but I can't write code ti save a file with "OnFileSave". So, how can show me a sample code to do it!!
Do you want to show the file Save/Load dialog on "OnFileSave" ??
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
secddos wrote: "OnFileSave"
Is this DOcumentView Based application or your Custom application!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
and one simple example
<br />
CFile m_File("c:\\text2.txt",CFile::modeCreate|CFile::modeWrite);<br />
<br />
TCHAR buf[120];<br />
m_File.Write(buf, lstrlen(buf));<br />
m_File.Close();<br />
whitesky
|
|
|
|
|
my code is below the messagebox never goes off so i know its not working am i missing something?
do i need to call it somehow ?
BOOL CMp3Dlg::OnEraseBkgnd(CDC *pDC)
{
AfxMessageBox("kik");
CPen myPen[64] ;
int i ;
CRect rect ;
for (i = 0 ; i <= 60 ; i++)
myPen[i].CreatePen(PS_SOLID, 1, RGB ((i * 4),(i * 4),(i * 4)));
CPen *oldPen = pDC->SelectObject(&myPen[0]) ;
GetClientRect(&rect);
for(i = 0 ; i <= rect.bottom;)
{
pDC->MoveTo(0, i);
pDC->LineTo(rect.right, i);
i++;
pDC->SelectObject (&myPen[i * 64 / rect.bottom]);
}
pDC->SelectObject(oldPen) ;
return TRUE ;
}
-- modified at 23:00 Sunday 18th June, 2006
|
|
|
|
|
Add this line inside your message map in CMp3Dlg
BEGIN_MESSAGE_MAP(CMp3Dlg, CDialog)
ON_WM_ERASEBKGND() // <--- ...Add this line
END_MESSAGE_MAP()
|
|
|
|
|
thanks dude that works but all of my buttons and things make it look like sh** lol
|
|
|
|
|
locoone wrote: my code is below the messagebox never goes off so i know its not working am i missing something?
When you close the message box the Paint message fires and it tries to repaint the invalid area..and again you shows the message in same....due to which it goes into infinite loop
like paint--message--paint---message----.......
Just remove the message and see the result...
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
i took out the message and it lloked bad i have a slider that is created after the dialog has been openit doesnt look good and i have a static that doesnt look goodthe background of both are still the tan looking color
|
|
|
|
|
Forget all ...see the following code
HBRUSH CtestMFCDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor== CTLCOLOR_DLG )
{
hbr=CreateSolidBrush(RGB(0,m_This.GetPos(),0));
}
return hbr;
}
void CtestMFCDlg::OnNMReleasedcaptureSlider1(NMHDR *pNMHDR, LRESULT *pResult)
{
InvalidateRect(NULL);
*pResult = 0;
}
The OnCtlColor methods returns the new brush created with the help of color selected.
m_This is the control variable of the Slider who ranges(0,255);
OnNMReleasedcaptureSlider1 is the method of slider control NM_RELEASEDCAPTURE notification.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
In PPC emulator, I create buttom in CChildview and press down the button to call a function. Also I use the left key in navigation control set to call the fuction. But if I press down the button then I can't call the funtion when I press down the left key??
void CChildView::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
if(nChar == VK_LEFT)
{
test();
}
CWnd::OnKeyUp(nChar, nRepCnt, nFlags);
}
BOOL CChildView::OnCommand(WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
if(wParam == ID_BUTTON)
{
test();
}
return CWnd::OnCommand(wParam, lParam);
}
Any Suggestion is helpful!!
Thanks a lot!!
Hello!!
|
|
|
|
|
;P;PHi,
I'm dev in China. I want to output some string of Chinese in unicode format(UTF-8/UTF-16). So in VS2003, I write code like this to test:
int _tmain(int argc, _TCHAR* argv[])
{
_TCHAR* buffer = L"汉";
unsigned char* uP = (unsigned char*)buffer;
return 0;
}
I found that the pointer 'uP' have this value:
uP : 186 (BA)
uP+1: 0
uP+2: 186 (BA)
uP+3: 0
The unicode of '汉' is: 6C 49
The Chinese code page (GBK) in windows of '汉' is : BA BA
So, the internal code in program only extand BA to BA 00
I test the code in VS2005 again, however, the internal code became 6C 49, is correct.
I don't know why.
Remy Zhu
|
|
|
|
|
You shouldn't use characters outside of the ASCII range in source code, because (as you saw) the parser may interpret the bytes differently according to the code page and character set that the app uses. Use the \x notation for the string literal: L"\x6c49"
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
OK, I have an internet filtering application that I have inherited. The current application does the internet filtering via a direct interface with Internet Explorer thus it does not work with FireFox or other non IE browsers.
So, I have been researching for days. I have not come to a clear solution on how the existing content filtering applications may have implimented there filtering.
Does anyone have experience writting an application that will filter internet content regardless of the internet browser. I would like to display a very simple Access denied type page in the browser. Just filtering based on the URL to start with would be good.
I am very open to using any language and comfortable with C++. Just seems that there are a large number of applications that already do this and I would be supprised to find that they are all using something like a TDI Hook DLL, Winsock LSP, etc... Just seems there should be an exposed API.
I really do not want the user to have to set proxy settings, I am still researching a silent/in-visible proxy server and looking into a Filter Monikor but, any suggestions on doing this would be much appreciated.
I am getting a little frustrated that I have not been able to find good information for doing this, Like I mentioned there are a ton of applications already doing this so it seems that I am missing something simple.
Thanks
Eric
Daymark Software, LLC
eric@daymarksoftware.com
|
|
|
|