Home » WPF

[VS2005/WINCE] What can i use instead of the Function 'EnumChildWindows' on WINCE(WM 6.0) ?

Hello, Ladies&Gentleman.

I want to get a control's handle on Dialog.

But, I only have one thing information. It's control's caption.

(Already, It's finish to get the Dialog's handle) 

I don't know control's ID and control's ClassName.

In my case, what can i do? :(

Would you like to help me out?


- HelloSehee


3 Answers Found


Answer 1

Check out the following link for sample code used alternative for EnumChildWindows()


You can  use either GetDlgItem() or GetDlgCtrlID() function  depend on your input you have.



Answer 2

Thank you for your kind.

unfortunately, I want to content(method) in a thread thought i wrote as a "What can i use instead of the Function 'EnumChildWindows' on WINCE(WM 6.0)?".

However, I notice your Advice in that link.


Answer 3

Hi HelloSehee,

We can use Findwindow API to get the handle  base on its caption, see the method signature:

HWND FindWindow(
  LPCTSTR lpClassName,
  LPCTSTR lpWindowName

The second parameter is caption, the return value is the handle of the control, for more information:


Guang-Ming Bian - MSFT



Hello, Ladies&gentleman.

I used to 'FindWindow' when i programming on WindowsOS.

But this case, i didn't use the Function 'FindWindow'. (Why? I found a this sentence : WinCE does not supported funtcion 'FindWindow'.)

How do I find and use a Window Handle on WINCE? (It means a Hooking)

I hope Somebody help me.


- HelloSehee



I am working on an x86 platform running WinCE 6 (R3).

I am having to run and debug a legacy native application developed using VS2005. I am doing all debugging using corecon method over ethernet (conmanclient/cmaccept).

In some of the posts I have read, it appears that when launching VS2005 debugger it starts edm.exe and there are some compatibility issues re edm.exe and WinCE 6.0.

a. What is the recommended way then to deploy and debug a native application developed using VS2005 on a WinCE 6 platform?

b. Most of the time, I see that I can debug fine. However, when running the application under VS2005 for a long time, I see the following messages being printed out: "Completely out of handles." I am currently trying to use application verifier tool and am still in the middle of finding out whether it is an issue with my application, or an issue in the VS2005 debugger, but thought of asking if somebody has any comments on this. 

Essentially, I dont want to be led in a direction as if there are some handle leaks in my application, whereas in reality it is not the application but actually the debugger!

c. Ideally, I could run the application standalone for extended periods to eliminate the debugger issue but there are some issues because of which I need to be able to run VS2005 debugger.




When I developing a FSD, can I use FSDMGR_GetVolumeHandle to get the pointer of my FSD? And then, I can call the functions in my FSD by this pointer after convert it to my own type.

When I implement the FSD_UnmountDisk(HDSK hdsk), I want to call the functions in my own FSD. So I want to get the pointer of my own FSD.



in an WinCE 5 project I have used some time funtions (asctime(), time(), ...) from the C standard library. The functions are defined in the time.h file. Now I try to port the project to WinCE 6, but I don't have success with it, because the "time" functions aren't declared in the new WinCE 6.0 SDK time.h header file.

Why are the time function declarations removed from the time.h file in WinCE 6?

How do I get the time functions working in WinCE 6.0?



Hello All,

I had some old code that ran perfectly in VS 6.0 and used the function GetProcessMemoryInfo located in psapi.h and paspi.lib. This was on a 32 bit machine.

I have a new computer which has the EM64T technology from intel. I have installed win XP 64 bit and VS 2005 Beta Version on this machine. I am trying to get my application to complie and run as a 64 bit application. The rest of the code complies and links just fine. However, the code is unable to link to the GetProcessMemoryInfo function in psapi.lib.

I know that there are 3 versions of psapi.lib currently in my system in the following folders
Program Files(x86)\visual studio\vc\platformsdk\libProgram Files(x86)\visual studio\vc\platformsdk\lib\AMD64Program Files(x86)\visual studio\vc\platformsdk\lib\IA64 Currently, my program links to the first one. (since my machine is neither an AMD nor an Itanium). I know that Program Files(x86) is meant for 32 bit applications.

Does anyone know why the program fails to link? This function is still defined in the psapi.h file. However, it is unable to link with it in the library. Does win XP 64 bit need a new library for this function on the EM64T computer? Does this function necessitate a new library in just the Program Files folder <instead of Program Files(x86)>




I have created a C#.Net application meant for WinCE 5.0 device using VS2005. But when I try to execute this executable on top of a device with WinCE 6.0 OS, it pops a warning message box with the following message:                                                                                                                                 'app' cannot be accessed. Make sure the file is not currently open. If the file is not open, try opening the file from within the appropriate program.

Please guide on how to successfully execute the application on the WinCE 6.0 target.




Using ShellExecute I used to start an application from my program and catching its window handle by FindWindow and then its child by EnumChildWindows. Now In EnumChildWindow callback Im matching each child window name with my given one, if matched process the next segment of codes. Now my problem is I need to hang up my program until that specified child window is found and then process next codes. I can easily do it by Sleep() but what is the other possibilities.

BOOL CALLBACK EnumChildProc (HWND hwChild, LPARAM lParam)
	if (GetWindowText(hwChild, getWndName, 200) != 0)		
		if(strcmp(getWndName, "Fav.Rm")==0)		
      // this code i have to process after Fav.Rm child is foundSendMessage(hwChild, WM_LBUTTONDOWN,(WPARAM)MK_LBUTTON, 0);
			SendMessage(hwChild, WM_LBUTTONUP, (WPARAM)MK_LBUTTON, 0);
			SetCursorPos( (pp.x)-30, (pp.y)-20 );
			mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
			mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
	return TRUE;


And normally this code does not executing as the preferred child is not being found at proper time. Cause the application that Im starting using ShellExecute takes some times to load its child.



I'm building an automation server in a dll using VS2005 & MFC. I am using the INPROC sample as a model.

I have added a Class  OK, but I don't see what is the correct way to add variables & functions to that class so that the dispatch macros get set up properly. I am expecting that VS2005 has a wizard to do this, but I can't find it.

Thanks for your help.





We migrated the VC++ Application from WinCe4.0 (ARMV4T) to WinCe 5.0(ARMV4I) in VS 2005. Everything is fine while builting the application except the RAS funtions. We are getting linker error for RAS API's while building the exe. We checked the coredll.lib where the ras function API's are not available. Where in the WinCe 4.0 (ARMV4T) processor we are able to run successfully. Is there any other lib files to be included?

The Linker error is:

RAS.obj : error LNK2019: unresolved external symbol RasDial referenced in function "public: static int __cdecl RAS::Connect_Click(class DfxWindow *,class EventArgs *)" (?Connect_Click@RAS@@SAHPAVDfxWindow@@PAVEventArgs@@@Z)

Please help us in this regard.

Thanks and Regards,


    I am going to create application in Windows CE 5.0. i used windows Pockate PC for Deployment. i have to use windows Media player control on my forms..
    I have tried to put Com Control in WINCE application but that are not displaying in the Toolbox.
    how can i do that...

Thanks in advance



Can you install and compile with the Standard SDK for WinCE 5.0 in the Studio 2010 setup?


I am building an install for a mobile device that uses an application not developed in house.  It is a application the reads "scripts" that is the actual program running on the mobile device.  There is an icon associated with the base exe so when I create the cab file and the installer program using NSIS the files get set up on the mobile device, but the default icon is displayed on the start screen.

I would like to change that default icon to one that represents our company product.  I have looked at the CEAppManager ini file syntax, but it is not very clear (and there is not much found in searches)

Here is a mock up of the ini file:



Version   = 1.0
Component  = CompanyTools

Description = Company Inv Tools
Uninstall  = Company Inv Tools
IconFile   = OurIcon.ico
IconIndex  = 0
DeviceFile  = BaseApp.exe

;Because there are multiple .cab files specific to a CPU type,
;these files are relative to the installation directory.
CabFiles = CompanyAddon.CAB
My understanding was that if I provide the ico file in the cab file, then the ini would somehow see it and make the switch from default to custom ico.  that did not happen.  Other then going into the actual exe of the base application and changing the icon (not a real option) I would like to know how I can customize what the user sees on the mobile screen regarding the shortcut icon. 




I have written a Table-Valued function in VB.NET which give the following error when trying to Create the Function in SQL.



	@bName nvarchar(100))

RETURNS TABLE (sid nvarchar(4000))			


EXTERNAL NAME MyAssembly.[MyAssembly.MyClass].GetData





Function signature of "FillRow" method (as designated by SqlFunctionAttribute.FillRowMethodName) does not match SQL declaration for table valued CLR function



Partial Public Class MyClass

  <Microsoft.SqlServer.Server.SqlFunction(DataAccess:=DataAccessKind.Read, _

    FillRowMethodName:="Data_FillRow", _

    TableDefinition:="sid nvarchar(4000)")> _

  Public Shared Function GetData(ByVal bName As SqlString) As IEnumerable
End Function
  Public Shared Sub Data_FillRow(ByVal Obj As Object, <Out()> ByVal sId As SqlString)
    Saleid = Obj.Saleid
End Sub


Not sure what I have done here. other forums point to simple code mistakes, comma here, <Out()> param there, but I cannot find what is wrong with this code!!!



is the wince 6.0 include networked media device wince feature pack , i need to start a project for graduate school


Debugging my C# Smart Device application from VS 2008 in a WinCE device
causes device disconnect when instantiating a class. Just the error "Device disconnected..."
was reported, despite the Windows Device Center continued to report that device remined connected.

 No other error or exception was reported. Obviously just the debug process stoped. This is the code:

 private MyDevice usbdev = null;
 public frmMain()


 ---->      device= new MyDevice(); // this causes the error


 This code works fine in a regular desktop C# application.  Also the code
  private MyDevice usbdev = new MyDevice();

 works fine in a desktop application, as expected.

If the line causing the error is commented out, the application works fine. So,

instantiating the class sauses the error.
Please advise me how to solve this problem.





all  I am trying to load the bitmap . i am describing what i did

1- add that bitmap in the OS design   and it shows in the window folder ( device emulator)

2- make a SDK and install it

3- develop a application and want to open a image  from a dialog through Cfile Dialog

4- i am using the loadimage function  and pass correct parameter that mention in the MSDn

but the problem it is not loaded so plz help me

and more question

1- is there size problem of the bitmap

2- and might be it not get proper adress because i am taking the image from the emulator the path is "\window\abc.bmp"

and  plz tell me realy LoadImage i sworking in WINCE



Hello all

plz tell me about the sdk for wince 6.0.

 i want to develop  an application  without deploying the wince image in the hardware .. i will use  the s3c6410 hardware. right now we dont have the hardware but we want to start the development so plz  suggest some solution


Hello Sir,

              Iam trying to write a usb stream driver .I dont know how to start.

and this are my questions

1)which hardware i have to  use?suggest me ahardware that is easily avialable like usb mouse ,keyboard

2)How to write a usb driver?

pls help............... thanks a lot



i would like to send SMS via huawei e160 using ebox 3300. Are the drivers available or is there any easier way of doing it?


when it resume from power off mode,usb can't be used,i don't know why

<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure