Pelles C forum
C language => Pocket PC and Smartphone questions => Topic started by: ks65 on April 12, 2008, 04:50:23 PM
-
I have problems linking the functions CheckDlgButton() and IsDlgButtonChecked() in pocket PC applications.
For investigation I started a new project using the pocket PC application wizard. I added a check box in main.rc and CheckDlgButton() in main.c.
From the linker I get the message "POLINK: error: Unresolved external symbol 'CheckDlgButton'".
Adding the user32.lib to the linker objects gave no solution.
CheckRadioButton() can be linked without link error, but IsDlgButtonChecked() is necessary for this way too.
Vers.: Pelles C 4.50.113.
Please give some help.
-
In version 5.0 (beta), the following definitions are available for Windows CE (CheckDlgButton and IsDlgButtonChecked are not real exported functions like on desktop Windows):
__inline UINT WINAPI IsDlgButtonChecked(HWND hDlg, int nIDButton) {
return SendDlgItemMessage((hDlg), (nIDButton), BM_GETCHECK, (WPARAM)0, (LPARAM)0);
}
__inline BOOL WINAPI CheckDlgButton(HWND hDlg, int nIDButton, UINT uCheck) {
return SendDlgItemMessage((hDlg), (nIDButton), BM_SETCHECK, (WPARAM)uCheck, (LPARAM)0);
perhaps you can use this for now in 4.50...?
-
Thanks Pelle!
Your posted code solves my problem (in vers. 4.50..).
Is an overview available which WinAPI-functions for desktop Windows are exported to WinCE?
-
Is an overview available which WinAPI-functions for desktop Windows are exported to WinCE?
Make Microsoft MSDN (http://msdn2.microsoft.com/en-us/default.aspx) your friend, it is the source for WinAPI.
-
Following Microsoft MSDN the functions IsDlgButtonChecked() and CheckDlgButton() are available under Windows Mobile. I checked this before my first post.