Click here to Skip to main content
16,008,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: window class from hwnd? Pin
Jack Puppy30-Jun-05 12:38
Jack Puppy30-Jun-05 12:38 
GeneralObtain a handle to a label in a container Pin
Abhishek Karnik30-Jun-05 10:43
Abhishek Karnik30-Jun-05 10:43 
GeneralRe: Obtain a handle to a label in a container Pin
David Crow30-Jun-05 10:45
David Crow30-Jun-05 10:45 
GeneralRe: Obtain a handle to a label in a container Pin
Abhishek Karnik1-Jul-05 9:27
Abhishek Karnik1-Jul-05 9:27 
GeneralRe: Obtain a handle to a label in a container Pin
Jose Lamas Rios30-Jun-05 16:33
Jose Lamas Rios30-Jun-05 16:33 
GeneralRe: Obtain a handle to a label in a container Pin
Abhishek Karnik1-Jul-05 9:32
Abhishek Karnik1-Jul-05 9:32 
GeneralRe: Obtain a handle to a label in a container Pin
Jose Lamas Rios1-Jul-05 9:41
Jose Lamas Rios1-Jul-05 9:41 
GeneralModeless Dialog not moving Pin
KnaveR77730-Jun-05 9:16
KnaveR77730-Jun-05 9:16 
Hey all

Ive created a API modeless dialog inside of a DLL, and is created whenever the calling program calls the appropriate exported function. In a past thread that i posted, this dialog would cause the application to lock up with the not responding dialog. Thanks to someones tip to use DefWindowProc() I can now get the dialog to work (pops up, and close button properly closes when clicked), only it appears to not be responding to move messages (the message called when i would like to drag the dialog around on the screen).

From DLLMain:
<br />
hDLL = hinstDLL;<br />


The exported function that starts the dialog:
<br />
<br />
//mWnd is handle to main window of calling program<br />
//aWnd is handle to active window (programm calling is MDI)<br />
<br />
int __stdcall WINAPI x(HWND mWnd, HWND aWnd, char *data, char *params, BOOL show, BOOL nopause){<br />
<br />
	MSG msg;<br />
<br />
	hDlg = CreateDialog(hDLL, MAKEINTRESOURCE(IDD_DIALOG1), mWnd, (DLGPROC)DlgCallBack);<br />
<br />
	ShowWindow(hDlg,SW_SHOW);<br />
<br />
	while (GetMessage(&msg, NULL, 0,0)) {<br />
          TranslateMessage(&msg);<br />
	  DispatchMessage(&msg);<br />
        }<br />
}<br />


The DLGPROC:
<br />
LRESULT CALLBACK x(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam){<br />
	switch (uMsg) <br />
    { <br />
		case WM_COMMAND:<br />
<br />
			switch(wParam){<br />
				case IDOK:<br />
				DestroyWindow(hDlg);<br />
				return TRUE;<br />
			}<br />
<br />
			break;<br />
 <br />
        case WM_DESTROY: <br />
            DestroyWindow(hDlg);<br />
        PostQuitMessage(0);<br />
            return TRUE;<br />
    }<br />
<br />
	return DefWindowProc(hwnd, uMsg, wParam, lParam);<br />
}<br />

GeneralRe: Modeless Dialog not moving Pin
David Crow30-Jun-05 9:38
David Crow30-Jun-05 9:38 
GeneralRe: Modeless Dialog not moving Pin
KnaveR77730-Jun-05 10:30
KnaveR77730-Jun-05 10:30 
GeneralRe: Modeless Dialog not moving Pin
Blake Miller30-Jun-05 12:51
Blake Miller30-Jun-05 12:51 
GeneralRe: Modeless Dialog not moving Pin
KnaveR77730-Jun-05 13:25
KnaveR77730-Jun-05 13:25 
GeneralRe: Modeless Dialog not moving Pin
Jose Lamas Rios30-Jun-05 16:18
Jose Lamas Rios30-Jun-05 16:18 
GeneralRe: Modeless Dialog not moving Pin
KnaveR77730-Jun-05 16:38
KnaveR77730-Jun-05 16:38 
GeneralRe: Modeless Dialog not moving Pin
Blake V. Miller30-Jun-05 17:23
Blake V. Miller30-Jun-05 17:23 
GeneralRe: Modeless Dialog not moving Pin
KnaveR7771-Jul-05 4:02
KnaveR7771-Jul-05 4:02 
GeneralColour Format (Please help) Pin
llp00na30-Jun-05 8:57
llp00na30-Jun-05 8:57 
GeneralRe: Colour Format (Please help) Pin
Chris Losinger30-Jun-05 10:18
professionalChris Losinger30-Jun-05 10:18 
GeneralRe: Colour Format (Please help) Pin
llp00na30-Jun-05 11:02
llp00na30-Jun-05 11:02 
GeneralRe: Colour Format (Please help) Pin
Chris Losinger30-Jun-05 11:07
professionalChris Losinger30-Jun-05 11:07 
GeneralRe: Colour Format (Please help) Pin
llp00na30-Jun-05 23:40
llp00na30-Jun-05 23:40 
GeneralRe: Colour Format (Please help) Pin
David Crow1-Jul-05 3:30
David Crow1-Jul-05 3:30 
GeneralRe: Colour Format (Please help) Pin
David Crow1-Jul-05 3:32
David Crow1-Jul-05 3:32 
GeneralHelp on this error!! Pin
smartymanav30-Jun-05 8:51
smartymanav30-Jun-05 8:51 
GeneralRe: Help on this error!! Pin
David Crow30-Jun-05 9:18
David Crow30-Jun-05 9:18 

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.