NO

Author Topic: POLINK: error: Unresolved external symbol 'CheckDlgButton'  (Read 4959 times)

ks65

  • Guest
POLINK: error: Unresolved external symbol 'CheckDlgButton'
« 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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2107
    • http://www.smorgasbordet.com
Re: POLINK: error: Unresolved external symbol 'CheckDlgButton'
« Reply #1 on: April 15, 2008, 06:06:04 pm »
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):

Code: [Select]
__inline UINT WINAPI IsDlgButtonChecked(HWND hDlg, int nIDButton) {
    return SendDlgItemMessage((hDlg), (nIDButton), BM_GETCHECK, (WPARAM)0, (LPARAM)0);
}
Code: [Select]
__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

  • Guest
Re: POLINK: error: Unresolved external symbol 'CheckDlgButton'
« Reply #2 on: April 15, 2008, 11:41:21 pm »
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?

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 575
    • Homepage
Re: POLINK: error: Unresolved external symbol 'CheckDlgButton'
« Reply #3 on: April 16, 2008, 12:45:50 pm »
Is 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

  • Guest
Re: POLINK: error: Unresolved external symbol 'CheckDlgButton'
« Reply #4 on: April 16, 2008, 05:15:09 pm »
Following Microsoft MSDN the functions IsDlgButtonChecked() and CheckDlgButton() are available under Windows Mobile. I checked this before my first post.