mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0023904: Multiple warning on Windows x86_64 target concerning WinAPI usage
This commit is contained in:
@@ -81,10 +81,9 @@ HWND CreateCommandWindow(HWND hWnd, int nitem)
|
||||
/*--------------------------------------------------------*\
|
||||
| COMMAND WINDOW PROCEDURE
|
||||
\*--------------------------------------------------------*/
|
||||
LONG APIENTRY CommandProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam )
|
||||
LRESULT APIENTRY CommandProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
HWND hWndEdit;
|
||||
int index; // Nb of characters in the buffer of hWndEdit
|
||||
MINMAXINFO* lpmmi;
|
||||
|
||||
switch(wMsg)
|
||||
@@ -102,12 +101,15 @@ LONG APIENTRY CommandProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam )
|
||||
break;
|
||||
|
||||
case WM_SIZE :
|
||||
{
|
||||
hWndEdit = (HWND)GetWindowLong(hWnd, CLIENTWND);
|
||||
MoveWindow(hWndEdit, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
|
||||
// Place the cursor at the end of the buffer
|
||||
index = SendMessage(hWnd, WM_GETTEXTLENGTH, 0l, 0l);
|
||||
// Place the cursor at the end of the buffer
|
||||
// Nb of characters in the buffer of hWndEdit
|
||||
LRESULT index = SendMessage(hWnd, WM_GETTEXTLENGTH, 0l, 0l);
|
||||
SendMessage(hWnd, EM_SETSEL, index, index);
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_SETFOCUS :
|
||||
hWndEdit = (HWND)GetWindowLong(hWnd, CLIENTWND);
|
||||
@@ -122,7 +124,7 @@ LONG APIENTRY CommandProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam )
|
||||
|
||||
|
||||
|
||||
LONG APIENTRY EditProc(HWND, UINT, WPARAM, LONG);
|
||||
LRESULT APIENTRY EditProc(HWND, UINT, WPARAM, LPARAM);
|
||||
/*--------------------------------------------------------*\
|
||||
| COMMAND CREATE PROCEDURE
|
||||
\*--------------------------------------------------------*/
|
||||
@@ -176,7 +178,7 @@ int GetCommand(HWND hWnd, char* buffer)
|
||||
int again = 1;
|
||||
char temp[COMMANDSIZE]="";
|
||||
|
||||
int nbLine = SendMessage(hWnd, EM_GETLINECOUNT, 0l, 0l);
|
||||
int nbLine = (int )SendMessage(hWnd, EM_GETLINECOUNT, 0l, 0l);
|
||||
|
||||
int nbChar = 0;
|
||||
buffer[0]='\0';
|
||||
@@ -187,7 +189,7 @@ int GetCommand(HWND hWnd, char* buffer)
|
||||
WORD* nbMaxChar = (WORD*)temp;
|
||||
*nbMaxChar = COMMANDSIZE-1;
|
||||
|
||||
int nbCharRead = SendMessage(hWnd, EM_GETLINE, nbLine-1, (LPARAM)temp);
|
||||
int nbCharRead = (int )SendMessage(hWnd, EM_GETLINE, nbLine-1, (LPARAM)temp);
|
||||
nbChar += nbCharRead ;
|
||||
int cmp = strncmp(temp, PROMPT, 10);
|
||||
temp[nbCharRead]='\0';
|
||||
@@ -208,14 +210,14 @@ extern char console_command[1000];
|
||||
/*--------------------------------------------------------*\
|
||||
| EDIT WINDOW PROCEDURE
|
||||
\*--------------------------------------------------------*/
|
||||
LONG APIENTRY EditProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam )
|
||||
LRESULT APIENTRY EditProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
char buffer[COMMANDSIZE];
|
||||
POINT pos;
|
||||
BOOL rep;
|
||||
static int nbline; // Process the buffer of the edit window
|
||||
int index;
|
||||
|
||||
static LRESULT nbline; // Process the buffer of the edit window
|
||||
LRESULT index;
|
||||
|
||||
switch(wMsg)
|
||||
{
|
||||
case WM_CHAR :
|
||||
|
@@ -1365,7 +1365,7 @@ HWND DrawWindow::CreateDrawWindow(HWND hWndClient, int nitem)
|
||||
/*--------------------------------------------------------*\
|
||||
| DRAW WINDOW PROCEDURE
|
||||
\*--------------------------------------------------------*/
|
||||
LONG APIENTRY DrawWindow::DrawProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam )
|
||||
LRESULT APIENTRY DrawWindow::DrawProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
DrawWindow* localObjet = (DrawWindow*)GetWindowLong(hWnd, CLIENTWND);
|
||||
if (!localObjet)
|
||||
@@ -1490,15 +1490,15 @@ DrawWindow::~DrawWindow()
|
||||
void DrawWindow::Init(Standard_Integer theXLeft, Standard_Integer theYTop,
|
||||
Standard_Integer theWidth, Standard_Integer theHeight)
|
||||
{
|
||||
if (win == 0)
|
||||
if (win == NULL)
|
||||
{
|
||||
win = CreateDrawWindow(hWndClientMDI, 0);
|
||||
}
|
||||
|
||||
// include decorations in the window dimensions
|
||||
// to reproduce same behaviour of Xlib window.
|
||||
DWORD aWinStyle = GetWindowLongPtr (win, GWL_STYLE);
|
||||
DWORD aWinStyleEx = GetWindowLongPtr (win, GWL_EXSTYLE);
|
||||
DWORD aWinStyle = GetWindowLong (win, GWL_STYLE);
|
||||
DWORD aWinStyleEx = GetWindowLong (win, GWL_EXSTYLE);
|
||||
HMENU aMenu = GetMenu (win);
|
||||
|
||||
RECT aRect;
|
||||
@@ -1820,7 +1820,7 @@ void DrawWindow::DrawString(int x,int y, char* text)
|
||||
HDC hDC = GetDC(win);
|
||||
HDC aWorkDC = myUseBuffer ? GetMemDC(hDC) : hDC;
|
||||
|
||||
TextOut(aWorkDC, x, y, text, strlen(text));
|
||||
TextOut(aWorkDC, x, y, text, (int )strlen(text));
|
||||
|
||||
if (myUseBuffer) ReleaseMemDC(aWorkDC);
|
||||
ReleaseDC(win,hDC);
|
||||
|
@@ -435,7 +435,7 @@ public:
|
||||
__Draw_API static void SelectNoWait (HANDLE&,int&,int&,int&);
|
||||
|
||||
// Procedure de fenetre
|
||||
__Draw_API static LONG APIENTRY DrawProc (HWND,UINT,WPARAM,LONG);
|
||||
__Draw_API static LRESULT APIENTRY DrawProc (HWND,UINT,WPARAM,LPARAM);
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
#include <Windows.h>
|
||||
|
||||
LONG APIENTRY WndProc(HWND, UINT, WPARAM, LONG);
|
||||
LRESULT APIENTRY WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
BOOL CreateProc(HWND);
|
||||
VOID DestroyProc(HWND);
|
||||
BOOL CommandProc(HWND, WPARAM, LPARAM);
|
||||
|
@@ -41,7 +41,7 @@ extern Standard_Boolean Draw_IsConsoleSubsystem;
|
||||
|
|
||||
|
|
||||
\*--------------------------------------------------------*/
|
||||
LONG APIENTRY WndProc(HWND hWndFrame, UINT wMsg, WPARAM wParam, LONG lParam )
|
||||
LRESULT APIENTRY WndProc(HWND hWndFrame, UINT wMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
HWND hWndClient;
|
||||
switch(wMsg)
|
||||
|
Reference in New Issue
Block a user