|
pyhtang1 wrote:
Cause when I add pure Win32 code within the MFC classes like CDialog, it force me to use the MFC function instead the pure Win32 one. For example, when I use the "GetRect(...)" function, it force me to use MFC "GetRect(...)" where the arguments are different from the Win32 one.
Call ::GetRect() instead, to make it unambiguous to intellisense.
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
What Ian said...
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
GetActiveWindow returns the active window - be it system or the current running program window.
HANDLE h = GetActiveWindow();
///show some other dialog
mydlg->DoModal;
delete mydlg;
SetForeGroundWindow(h);
So whenever there is a system window like error message or battery information, GetActiveWindow returns the handle of this window. The SetForeGroundwindow method then takes the user to the Start menu rather than the previous program window.
Any ideas how to remove this defect. What other method can i use instead of GEtActiveWindow? Can i get window information like is it a system window or my program window. Would GetWindow help in this case?
Thanks...
|
|
|
|
|
Hi
I'm writing my file successfulling to my pocket pc, with all the data,
but when i try and read the file with something simple
<br />
<br />
FILE *stream;<br />
BYTE list[25];<br />
if( (stream = fopen( "encrypt.txt", "r+t" )) != NULL )<br />
{<br />
<br />
int numread = fread( list, sizeof( char ), 25, stream );<br />
fclose( stream );<br />
}<br />
<br />
or even
<br />
CFile f;<br />
if( !f.Open( "encrypt.txt", CFile::modeRead ) ) <br />
{<br />
AfxMessageBox(_T("Unable to open the database"));<br />
EndDialog(0);<br />
return FALSE;<br />
}<br />
int nSize = f.GetLength();<br />
char * pBuf = new char[nSize];<br />
int nRead = f.Read(pBuf,nSize);<br />
<br />
I only get 1 character (the very first) read from the file.
What am i missing?
regards
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
|
|
i think you still can use character reading in Window CE as i have done in.
i think possible cause is it
1) is the file 25 character long?? file szie = 25characters
2)is it suppose to use fread(&list,sizeof(char),25,fp); as it is an array?? i am using structure and the & sign is in.
Can check it out, just giving my views. Hope it helps
|
|
|
|
|
Has anyone had any wied problems with qsort()? I'm using evc++3 and debugging on emulator(ppc2000) and the call to qsort() always causes an access violation? the same code works for the desktop.
Hush,hush...
thought I heard you call my name now.
Kula Shaker.
Amit Dey
Latest articles at CP - Writing Word addins
Office addin
|
|
|
|
|
Which method of using CCriticalSection should be preferred?
Using CSingleLock to lock the critical section object or using the Critical Sections's own method i.e Lock, unlock etc.
I am using follwing code. I don't know why CSingleLock object is provided for locking?
Static CCriticalSection m_Critical
Thread1(){
m_Critical.Lock();
//process
m_Critical.Unlock();
}
Thread2(){
m_Critical.Lock();
//process
m_Critical.Unlock();
}
Thanks in advance..
|
|
|
|
|
Hello ,
I have one Cab with the help of which I install few dlls. But after uninstalling that Cab , my dlls are also getting deleted. Is there any mechanism so that after uninstallation of Cab also, dlls will not get deleted.
Thanx in advance,
Shubhangi.
|
|
|
|
|
The article (such as it is) is up.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Thanks!
Regards,
Daniel.
--
FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE.
|
|
|
|
|
Hello,
Does anyone have any idea to register system DLL(ADOCE 3.1)
programmaticaly using eVC for PocketPC 2002??
Thanx in advance,
Shubhangi
|
|
|
|
|
|
João, that was a valiant effort, but your method was untenable in our situaion. I did, however, find an alternative. It could be made better, but I simply don't have the time to doink with it any longer.
I'll post an article on it sometime in the near future.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
John Simmons / outlaw programmer wrote:
I'll post an article on it sometime in the near future.
I'm looking forward to your article!
Regards,
João Paulo
|
|
|
|
|
It's a butt-ugly kludge (well, the whole program is at this point, but that's not the issue. ).
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
I would be also interested in your article .
Regards,
Daniel.
--
FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE.
|
|
|
|
|
Hi,
I need to build a quick and dirty front end for a prototype on a Pocket PC. I don't mind what I use, but I'd prefer C#/.NET, and I don't have any serious graphics experience. The key feature I need is to be able to rotate a graphic - could be a bitmap, or could be dynamically drawn. The functionality I want to reproduce is basically System.Drawing.Drawing2D.Matrix.Rotate() in the full framework, so I can rotate images.
So without having to dive into graphics drawing first principles, and hoping to avoid any explicit math in calculating a redraw, are there any examples or pointers to how to do this in the CF?
I guess I also need to ask about double-buffering and managing the form's background repaint to avoid flicker.
If you think I should stick with C++ for this then I'd be grateful for a pointer or two instead - not asking much
Thanks in advance
Rich
|
|
|
|
|
Take a look at James Image Rotation in .NET article.
I hope this will help you!
Regards,
Daniel.
--
FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE.
|
|
|
|
|
Thanks Daniel.
The Math looks helpful, but the CF doesn't support the point[] that James uses to define the screen coordinates of the (rotated) image vertices. The CF only allows me to specify the (X,Y,Width,Height) at which to draw a bitmap. I think I can use the math however to create a rotated bitmap in memory and draw that at (1,1).
Cheers,
Rich
|
|
|
|
|
Hello,
If i want to create a System Tray using evc and I complete in the WinMain
the SHNOTIFICATIONDATA structure and if I want to use for the field
pCurrentNotification->pszHTML = IDS_HTMLMESSAGE
where
#define IDS_HTMLMESSAGE TEXT
("
Settings
");
My question is how and where should I handle the names for and ?
Ramona
|
|
|
|
|
|
I'm trying to make a little demonstration of WML pages on Smartphones/Pockes PC's. Why is it so hard to get a little emulator for that ? I just installed eVC++ 4.0, sp2, Pocket PC sdk just for a little emulator ...
Now can someone please tell me how to start the emulator, cause there's a lot of documentation on using the emulator but nothing on where is located or how to start it ....
Excuse my stupidity but it's the first time I use these tools ...
|
|
|
|
|
I need help with this function
SetLocalTime
My code is
Structure SYSTEMTIME
Dim wYear As Long
Dim wMonth As Long
Dim wDayOfWeek As Long
Dim wDay As Long
Dim wHour As Long
Dim wMinute As Long
Dim wSecond As Long
Dim wMilliseconds As Long
End Structure
Declare Function SetLocalTime Lib "Coredll" (ByVal lpSystemTime As SYSTEMTIME) As Long
…
…
…
Dim systime As SYSTEMTIME
With systime
.wDayOfWeek = 7
.wDay = 11
.wHour = 11
.wMilliseconds = 11
.wMinute = 11
.wMonth = 11
.wSecond = 11
.wYear = 2003
End With
Try
Lret = SetLocalTime(systime)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Can somebody help me with this code?
It doesn´t work it only returns an error
|
|
|
|