flat assembler
Message board for the users of flat assembler.

Index > Windows > PickIconDlg

Author
Thread Post new topic Reply to topic
KostX



Joined: 19 Sep 2012
Posts: 41
KostX 13 Dec 2012, 18:23
Help me please! the dialog "PickIconDlg" work incorrect. It's opening but function data(e.g IconPath and IconIndex) are wrong! Also, when I try to get a path and index of icon. Tell me please, how do I can get or set function data normal?

Sourse (String "invoke MessageBox, 0, IconPath, IconIndex, 0" for debug!!!):
Code:
     invoke GetDlgItemText, [hMain], 302, IconPath,  128
     invoke GetDlgItemText, [hMain], 303, IconIndex, 128

     invoke MessageBox, 0, IconPath, IconIndex, 0

     invoke PickIconDlg, [hMain], IconPath, 128, IconIndex

     invoke MessageBox, 0, IconPath, IconIndex, 0

     invoke SetDlgItemText, [hMain], 302, IconPath
     invoke SetDlgItemText, [hMain], 303, IconIndex
    


After step three message box show me incorrect data (Index in title, path in message) that will be set in dialog boxes. Why??? And how do I can change it? Then it data appears in Edit boxes.


Description: Step three: PickIconDlg opened a default path. In a dialog box I choose an icon and press ok button.
Filesize: 162.39 KB
Viewed: 1691 Time(s)

3.png


Description: Second step: PickIconDlg has sent to me the error message (Can't find file ...). Why??? And how do I can change it?
Filesize: 122.79 KB
Viewed: 1691 Time(s)

2.png


Description: First step: I've been entered IconPath and Iconindex data into Edit box. All is normal.
Filesize: 113.17 KB
Viewed: 1691 Time(s)

1.png


Post 13 Dec 2012, 18:23
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 13 Dec 2012, 22:01
KostX,

Please, do us a favor and read MSDN (or any other WinAPI reference) about MessageBox(). Text comes before caption (in the list of arguments), why are you so surprised?
Post 13 Dec 2012, 22:01
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 14 Dec 2012, 01:53
lol.

use wsprintfX

X=ANSI or UNICODE
Post 14 Dec 2012, 01:53
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.