标题:谁试过用C#+API挑战MessageBoxIndirect ?
只看楼主
sageking2
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2008-8-19
 问题点数:0 回复次数:0 
谁试过用C#+API挑战MessageBoxIndirect ?
我碰到两个麻烦:
1.先建个Console Application,定义了数据结构后
        public struct MSGBOXPARAMS
        {
            public uint cbSize;
            public IntPtr hwndOwner;
            public IntPtr hInstance;
            public string lpszText;
            public string lpszCaption;
            public uint dwStyle;
            public string lpszIcon;
            public int dwContextHelpId;
            public string  lpfnMsgBoxCallback;
            public uint dwLanguageId;
        };
MSGBOXPARAMS MsgBp = new MSGBOXPARAMS();
MsgBp.cbSize = (uint)sizeof(MSGBOXPARAMS);//因为没赋初值所以sizeof出错,其他语言怎么就行了.若有初值这个后也可能改变初值啊!
2.MsgBp.lpszIcon//指像Icon资源的指针,这个指针是string类型,我还是不会玩.
搜索更多相关主题的帖子: API 挑战 
2008-09-05 10:58



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-231548-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.569240 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved