Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralActive x Display Pin
Adi Narayana16-Jan-04 5:23
Adi Narayana16-Jan-04 5:23 
GeneralDesktop and DirectX Pin
AlexMart16-Jan-04 3:38
AlexMart16-Jan-04 3:38 
GeneralRe: Desktop and DirectX Pin
Andrew Walker16-Jan-04 19:26
Andrew Walker16-Jan-04 19:26 
Questionusing c++ in a VS.NET setup project?? Pin
schaereran@gmx.net16-Jan-04 1:59
schaereran@gmx.net16-Jan-04 1:59 
AnswerRe: using c++ in a VS.NET setup project?? Pin
Robert M Greene16-Jan-04 8:43
Robert M Greene16-Jan-04 8:43 
GeneralRe: using c++ in a VS.NET setup project?? Pin
Robert M Greene16-Jan-04 8:45
Robert M Greene16-Jan-04 8:45 
GeneralRe: using c++ in a VS.NET setup project?? Pin
schaereran@gmx.net18-Jan-04 22:21
schaereran@gmx.net18-Jan-04 22:21 
Generalwarning C4047: 'function' : 'struct HMENU__ *' differs in levels of indirection from 'const int ' Pin
AssemblySoft16-Jan-04 1:20
AssemblySoft16-Jan-04 1:20 
Confused | :confused: I currently have the job of cleaning up around 3700 warnings. Most i have sorted but this one i am having trouble make go away.
Your help would be most appreciated, thanks in advance.

Code:

hwndStartButton=CreateWindow "button",szLoadStringOne,WS_CHILDWINDOW|WS_VISIBLE|WS_EX_TOPMOST | BS_PUSHBUTTON , (rect.right)/2-100,(rect.bottom+380)/2-50,200,25,hwnd,ISVM_STARTISV,hInst,NULL);


Warnings:
VC++ 6
t_eng1.c(965) : warning C4047: 'function' : 'struct HMENU__ *' differs in levels of indirection from 'const int '

t_eng1.c(965) : warning C4024: 'CreateWindowExA' : different types for formal and actual parameter 10


Info:
ISVM_STARTISV #defined as 214

I have tried casting the 8th param (ISVM_STARTISV) to a HMENU, which supresses the warning, but then the WM_COMMAND does not get sent.

Also i am not using 'CreateWindowExA' and have not included any headers or libraries.

The MSDN documentation for CreateWindow for this parameter shows why i am passing in an int.

MSDN fragment:
hMenu
Handle to a menu, or specifies a child-window identifier depending on the window style. For an overlapped or pop-up window, hMenu identifies the menu to be used with the window; it can be NULL if the class menu is to be used. For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window.
end MSDN


This button gets created dynamically, when it's pressed a WM_COMMAND message needs to be sent, i then need to identify
which button has been pressed.



i have tried :
hwndStartButton=CreateWindow "button",szLoadStringOne,WS_CHILDWINDOW|WS_VISIBLE|WS_EX_TOPMOST | BS_PUSHBUTTON ,(rect.right)/2-100,(rect.bottom+380)/2-50,200,25,hwnd,(HMENU *)ISVM_STARTISV,hInst,NULL);

The compiler now says:
warning C4047: 'function' : 'struct HMENU__ *' differs in levels of indirection from 'struct HMENU__ ** '

-- thanks in advance

GeneralRe: warning C4047: 'function' : 'struct HMENU__ *' differs in levels of indirection from 'const int ' Pin
Antti Keskinen16-Jan-04 3:48
Antti Keskinen16-Jan-04 3:48 
GeneralRe: warning C4047: 'function' : 'struct HMENU__ *' differs in levels of indirection from 'const int ' Pin
Mike Dimmick16-Jan-04 4:03
Mike Dimmick16-Jan-04 4:03 
GeneralRe: warning C4047: 'function' : 'struct HMENU__ *' differs in levels of indirection from 'const int ' Pin
AssemblySoft19-Jan-04 0:04
AssemblySoft19-Jan-04 0:04 
GeneralUsing Parallel Port Pin
Best Friend16-Jan-04 1:18
Best Friend16-Jan-04 1:18 
GeneralRe: Using Parallel Port Pin
Antti Keskinen16-Jan-04 3:58
Antti Keskinen16-Jan-04 3:58 
GeneralRe: Using Parallel Port Pin
valikac16-Jan-04 5:16
valikac16-Jan-04 5:16 
Generalgets the Windows operating system code page Pin
padmakumara16-Jan-04 1:04
padmakumara16-Jan-04 1:04 
GeneralRe: gets the Windows operating system code page Pin
User 665816-Jan-04 1:16
User 665816-Jan-04 1:16 
GeneralRe: gets the Windows operating system code page Pin
David Crow16-Jan-04 3:36
David Crow16-Jan-04 3:36 
GeneralRe: gets the Windows operating system code page Pin
padmakumara18-Jan-04 22:49
padmakumara18-Jan-04 22:49 
GeneralRe: gets the Windows operating system code page Pin
David Crow19-Jan-04 2:15
David Crow19-Jan-04 2:15 
GeneralRe: gets the Windows operating system code page Pin
Robert M Greene19-Jan-04 5:15
Robert M Greene19-Jan-04 5:15 
GeneralFind files recursively in subdirectories Pin
mjvalan16-Jan-04 0:59
mjvalan16-Jan-04 0:59 
GeneralRe: Find files recursively in subdirectories Pin
Johnny ²16-Jan-04 1:42
Johnny ²16-Jan-04 1:42 
Generalrecycle bin info2 path ??plz help Pin
rohit.dhamija15-Jan-04 23:11
rohit.dhamija15-Jan-04 23:11 
GeneralRe: recycle bin info2 path ??plz help Pin
David Crow16-Jan-04 3:40
David Crow16-Jan-04 3:40 
QuestionWhen is my window hidden? Pin
Rhodri Jenkins15-Jan-04 23:07
Rhodri Jenkins15-Jan-04 23:07 

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.