POLINK: error: Unresolved external symbol 'CheckDlgButton'

Started by ks65, April 12, 2008, 04:50:23 PM

Previous topic - Next topic

ks65

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.

Pelle

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...?
/Pelle

ks65

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?

Stefan Pendl

Quote from: ks65 on April 15, 2008, 11:41:21 PMIs an overview available which WinAPI-functions for desktop Windows are exported to WinCE?
Make Microsoft MSDN your friend, it is the source for WinAPI.
---
Stefan

Proud member of the UltraDefrag Development Team

ks65

Following Microsoft MSDN the functions IsDlgButtonChecked() and CheckDlgButton() are available under Windows Mobile. I checked this before my first post.