Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
GeneralRe: creating custom control that contains DialogResult Pin
OriginalGriff9-Feb-10 9:24
mveOriginalGriff9-Feb-10 9:24 
QuestionHow to record or capture voices from speaker or sound card on my computer win7, not from microphone Pin
serkanweb9-Feb-10 2:54
serkanweb9-Feb-10 2:54 
AnswerRe: How to record or capture voices from speaker or sound card on my computer win7, not from microphone Pin
serkanweb9-Feb-10 23:39
serkanweb9-Feb-10 23:39 
Questionregarding Microsoft Sync Framework Pin
Tridip Bhattacharjee9-Feb-10 2:47
professionalTridip Bhattacharjee9-Feb-10 2:47 
QuestionInsertMenuItem WinAPI problem Pin
Nematjon Rahmanov9-Feb-10 1:17
Nematjon Rahmanov9-Feb-10 1:17 
AnswerRe: InsertMenuItem WinAPI problem Pin
Luc Pattyn9-Feb-10 1:25
sitebuilderLuc Pattyn9-Feb-10 1:25 
QuestionRe: InsertMenuItem WinAPI problem Pin
Nematjon Rahmanov9-Feb-10 1:47
Nematjon Rahmanov9-Feb-10 1:47 
AnswerRe: InsertMenuItem WinAPI problem Pin
Covean9-Feb-10 2:08
Covean9-Feb-10 2:08 
1. You have used the flag MIIM.SUBMENU (fMask) but you hasn't set the hSubMenu value.
2. You also should adjust your struct to use IntPtr instead of int.

Like this:
[StructLayout(LayoutKind.Sequential)]
public struct MENUITEMINFO
{
    public uint cbSize;
    public uint fMask;
    public uint fType;
    public uint fState;
    public int wID;
    public IntPtr hSubMenu;
    public IntPtr hbmpChecked;
    public IntPtr hbmpUnchecked;
    public IntPtr dwItemData;
    public String dwTypeData;
    public uint cch;
    public IntPtr hbmpItem;
}


There may be also the problem with the (LPTSTR)String dwTypeData. If it doesn't work you could try StringBuilder instead.
Greetings
Covean

GeneralRe: InsertMenuItem WinAPI problem Pin
Nematjon Rahmanov9-Feb-10 2:33
Nematjon Rahmanov9-Feb-10 2:33 
GeneralRe: InsertMenuItem WinAPI problem Pin
Covean9-Feb-10 2:49
Covean9-Feb-10 2:49 
GeneralRe: InsertMenuItem WinAPI problem Pin
Decco28-Feb-10 23:27
Decco28-Feb-10 23:27 
QuestionSorting Pin
sachees1238-Feb-10 23:59
sachees1238-Feb-10 23:59 
AnswerRe: Sorting Pin
monstale9-Feb-10 0:38
monstale9-Feb-10 0:38 
GeneralRe: Sorting Pin
ThatsAlok9-Feb-10 0:57
ThatsAlok9-Feb-10 0:57 
AnswerRe: Sorting Pin
ThatsAlok9-Feb-10 0:41
ThatsAlok9-Feb-10 0:41 
AnswerRe: Sorting Pin
Luc Pattyn9-Feb-10 1:01
sitebuilderLuc Pattyn9-Feb-10 1:01 
AnswerRe: Sorting Pin
Dan Mos9-Feb-10 9:09
Dan Mos9-Feb-10 9:09 
Questionhow to retrive max value of a column by using c# Pin
inayat basha8-Feb-10 23:54
inayat basha8-Feb-10 23:54 
AnswerRe: how to retrive max value of a column by using c# Pin
ThatsAlok9-Feb-10 0:03
ThatsAlok9-Feb-10 0:03 
QuestionAuto Start programms Pin
Masterhame8-Feb-10 22:59
Masterhame8-Feb-10 22:59 
AnswerRe: Auto Start programms Pin
Gaurav Dudeja India8-Feb-10 23:05
Gaurav Dudeja India8-Feb-10 23:05 
AnswerRe: Auto Start programms Pin
Luc Pattyn8-Feb-10 23:58
sitebuilderLuc Pattyn8-Feb-10 23:58 
AnswerRe: Auto Start programms Pin
ThatsAlok9-Feb-10 0:07
ThatsAlok9-Feb-10 0:07 
AnswerRe: Auto Start programms Pin
PIEBALDconsult9-Feb-10 3:17
mvePIEBALDconsult9-Feb-10 3:17 
QuestionBackup Sql query Pin
Sivaooty8-Feb-10 22:33
Sivaooty8-Feb-10 22:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.