JackosKing
Messages postés168Date d'inscriptionmardi 31 décembre 2002StatutMembreDernière intervention21 avril 2005
-
17 juil. 2003 à 10:08
jno7
Messages postés1Date d'inscriptionvendredi 10 juin 2005StatutMembreDernière intervention10 juin 2005
-
10 juin 2005 à 16:07
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
jno7
Messages postés1Date d'inscriptionvendredi 10 juin 2005StatutMembreDernière intervention10 juin 2005 10 juin 2005 à 16:07
Excellent, je cherchais depuis un moment comment créer des listes sans passer par les mfc.
Il faut juste ne pas oublier de linker avec comctl32.lib et le tour est joué.
victorcoasne
Messages postés1101Date d'inscriptionjeudi 24 avril 2003StatutMembreDernière intervention23 juillet 20237 18 avril 2005 à 16:13
Pas mal !
ça peut être utile !
8/10 !
cs_JCDjcd
Messages postés1138Date d'inscriptionmardi 10 juin 2003StatutMembreDernière intervention25 janvier 20094 18 juil. 2003 à 21:18
Moi je comile avec Visual C++
JackosKing
Messages postés168Date d'inscriptionmardi 31 décembre 2002StatutMembreDernière intervention21 avril 2005 17 juil. 2003 à 18:28
istView.obj : error LNK2001: unresolved external symbol __imp__ImageList_ReplaceIcon@12
ListView.obj : error LNK2001: unresolved external symbol __imp__ImageList_Create@20
main.obj : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
JackosKing
Messages postés168Date d'inscriptionmardi 31 décembre 2002StatutMembreDernière intervention21 avril 2005 17 juil. 2003 à 18:27
enfin j'ai une erreur de link, mais bon je sais pas pkoi :(
JackosKing
Messages postés168Date d'inscriptionmardi 31 décembre 2002StatutMembreDernière intervention21 avril 2005 17 juil. 2003 à 18:13
au fait ton prog ne compile pas.. ya des erreurs :(
d:documents and settingsjackoskingureaucppfrance_source_2217main.c(100) : warning C4133: '=' : incompatible types - from 'struct HINSTANCE__ *' to 'struct HWND__ *'
etc...
JackosKing
Messages postés168Date d'inscriptionmardi 31 décembre 2002StatutMembreDernière intervention21 avril 2005 17 juil. 2003 à 13:23
heu est il possible de sauvegarder l'état d'un list view, ie. la position de la scroll barre ainsi que la selection? la selection je pense que oui, mais la position de la scrolbar...
JackosKing
Messages postés168Date d'inscriptionmardi 31 décembre 2002StatutMembreDernière intervention21 avril 2005 17 juil. 2003 à 10:42
ok thx :) et pour les icone sur a 2565 c'est oui je supose:p
i'm happy
cs_JCDjcd
Messages postés1138Date d'inscriptionmardi 10 juin 2003StatutMembreDernière intervention25 janvier 20094 17 juil. 2003 à 10:20
Oui oui !
// CreateListView - creates a list view control.
// Returns the handle of the new control if successful or NULL
// otherwise.
// hwndParent - handle of the control's parent window
// pfData - file containing list view items
HWND WINAPI CreateListView(HWND hwndParent, FILE *pfData)
{
HWND hwndLV;
// Force the common controls DLL to be loaded.
InitCommonControls();
// Create the list view window.
hwndLV = CreateWindow(WC_LISTVIEW, "",
WS_CHILD | LVS_REPORT | LVS_EDITLABELS,
0, 0, CW_USEDEFAULT, CW_USEDEFAULT,
hwndParent, NULL, g_hinst, NULL);
if (hwndLV == NULL)
return NULL;
return hwndLV; // return the control's handle
}
JackosKing
Messages postés168Date d'inscriptionmardi 31 décembre 2002StatutMembreDernière intervention21 avril 2005 17 juil. 2003 à 10:13
au fait tu n'aurais pas un exemple ou l'on cree soit meme dynamiquement la listview au lieu d'utiliser une resource?
JackosKing
Messages postés168Date d'inscriptionmardi 31 décembre 2002StatutMembreDernière intervention21 avril 2005 17 juil. 2003 à 10:08
thx c'est ce que je cherchais :p
question bete, mais je peux pas tester jlà, est ce que ca gere les icon sup à 256 couleurs, car avec mfc pas moyen j'y suis pas arrivé :( ptetre qu'avec les api..
10 juin 2005 à 16:07
Il faut juste ne pas oublier de linker avec comctl32.lib et le tour est joué.
18 avril 2005 à 16:13
ça peut être utile !
8/10 !
18 juil. 2003 à 21:18
17 juil. 2003 à 18:28
ListView.obj : error LNK2001: unresolved external symbol __imp__ImageList_Create@20
main.obj : error LNK2001: unresolved external symbol __imp__InitCommonControls@0
17 juil. 2003 à 18:27
17 juil. 2003 à 18:13
d:documents and settingsjackoskingureaucppfrance_source_2217main.c(100) : warning C4133: '=' : incompatible types - from 'struct HINSTANCE__ *' to 'struct HWND__ *'
etc...
17 juil. 2003 à 13:23
17 juil. 2003 à 10:42
i'm happy
17 juil. 2003 à 10:20
// CreateListView - creates a list view control.
// Returns the handle of the new control if successful or NULL
// otherwise.
// hwndParent - handle of the control's parent window
// pfData - file containing list view items
HWND WINAPI CreateListView(HWND hwndParent, FILE *pfData)
{
HWND hwndLV;
// Force the common controls DLL to be loaded.
InitCommonControls();
// Create the list view window.
hwndLV = CreateWindow(WC_LISTVIEW, "",
WS_CHILD | LVS_REPORT | LVS_EDITLABELS,
0, 0, CW_USEDEFAULT, CW_USEDEFAULT,
hwndParent, NULL, g_hinst, NULL);
if (hwndLV == NULL)
return NULL;
return hwndLV; // return the control's handle
}
17 juil. 2003 à 10:13
17 juil. 2003 à 10:08
question bete, mais je peux pas tester jlà, est ce que ca gere les icon sup à 256 couleurs, car avec mfc pas moyen j'y suis pas arrivé :( ptetre qu'avec les api..