|
Hi,
My module is to send and receive a byte using a microcontroller 8051, driver program is to be written in C.
Pls help how to start?
mithila
|
|
|
|
|
Just,for example...
#define SendByte(c) TI=0;SBUF = c;while(TI==0);TI=0
|
|
|
|
|
try to look into bioscom.h and its subroutines .
Engineering is the effort !
|
|
|
|
|
How can I program - playing the sound (waw, mp3) on pocketPC (arm), using c++?
|
|
|
|
|
Hello everyone,
I'm wondering if you could help. I'm looking for a way to detect when a CF or SD card is inserted into my pocket pc.
Any ideas?
|
|
|
|
|
I want to hide the mouse cursor of my WIN CE application after a few seconds when it is not in motion.
I have created a thread and made it call the ShowCursor() for hiding and showing the cursor. But since it is called from a thread the mouse cursor is not hiding.
I have tried using both worker thread and UI thread.
When we use the funtion in normal flow of the program it works fine. Is there any othere way to achive this functionality. Plz help me.
Thanks and Regards,
Rajesh Prabhu. R
|
|
|
|
|
hello all,
i am an embedded systems student from india. i am planning to develope an OS for mobile devices?. if u have any suggestions plz give me. and what r the things that i need to keep in mind while developing the OS for Mobile Devices.
Thanking u.
ComputerNewton
|
|
|
|
|
need help! not sure where to start. I am looking for suggestions (books, articles, anything) on how to write codes for mobile video games. i already have a design of the game to include model. any help is appreciates.
dee
|
|
|
|
|
Good day,
Anybody know whats the equivalent API's in windows CE?
Windows XP Windows CE
OpenProcessToken ?
LookupPrivilegeValue ?
AdjustTokenPrivileges ?
ExitWindowsEx ?
Thanks & Have a nice day
|
|
|
|
|
Hi, I'm developing a Dialog-based project in which I hide the Command bar and SIP Button (the bar below the screen). I use "SHInitDialog" and "SHFullScreen" methods that works OK. The problem is:
If I open another application in the PPC (for example Word) which uses the SIP button and the SIP keyboard, then I close it and when my application reappears the command bar is here.
I use "SHInitDialog" and "SHFullScreen" in the "WM_ACTIVATE" message and "OninitDialog" routine, but when my app retakes the control the command bar is not hide!.
Anyone knows what's happen? How I can hide the commmand bar?
Any help will be appreciated.
Regards,
Javier
|
|
|
|
|
Do you use the WM_PAINt message?
|
|
|
|
|
First of all I'm using eMbedded Visual C++ 3.0, PPC2002 SDK, and I have a AppWizard SDI application without a Document. With me so far?
Okay, now here's my problem.
I'm hoping to produce a game for Pocket PC as a programming excersize. Probably Freecell.
My OnPaint function for CChildView does the following:
1. It makes the background green.
2. It creates a CBitmap from a resource and draws it.
3. It calls a member function which does the same thing as 2, except with a different bitmap (ShowCard)
4. It calls another member function which takes a parameter telling it which of two bitmaps to draw and draws the appropriate one. (ShowKing)
Now I have a OnClick handler in CMainFrame, which calls a member function in CChildView, which handles the OnClick event.
This handler determines which half of the screen you clicked, then tells ShowKing which bitmap to draw. But it doesn't actually do it:
void CChildView::ShowKing(int facing) {
CPaintDC dc(this); // device context for painting
CDC tempdc;
CBitmap card;
if ( facing == 1 ) card.LoadBitmap(IDB_KINGRIGHT);
else card.LoadBitmap(IDB_KINGLEFT);
card.CreateCompatibleBitmap(&tempdc,29,41);
tempdc.CreateCompatibleDC(&tempdc);
tempdc.SelectObject(&card);
dc.BitBlt(113,3,14,16, &tempdc,0,0,SRCCOPY);
}
Can anyone help me figure out what's wrong?
-nand
|
|
|
|
|
Try to release the device context at the end of the function:
ReleaseDC(&dc);
ReleaseDC(&tempdc);
Hope it works.
Regards,
Eli
|
|
|
|
|
It didn't work
Any other ideas? SendMessage(WM_PAINT) instead of calling my function doesn't seem to work either (OnPaint calls my function too).
-nand
|
|
|
|
|
> tempdc.CreateCompatibleDC(&tempdc);
shouldnt this be:
tempdc.CreateCompatibleDC(&dc);
Also, do you need to do this?
card.CreateCompatibleBitmap(&tempdc,29,41);
I would think that it destroys the bitmap you loaded into it earlier.
---
"Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot
|
|
|
|
|
> Also, do you need to do this?
> card.CreateCompatibleBitmap(&tempdc,29,41);
> I would think that it destroys the bitmap you loaded into it earlier.
Yes, what I'm trying to do here is overwrite whatever bitmap I drew previously with a new one from outside the OnPaint handler. This seems like the right thing to me.
Changing my call to tempdc.CreateCompatibleDC() doesn't appear to help - But it doesn't appear to break anything either.
-nand
|
|
|
|
|
Ok, let me rephrase myself
void CChildView::ShowKing(int facing) {
CPaintDC dc(this); // device context for painting
CDC tempdc;
CBitmap card;
if ( facing == 1 )
card.LoadBitmap(IDB_KINGRIGHT);
else
card.LoadBitmap(IDB_KINGLEFT);
card.CreateCompatibleBitmap(&tempdc,29,41);
// here you create a bitmap that is comaptible to an unintialized dc (ie a monocrome dc), and my guess is that you also overwrite whatever bitmapbits you loaded into the CBitmap object.
tempdc.CreateCompatibleDC(&tempdc);
// this should be done before you create a compatible bitmap.
tempdc.SelectObject(&card);
dc.BitBlt(113,3,14,16, &tempdc,0,0,SRCCOPY);
}
This should work better. If not, check your return value from LoadBitmap.
void CChildView::ShowKing(int facing)
{
CPaintDC dc(this); // device context for painting
CDC tempdc;
CBitmap card;
if ( facing == 1 )
card.LoadBitmap(IDB_KINGRIGHT);
else
card.LoadBitmap(IDB_KINGLEFT);
tempdc.CreateCompatibleDC(&dc);
tempdc.SelectObject(&card);
dc.BitBlt(113,3,14,16, &tempdc,0,0,SRCCOPY);
tempdc.RelaseDC()
dc.ReleaseDC()
}
Note: untested code, I dont have a dev.env. on this computer.
---
"Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot
|
|
|
|
|
It doesn't help.
I tried a few more things and found that if I hide and then activate the application, the bitmap is redrawn as expected. Also if I display a messagebox, move it paritally over the bitmap, and dismiss it, the covered part will be updated - but not the uncovered part. It sounds almost like it's refusing to update the window, even though I'm painting in it. Does this help?
-nand
|
|
|
|
|
Okay, I managed to figure out a workaround.
The solution was to create a Document-View application (even though I don't want any Document baggage), put all this stuff in the View, and then have a function in the Document that calls CDocument::UpdateAllViews(NULL).
See this MSDN article
Thanks for the help though!
|
|
|
|
|
Hi all
The context menu is hooked to a few controls (buttons etc). When I have pop-up event, I want to know which control calls this event? The SourceControl property doesn't work in CF. I need to act differently depending on control.
How can I do it?
|
|
|
|
|
Perhaps someone can help me... How do I get a drive mapping to work between a Windows 2000 professional machine and a WindowsCE.NET 4.2 machine? This is really bugging the hell out of me. I have build an OS image with, as far as I know, everything in it to support this but I cannot get it to work. I have added the appropiate registry keys in SMBServer and it just wont work. Pinging between the two machines works so there is communication between the machines but I cannot map a drive or folder no matter what I try. Am I missing something?
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi, guys!
I am using IR port on pocket pc to communicate with other device.
When I used emulator on desktop, it can work correctly.
But I use it on real pocket pc, what the routine gets from IR port is error code, such as 255 instead of ACII code. But via Hperterminal monitoring, the monitor display correct ACII code.
Why it happened? You know the sourcecode running on emulator and real Pocket PC is same. So do you think I should do some configurations on the IR port via code? If so, and how?
Thanks a lot
vigorous
|
|
|
|
|
if i use eVc++ 4.0 with sp4 - it means that i can develop for WinCe.net 4/4.1/4.2/5.0 or it is just for WinCe 4/4.1/4.2/5.0?
Thanx,
Eli
|
|
|
|
|
Okay, i'm having a big problem here, i use the CreateWindowEx() function to create a child window. It then uses a SetWindowPos() function to resize it, and then it creates a button on it. When the button is pressed on the child window, i want it to completely be destroyed, so it sends a message to its parent to destroy it. The thing is....i have to put 3 DestroyWindow() functions or else i will have to click the button three times. I don't know why. I don't know if i'm creating the child 3 times, or what i'm doing wrong....
my small snippets of the problematic code is here:
http://rafb.net/paste/results/8n1br319.html
my FULL program is here incase you need to see other code.
SecurityCamera.c (line 362):
http://rafb.net/paste/results/gcInkQ62.html
WelcomeWindow.h:
http://rafb.net/paste/results/jI5cLF32.html
|
|
|
|
|
Can i use 'Visual C++ Express 2005', or 'Visual C++ .Net 2003' to make windows mobile applications on a Pocket PC?
Thanks in Advnaced
|
|
|
|