// JP opened flex table

Click to See Complete Forum and Search --> : Dialogbased Application - excecute code before popup


ks.drax
April 18th, 2007, 01:56 AM
Just a short question about winApi dialogbase Applications.

I have to check some values and only if the are incorrect I want to popup a dialog window. I want to use this code:


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
return DialogBox (hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, DialogProc);
}


BOOL CALLBACK DialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
return TRUE;....


where should I put the code to check the value before popup?
Can I do this in the WinMain function? Or should it be in the WM_INITDIALOG part?

ThX
DraX

Marc G
April 18th, 2007, 07:42 AM
What value do you want to check?

//JP added flex table