|
actually which function do you want to use?
"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
|
|
|
|
|
hi alok'
whatever function is using. want to pass the string.i am trying from last 5 days but the problem is that code is build properly but i make projectname helloworld and under that i want to pass string but it give "this application has been unloaded to save memory.you must download a new version".and i download new version but the same thing.
Actually i make project helloworld and i want to pass any string in that through emulator.suppose my project is helloworld.so through emulator i want to pass any string under that name.so how can i go and that the process behind that.please help me out.
Thanks........
Nitin dalal
nitin
|
|
|
|
|
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
|
|
|
|