Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionObtaining recycle bin folder Pin
Chintoo72318-Mar-06 3:31
Chintoo72318-Mar-06 3:31 
AnswerRe: Obtaining recycle bin folder Pin
Hamid_RT18-Mar-06 5:15
Hamid_RT18-Mar-06 5:15 
AnswerRe: Obtaining recycle bin folder Pin
Michael Dunn18-Mar-06 5:48
sitebuilderMichael Dunn18-Mar-06 5:48 
GeneralRe: Obtaining recycle bin folder Pin
Chintoo72318-Mar-06 15:58
Chintoo72318-Mar-06 15:58 
GeneralRe: Obtaining recycle bin folder Pin
Michael Dunn18-Mar-06 18:20
sitebuilderMichael Dunn18-Mar-06 18:20 
GeneralRe: Obtaining recycle bin folder Pin
Chintoo72318-Mar-06 18:47
Chintoo72318-Mar-06 18:47 
GeneralRe: Obtaining recycle bin folder Pin
Michael Dunn18-Mar-06 19:43
sitebuilderMichael Dunn18-Mar-06 19:43 
QuestionWin32 Slider Control Pin
amanoullah18-Mar-06 2:43
amanoullah18-Mar-06 2:43 
Hi guys. how can I access and manipulate a slider found in my texture dialog box that i have created. I have the following procedure that handles textures in my program

//--------------------------------------------------------------<br />
// Name:			IDD_TEXTUREProc - global<br />
// Description:		Process the messages for the texture map dialog box<br />
// Arguments:		None as far as you're concerned :)<br />
// Return Value:	A BOOL variable<br />
//--------------------------------------------------------------<br />
BOOL CALLBACK IDD_TEXTUREProc( HWND hWnd,<br />
						 	   unsigned int uiMsg,<br />
							   WPARAM wParam,<br />
							   LPARAM lParam )<br />
{<br />
	unsigned int uiSize;<br />
<br />
	switch( uiMsg )<br />
	{<br />
		//initiate the dialog box<br />
		case WM_INITDIALOG:<br />
			//set the dialog box's position<br />
			SetWindowPos( hWnd, <br />
						  NULL, <br />
			 			  350, 300, <br />
						  0, 0, <br />
						  SWP_NOSIZE );<br />
<br />
<br />
			return TRUE;<br />
			break;<br />
<br />
		case WM_COMMAND:<br />
			switch( LOWORD( wParam ) )<br />
				{<br />
					case ID_TEXTUREDD_GENERATE:<br />
						//get the value that was entered into the "detail" field<br />
						uiSize= ( unsigned int )GetDlgItemInt( hWnd, IDC_ROUGHNESS, NULL, true );<br />
<br />
						//create the texture map<br />
						g_bruteForce.GenerateTextureMap( uiSize );<br />
<br />
						//close the dialog box now that generation is done<br />
						EndDialog( hWnd, 0 );<br />
						return TRUE;<br />
						break;<br />
						<br />
					//cancel was pressed, back out<br />
					case ID_TEXTURE_CANCEL:<br />
						EndDialog( hWnd, 0 );<br />
						return TRUE;<br />
						break;<br />
				}<br />
			break;<br />
	}<br />
<br />
	//message not handled<br />
	return FALSE;<br />
}


And in my main, im doing this:

//--------------------------------------------------------------<br />
// Name:			WinMain - global<br />
// Description:		The equivalant to Main( ) in console apps<br />
// Arguments:		Just some default arguments that windows requires<br />
// Return Value:	An integer variable<br />
//--------------------------------------------------------------<br />
int WINAPI WinMain( HINSTANCE hInstance, <br />
				    HINSTANCE hPrevInstance, <br />
				    LPSTR	 lpCmdLine, <br />
				    int		 nCmdShow ) <br />
{<br />
while( true )<br />
	{<br />
		if( !g_glApp.HandleMessages( ) )<br />
			break;<br />
<br />
		//exit the application<br />
		if( g_glApp.MenuDown( ID_EXIT ) )<br />
			PostQuitMessage( 0 );<br />
<br />
		//take a screenshot<br />
		else if( g_glApp.MenuDown( ID_SCREENSHOT ) )<br />
			g_glApp.TakeScreenshot( "screenshot.bmp" );<br />
<br />
		//generate a texture map (with the size provided)<br />
		else if( g_glApp.MenuDown( ID_GENERATE_TEXTURE_MAP ) )<br />
			g_glApp.CreateDialogBox( IDD_TEXTURESIZE, IDD_TEXTUREProc );<br />
<br />
       }<br />
}


What code do i need to insert in main and where??Confused | :confused:

Please Help!!
P:S: Both BOOL CALLBACK IDD_TEXTUREProc and int WINAPI WINMAIN are found in main.cpp

Thanks in advance

QuestionAn Icon on a Button Pin
ariesaloksingh18-Mar-06 1:46
ariesaloksingh18-Mar-06 1:46 
AnswerRe: An Icon on a Button Pin
Monty218-Mar-06 1:57
Monty218-Mar-06 1:57 
AnswerRe: An Icon on a Button Pin
Hamid_RT18-Mar-06 1:58
Hamid_RT18-Mar-06 1:58 
Questionrelated to mozilla firefox Pin
rajeevktripathi18-Mar-06 1:18
rajeevktripathi18-Mar-06 1:18 
QuestionWinAPI resources - using language packs Pin
Luy18-Mar-06 0:17
Luy18-Mar-06 0:17 
AnswerRe: WinAPI resources - using language packs Pin
Monty218-Mar-06 0:58
Monty218-Mar-06 0:58 
GeneralRe: WinAPI resources - using language packs Pin
Luy18-Mar-06 2:05
Luy18-Mar-06 2:05 
AnswerRe: WinAPI resources - using language packs Pin
Charlietoday18-Mar-06 4:27
Charlietoday18-Mar-06 4:27 
GeneralRe: WinAPI resources - using language packs Pin
Luy18-Mar-06 7:56
Luy18-Mar-06 7:56 
QuestionThree questions Pin
hanno2517-Mar-06 22:45
hanno2517-Mar-06 22:45 
AnswerRe: Three questions Pin
Waldermort17-Mar-06 23:11
Waldermort17-Mar-06 23:11 
AnswerRe: Three questions Pin
Stephen Hewitt18-Mar-06 19:00
Stephen Hewitt18-Mar-06 19:00 
Questionsimple question Pin
big_denny_20017-Mar-06 20:42
big_denny_20017-Mar-06 20:42 
AnswerRe: simple question Pin
Aqueel17-Mar-06 20:52
Aqueel17-Mar-06 20:52 
AnswerRe: simple question Pin
Charlietoday17-Mar-06 21:43
Charlietoday17-Mar-06 21:43 
GeneralRe: simple question Pin
big_denny_20017-Mar-06 23:11
big_denny_20017-Mar-06 23:11 
GeneralRe: simple question Pin
Waldermort17-Mar-06 23:31
Waldermort17-Mar-06 23:31 

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.