Click here to Skip to main content
15,905,874 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC++ 6 debugging problem Pin
shine joseph27-Nov-07 1:07
shine joseph27-Nov-07 1:07 
Questionhow to print the value from registry Pin
dadacncn22-Nov-07 22:40
dadacncn22-Nov-07 22:40 
AnswerRe: how to print the value from registry Pin
CPallini22-Nov-07 22:57
mveCPallini22-Nov-07 22:57 
GeneralRe: how to print the value from registry Pin
dadacncn23-Nov-07 1:16
dadacncn23-Nov-07 1:16 
GeneralYou are welcome Pin
CPallini23-Nov-07 2:30
mveCPallini23-Nov-07 2:30 
GeneralRe: how to print the value from registry Pin
ThatsAlok23-Nov-07 18:58
ThatsAlok23-Nov-07 18:58 
AnswerRe: how to print the value from registry Pin
Hamid_RT23-Nov-07 19:49
Hamid_RT23-Nov-07 19:49 
QuestionOLE And Powerpoint Using Non MFC Pin
Soumyadipta22-Nov-07 22:33
Soumyadipta22-Nov-07 22:33 
I have created a project using visual studio 2005 ,the details are given below.

I want to open power point slide and want to navigate this slides.Cry | :((


Here is the details
------------------------------



I am using Visual Studio 2005 (8.0)


File ->New -> Project
Visual C++ Project ->Win32 -> Win32 Project
Name=Oletest ,Saved to Desktop
Application Settings -> Windows Application -> Finish

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Oletest.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "Oletest.h"
#define MAX_LOADSTRING 100

// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name

// Forward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);

int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;

// Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_OLETEST, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);

// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}

hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_OLETEST);

// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

return (int) msg.wParam;
}



//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage are only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this function
// so that the application will get 'well formed' small icons associated
// with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;

wcex.cbSize = sizeof(WNDCLASSEX);

wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_OLETEST);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCTSTR)IDC_OLETEST;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);

return RegisterClassEx(&wcex);
}

//
// FUNCTION: InitInstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;

hInst = hInstance; // Store instance handle in our global variable

hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

if (!hWnd)
{
return FALSE;
}

ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);

return TRUE;
}

//
// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;

switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code here...
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}

// Message handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
return TRUE;

case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



AnswerRe: OLE And Powerpoint Using Non MFC Pin
Jhony george22-Nov-07 23:26
Jhony george22-Nov-07 23:26 
GeneralRe: OLE And Powerpoint Using Non MFC Pin
Soumyadipta26-Nov-07 0:44
Soumyadipta26-Nov-07 0:44 
GeneralRe: OLE And Powerpoint Using Non MFC Pin
Jhony george26-Nov-07 22:49
Jhony george26-Nov-07 22:49 
QuestionHow to make VertScrolling a litle bit faster? Pin
josip cagalj22-Nov-07 22:13
josip cagalj22-Nov-07 22:13 
AnswerRe: How to make VertScrolling a litle bit faster? Pin
Nelek22-Nov-07 23:49
protectorNelek22-Nov-07 23:49 
GeneralRe: How to make VertScrolling a litle bit faster? Pin
josip cagalj23-Nov-07 0:18
josip cagalj23-Nov-07 0:18 
GeneralRe: How to make VertScrolling a litle bit faster? Pin
Nelek25-Nov-07 21:16
protectorNelek25-Nov-07 21:16 
GeneralRe: How to make VertScrolling a litle bit faster? Pin
josip cagalj25-Nov-07 22:13
josip cagalj25-Nov-07 22:13 
GeneralRe: How to make VertScrolling a litle bit faster? Pin
josip cagalj26-Nov-07 22:06
josip cagalj26-Nov-07 22:06 
AnswerRe: How to make VertScrolling a litle bit faster? Pin
Iain Clarke, Warrior Programmer23-Nov-07 5:27
Iain Clarke, Warrior Programmer23-Nov-07 5:27 
QuestionMoving a window Pin
kk.tvm22-Nov-07 19:05
kk.tvm22-Nov-07 19:05 
AnswerRe: Moving a window Pin
Hamid_RT22-Nov-07 19:12
Hamid_RT22-Nov-07 19:12 
AnswerRe: Moving a window Pin
chandu00422-Nov-07 19:56
chandu00422-Nov-07 19:56 
AnswerRe: Moving a window Pin
kk.tvm22-Nov-07 21:09
kk.tvm22-Nov-07 21:09 
GeneralRe: Moving a window Pin
pierre_ribery22-Nov-07 21:19
pierre_ribery22-Nov-07 21:19 
GeneralRe: Moving a window Pin
ovidiucucu22-Nov-07 22:33
ovidiucucu22-Nov-07 22:33 
GeneralRe: Moving a window Pin
kk.tvm23-Nov-07 19:51
kk.tvm23-Nov-07 19:51 

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.