zip's

while(true) { Write it down; Think about it; Refine it; Sleep(); }

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 4 5 6 7 8 9 10 下一页

2010年12月22日

摘要: 提示1:使用 RowDefinition.MinHeight/MaxHeight, ColumnDefinition.MinWidth/MaxWidth;使用时应尽可能靠近 virtual tree 的根部。它们都是 Attached Property,所以在使用 Grid 时才有用;[代码] 阅读全文
posted @ 2010-12-22 15:32 zip's 阅读(138) 评论(0) 推荐(0) 编辑

2010年12月15日

摘要: 适度的结合 xmal 和 code behind在学习和实践了一段日子 data binding 后,一直追求完全使用 xaml 而不用 code behind 去实现 data/command binding。感觉这个想法不是很正确,如果希望设计出完美支持 xaml 的 view model 和 data model 还是不容易,尤其是经验有限的时候。问题:举一个例子,设想你有一个 editable 的 combobox ,有2个按钮,一个“rename”,一个 “add name” (这里不讨论为什么这么设计,就要这么实现)。希望使用 command binding 来实现 rename。 阅读全文
posted @ 2010-12-15 17:32 zip's 阅读(218) 评论(0) 推荐(0) 编辑

2010年12月13日

摘要: MFC的工具栏和停靠窗口的状态在程序启动时从注册表中load,在程序退出时save。- CWindAppEx::m_bSaveState 标记是否需要自动存储;- CWindAppEx::OnClosingMainFrame() 重载,可以自定制存储行为;- 注册表key:HKEY_CURRENT_USER\Software\company name\porduct name\Workspace 阅读全文
posted @ 2010-12-13 17:12 zip's 阅读(314) 评论(0) 推荐(0) 编辑

2010年12月6日

摘要: 1,使用 WPF 自定制:用 2 个 RepeatButton,用 ViewBox 包装“”“”作为 Content ,再旋转 90 度。2,包装 Windows.Forms.DomainUpDown 或者 Windows.Forms.NumericUpDown 阅读全文
posted @ 2010-12-06 17:37 zip's 阅读(246) 评论(0) 推荐(0) 编辑

2010年12月5日

摘要: 例子1 :需要获得 ListBox 中的 Canvas方法1:Loaded 事件[代码]方法2:[代码]例子2:想获取一个可编辑的 ComboBox 中的 TextBox (顺便说一句,如果不可编辑,则是个 TextBlock,可以使用 SNOOP 来观察)可编辑的ComboBox含有一个TextBox使用VisualTreeHelper找到TextBox 阅读全文
posted @ 2010-12-05 21:29 zip's 阅读(287) 评论(0) 推荐(0) 编辑

2010年12月3日

摘要: -metadata 提供了定制 porperty 的能力,你不需要重写整个类,就能得到个性化的东西- metadata 回调机制可以被巧妙的应用,例如,实现command binding到items control的selection changed 阅读全文
posted @ 2010-12-03 17:29 zip's 阅读(153) 评论(0) 推荐(0) 编辑

2010年11月19日

摘要: Individuals and interactions over processes and toolsWorking software over comprehensive documentationCustomer collaboration over contract negotiationResponding to change over following a plan1.Our hi... 阅读全文
posted @ 2010-11-19 17:58 zip's 阅读(275) 评论(0) 推荐(0) 编辑

摘要: 在MFC DLL导出函数中传.net对象,不可以,有编译错误如下: error C3395: 'MyClass::Function' : __declspec(dllexport) cannot be applied to a function with the __clrcall calling convention 解决方法是,为参数包上 gcroot<>. class AFX_EXT_CL... 阅读全文
posted @ 2010-11-19 16:03 zip's 阅读(1043) 评论(0) 推荐(0) 编辑

摘要: 在将MFC程序加入 /clr 编译时,你有可能会看到这个编译错误cl : Command line error D8016 : '/RTC1' and '/clr' command-line options are incompatible处理的方法:工程Properties属性,在C/C++ -> CodeGeneration下找到Basic Runtime Checks 属性 现在为(B... 阅读全文
posted @ 2010-11-19 15:42 zip's 阅读(4195) 评论(0) 推荐(0) 编辑

2010年11月1日

摘要: 我看到的现象是,在debug程序退出时,会弹出个对话框,显示标题中所示的错误消息。产生该问题的原因是,在 unload 一个 navtive dll 时,调用了 /clr 编译的对象,通常是因为这个对象是个全局对象,之前未加 /clr 编译没事,现在 /clr 了,就出了问题。解决方法有:1,退出程序在退出前,显式释放 /clr 对象;2,将那个对象 #pragma unmanaged 成一个 native class; 阅读全文
posted @ 2010-11-01 17:40 zip's 阅读(571) 评论(2) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 下一页